[Bug 2152147] Re: Broken wasm32-wasi(p1) support

Max Gilmour 2152147 at bugs.launchpad.net
Thu May 28 22:23:50 UTC 2026


Convenient minimal steps to reproduce (tested in fresh 26.04 LTS
install):

$ apt update
$ apt install -y clang-22 libclang-rt-22-dev-wasm32 libc++-22-dev-wasm32 lld-22
$ touch test.c
$ clang-22 --target=wasm32-wasip1 test.c

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to llvm-toolchain-22 in Ubuntu.
Matching subscriptions: llvm-toolchain-22
https://bugs.launchpad.net/bugs/2152147

Title:
  Broken wasm32-wasi(p1) support

Status in llvm-toolchain-22 package in Ubuntu:
  In Progress
Status in llvm-toolchain-22 source package in Resolute:
  In Progress
Status in llvm-toolchain-22 source package in Stonking:
  In Progress

Bug description:
  This concerns clang-22 version 1:22.1.2-1ubuntu1 in Ubuntu resolute.

  In configuring a Firefox build using this compiler, I got the
  following error:

    DEBUG: Executing: `/usr/bin/clang-22 --target=wasm32-wasi /tmp/conftesti06p4gt_.c -Werror -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks`
    DEBUG: The command returned non-zero exit status 1.
    DEBUG: Its error output was:
    DEBUG: | clang-22: error: argument '--target=wasm32-wasi' is deprecated, use --target=wasm32-wasip1 instead [-Werror,-Wdeprecated]
    ERROR: Can't find clock() in wasi sysroot.
    make[3]: *** [debian/rules:232: stamps/configure-browser] Error 1

  Okay, so wasm32-wasi is a deprecated target, I'll make the build use
  wasm32-wasip1. But then:

    DEBUG: Executing: `/usr/bin/clang-22 --target=wasm32-wasip1 /tmp/conftestdc13dov3.c`
    DEBUG: The command returned non-zero exit status 1.
    DEBUG: Its error output was:
    DEBUG: | wasm-ld-22: error: cannot open /usr/lib/llvm-22/lib/clang/22/lib/wasm32-unknown-wasip1/libclang_rt.builtins.a: No such file or directory
    DEBUG: | clang-22: error: linker command failed with exit code 1 (use -v to see invocation)
    ERROR: Cannot find wasi libraries or problem with the wasm linker. Please fix the problem. Or build with --without-wasm-sandboxed-libraries.
    make[3]: *** [debian/rules:232: stamps/configure-browser] Error 1

  Hmm. I see that there is a

    /usr/lib/llvm-22/lib/clang/22/lib/wasi/libclang_rt.builtins-wasm32.a

  library, but not a

    /usr/lib/llvm-22/lib/clang/22/lib/wasm32-unknown-
  wasip1/libclang_rt.builtins.a

  one. The linker should probably be looking for the former.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-22/+bug/2152147/+subscriptions




More information about the foundations-bugs mailing list