pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: firefox using llvm/clang 22.1.6
On Friday, May 29th, 2026 at 7:04 AM, pin <voidpin%protonmail.com@localhost> wrote:
> Hi,
>
> Firefox fails to build with llvm/clang & friends 22.1.6
>
> Using wasi sysroot in /usr/pkg/wasi
> checking for the wasm C compiler... /usr/pkg/bin/clang
> checking whether the wasm C compiler can be used... yes
> checking the wasm C compiler version... 22.1.6
> checking the wasm C compiler works... yes
> checking the wasm C compiler can find wasi headers... yes
> checking the wasm C linker can find wasi libraries... yes
> checking for the wasm C++ compiler... /usr/pkg/bin/clang++
> checking whether the wasm C++ compiler can be used... yes
> checking the wasm C++ compiler version... 22.1.6
> checking the wasm C++ compiler works... yes
> checking the wasm C++ compiler can find wasi headers... yes
> checking the wasm C++ linker can find wasi libraries... yes
> checking for clock() in wasi sysroot... no
> checking for emulated clock() in wasi sysroot...
> DEBUG: Creating `/tmp/conftesty0vio0nr.c` with content:
> DEBUG: | #include <time.h>
> DEBUG: | int
> DEBUG: | main(void)
> DEBUG: | {
> DEBUG: | clock();
> DEBUG: | ;
> DEBUG: | return 0;
> DEBUG: | }
> DEBUG: Executing: `/usr/pkg/bin/clang --target=wasm32-wasi /tmp/conftesty0vio0nr.c -Werror -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks --sysroot=/usr/pkg/wasi`
> DEBUG: The command returned non-zero exit status 1.
> DEBUG: Its error output was:
> DEBUG: | clang: error: argument '--target=wasm32-wasi' is deprecated, use --target=wasm32-wasip1 instead [-Werror,-Wdeprecated]
> ERROR: Can't find clock() in wasi sysroot.
>
> Any ideas how to pass the correct command argument?
>
> Cheers,
> Pedro
So apparently, this was an issue up-to firefox-xxx
Found this patch used on Arch Linux
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alex Hochheiden <ahochheiden%mozilla.com@localhost>
Date: Wed, 1 Apr 2026 18:11:37 +0000
Subject: [PATCH] Bug 2023597 - Use `wasm32-wasip1` target for clang >= 22.1
r=firefox-build-system-reviewers,sergesanspaille
https://github.com/llvm/llvm-project/pull/165345
https://releases.llvm.org/22.1.0/tools/clang/docs/ReleaseNotes.html
Differential Revision: https://phabricator.services.mozilla.com/D291023
---
build/moz.configure/toolchain.configure | 3 +++
1 file changed, 3 insertions(+)
diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure
index a37ed610cc43..c7d0c8bdf75c 100644
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -695,6 +695,9 @@ def check_compiler(configure_cache, compiler, language, target, android_version)
# This makes clang define __ANDROID_API__ and use versioned library
# directories from the NDK.
toolchain = "%s%d" % (target.toolchain, android_version)
+ elif target.kernel == "WASI" and info.type == "clang" and info.version >= Version("22.1"):
+ # The wasm32-wasi target was renamed to wasm32-wasip1 in LLVM 22.1.
+ toolchain = "wasm32-wasip1"
else:
toolchain = target.toolchain
Home |
Main Index |
Thread Index |
Old Index