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



Applying the Arch patch

$NetBSD$

Fix build will llvm22.

--- build/moz.configure/toolchain.configure.orig	2026-05-29 05:17:49.268362448 +0000
+++ build/moz.configure/toolchain.configure
@@ -695,6 +695,8 @@ def check_compiler(configure_cache, compiler, language
         # 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"):
+        toolchain = "wasm32-wasip1"
     else:
         toolchain = target.toolchain
 

takes me a bit further but now it fails with:

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...
DEBUG: Creating `/tmp/conftest6vwsc_0w.c` with content:
DEBUG: | #include <string.h>
DEBUG: | int
DEBUG: | main(void)
DEBUG: | {
DEBUG: |
DEBUG: |   ;
DEBUG: |   return 0;
DEBUG: | }
DEBUG: Executing: `/usr/pkg/bin/clang --target=wasm32-wasip1 /tmp/conftest6vwsc_0w.c --sysroot=/usr/pkg/wasi -c`
DEBUG: The command returned non-zero exit status 1.
DEBUG: Its error output was:
DEBUG: | /tmp/conftest6vwsc_0w.c:1:10: fatal error: 'string.h' file not found
DEBUG: |     1 | #include <string.h>
DEBUG: |       |          ^~~~~~~~~~
DEBUG: | 1 error generated.
ERROR: Cannot find wasi headers or problem with the wasm compiler. Please fix the problem. Or build with --without-wasm-sandboxed-libraries.


Home | Main Index | Thread Index | Old Index