librewolf/issues
25
145

www-clients/librewolf-150.0.1: Cannot find clock() in wasi sysroot #3005

Closed
opened 2026年04月28日 22:50:27 +02:00 by 0xPortal · 10 comments

LibreWolf Version

v150.0_p1-r1

Operating System

Gentoo

Installation Source / Package

Official Librewolf Repository (Debian/Ubuntu/Fedora/openSUSE)

Description

Compiling Librewolf from the official Gentoo repository fails with an error complaining about clock() not existing on wasi sysoot:

0:10.31 DEBUG: Creating `/var/tmp/portage/www-client/librewolf-150.0_p1-r1/temp/conftest_hwoahhl.c` with content:
 0:10.31 DEBUG: | #include <time.h>
 0:10.31 DEBUG: | int
 0:10.31 DEBUG: | main(void)
 0:10.31 DEBUG: | {
 0:10.31 DEBUG: | clock();
 0:10.31 DEBUG: | ;
 0:10.31 DEBUG: | return 0;
 0:10.31 DEBUG: | }
 0:10.31 DEBUG: Executing: `/usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang-22 --target=wasm32-wasi /var/tmp/portage/www-client/librewolf-150.0_p1-r1/temp/conftest_hwoahhl.c -Werror -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks --sysroot=/var/tmp/portage/www-client/librewolf-150.0_p1-r1/work/wasi-sdk-32.0-x86_64-linux/share/wasi-sysroot/ -nodefaultlibs -lc -lwasi-emulated-process-clocks -lc++ -lc++abi /var/tmp/portage/www-client/librewolf-150.0_p1-r1/work/wasi-sdk-32.0-x86_64-linux/lib/clang/22/lib/wasm32-unknown-wasi/libclang_rt.builtins.a`
 0:10.31 DEBUG: The command returned non-zero exit status 1.
 0:10.31 DEBUG: Its error output was:
 0:10.31 DEBUG: | x86_64-pc-linux-gnu-clang-22: error: argument '--target=wasm32-wasi' is deprecated, use --target=wasm32-wasip1 instead [-Werror,-Wdeprecated]
 0:10.31 ERROR: Can't find clock() in wasi sysroot.
 0:10.44 E *** Fix above errors and then restart with "./mach build"

This is on a Gentoo no-multilib profile with the following USE flags for Librewolf: www-client/librewolf eme-free hwaccel jpegxl openh264 system-pipewire system-png wasm-sandbox.

Logs / Screenshots

Attached build log.

Checklist

  • I have searched existing issues to ensure this hasn't been reported yet.
  • I have read the FAQ and confirmed my problem isn't addressed there.
### LibreWolf Version v150.0_p1-r1 ### Operating System Gentoo ### Installation Source / Package Official Librewolf Repository (Debian/Ubuntu/Fedora/openSUSE) ### Description Compiling Librewolf from the official Gentoo repository fails with an error complaining about `clock()` not existing on wasi sysoot: ``` 0:10.31 DEBUG: Creating `/var/tmp/portage/www-client/librewolf-150.0_p1-r1/temp/conftest_hwoahhl.c` with content: 0:10.31 DEBUG: | #include <time.h> 0:10.31 DEBUG: | int 0:10.31 DEBUG: | main(void) 0:10.31 DEBUG: | { 0:10.31 DEBUG: | clock(); 0:10.31 DEBUG: | ; 0:10.31 DEBUG: | return 0; 0:10.31 DEBUG: | } 0:10.31 DEBUG: Executing: `/usr/lib/llvm/22/bin/x86_64-pc-linux-gnu-clang-22 --target=wasm32-wasi /var/tmp/portage/www-client/librewolf-150.0_p1-r1/temp/conftest_hwoahhl.c -Werror -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks --sysroot=/var/tmp/portage/www-client/librewolf-150.0_p1-r1/work/wasi-sdk-32.0-x86_64-linux/share/wasi-sysroot/ -nodefaultlibs -lc -lwasi-emulated-process-clocks -lc++ -lc++abi /var/tmp/portage/www-client/librewolf-150.0_p1-r1/work/wasi-sdk-32.0-x86_64-linux/lib/clang/22/lib/wasm32-unknown-wasi/libclang_rt.builtins.a` 0:10.31 DEBUG: The command returned non-zero exit status 1. 0:10.31 DEBUG: Its error output was: 0:10.31 DEBUG: | x86_64-pc-linux-gnu-clang-22: error: argument '--target=wasm32-wasi' is deprecated, use --target=wasm32-wasip1 instead [-Werror,-Wdeprecated] 0:10.31 ERROR: Can't find clock() in wasi sysroot. 0:10.44 E *** Fix above errors and then restart with "./mach build" ``` This is on a Gentoo no-multilib profile with the following USE flags for Librewolf: `www-client/librewolf eme-free hwaccel jpegxl openh264 system-pipewire system-png wasm-sandbox`. ### Logs / Screenshots Attached build log. ### Checklist - [x] I have searched existing issues to ensure this hasn't been reported yet. - [x] I have read the [FAQ](https://librewolf.net/docs/faq/) and confirmed my problem isn't addressed there.

@doasu You got any idea?

@doasu You got any idea?

llvm22 doesn't seem to be fully supported on v150.0 (which was temporarily enabled due to an issue, but im guessing the maintainer didn't test with wasm-sandbox, also its not even enabled in the official gentoo repos), TheGreatMcPain seems to have updated to v150.0.1, which should properly work now:
librewolf/gentoo@1074520a31

curiously the ebuild is completely out of date from the official gentoo repos:
librewolf:
FIREFOX_PATCHSET="firefox-150-patches-01.tar.xz"
LLVM_COMPAT=( 20 21 )

gentoo:
FIREFOX_PATCHSET="firefox-150-patches-02.tar.xz"
LLVM_COMPAT=( 21 22 )

also a temporary fix would be to not use wasm-sandbox (if youre comfortable with that)

llvm22 doesn't seem to be fully supported on v150.0 (which was temporarily enabled due to an issue, but im guessing the maintainer didn't test with wasm-sandbox, also its not even enabled in the official gentoo repos), TheGreatMcPain seems to have updated to v150.0.1, which should properly work now: https://codeberg.org/librewolf/gentoo/commit/1074520a31a7b025100bb529b07e6689b486606c curiously the ebuild is completely out of date from the official gentoo repos: librewolf: FIREFOX_PATCHSET="firefox-150-patches-01.tar.xz" LLVM_COMPAT=( 20 21 ) gentoo: FIREFOX_PATCHSET="firefox-150-patches-02.tar.xz" LLVM_COMPAT=( 21 22 ) also a temporary fix would be to not use wasm-sandbox (if youre comfortable with that)

@friendlyuser wrote in #3005 (comment):

curiously the ebuild is completely out of date from the official gentoo repos: librewolf: FIREFOX_PATCHSET="firefox-150-patches-01.tar.xz" LLVM_COMPAT=( 20 21 )

gentoo: FIREFOX_PATCHSET="firefox-150-patches-02.tar.xz" LLVM_COMPAT=( 21 22 )

That's because I copied it from Gentoo's www-client/firefox-150.0 ebuild:

FIREFOX_PATCHSET="firefox-150-patches-01.tar.xz"
LLVM_COMPAT=( 20 21 )
@friendlyuser wrote in https://codeberg.org/librewolf/issues/issues/3005#issuecomment-13976492: > curiously the ebuild is completely out of date from the official gentoo repos: librewolf: FIREFOX_PATCHSET="firefox-150-patches-01.tar.xz" LLVM_COMPAT=( 20 21 ) > > gentoo: FIREFOX_PATCHSET="firefox-150-patches-02.tar.xz" LLVM_COMPAT=( 21 22 ) That's because I copied it from Gentoo's `www-client/firefox-150.0` ebuild: https://codeberg.org/gentoo/gentoo/src/commit/3ea98d4b92eee2d3ab4589c39619d90468f296ab/www-client/firefox/firefox-150.0.ebuild#L6-L8

@any1here wrote in #3005 (comment):

@doasu You got any idea?

Not currently, sorry. :/
Sadly, I'll have limited availability until next week (2026年05月04日), so I'll only be able to take a proper look after that.

@any1here wrote in https://codeberg.org/librewolf/issues/issues/3005#issuecomment-13958120: > @doasu You got any idea? Not currently, sorry. :/ Sadly, I'll have limited availability until next week (2026年05月04日), so I'll only be able to take a proper look after that.

@doasu

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alex Hochheiden <ahochheiden@mozilla.com>
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
@doasu ``` From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Alex Hochheiden <ahochheiden@mozilla.com> 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 ```

@doasu wrote in #3005 (comment):

That's because I copied it from Gentoo's www-client/firefox-150.0 ebuild:

i was talking about v150.0.1, which includes the patch that fixes this exact issue.

basically, the librewolf-150.0.1_p1.ebuild is based off of firefox-150.0.ebuild and not firefox-150.0.1.ebuild, which is the issue.

@doasu wrote in https://codeberg.org/librewolf/issues/issues/3005#issuecomment-14007485: > That's because I copied it from Gentoo's `www-client/firefox-150.0` ebuild: i was talking about v150.0.1, which includes the patch that fixes this exact issue. basically, the `librewolf-150.0.1_p1.ebuild` is based off of `firefox-150.0.ebuild` and not `firefox-150.0.1.ebuild`, which is the issue.

@friendlyuser thanks for the explanation!
The issue's title is somewhat misleading. It mentions www-clients/librewolf-150, not 150.0.1 specifically.

If it's not too much of a problem, could you change it to be more specific?
E.g., www-clients/librewolf-150.0.1: Cannot find clock() in wasi sysroot, if that makes sense.

CC: @any1here

@friendlyuser thanks for the explanation! The issue's title is somewhat misleading. It mentions `www-clients/librewolf-150`, not `150.0.1` specifically. If it's not too much of a problem, could you change it to be more specific? E.g., `www-clients/librewolf-150.0.1: Cannot find clock() in wasi sysroot`, if that makes sense. CC: @any1here

Apologies, will update the title :)

Apologies, will update the title :)
0xPortal changed title from (削除) www-clients/librewolf-150: Cannot find clock() in wasi sysroot (削除ここまで) to www-clients/librewolf-150.0.1: Cannot find clock() in wasi sysroot 2026年04月30日 16:10:53 +02:00

@TheGreatMcPain @doasu It might be worth sticking to the same max clang version we build with, so you don't encounter issues like this in the future.

@TheGreatMcPain @doasu It might be worth sticking to the same max clang version we build with, so you don't encounter issues like this in the future.

Should be fixed now.

librewolf/gentoo@b998db4e5c

Should be fixed now. https://codeberg.org/librewolf/gentoo/commit/b998db4e5c093bddb23541eb5cccc7e48f9aa501
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
Branding
Issues that relate to our logo or the branding of our browser and website.
Broken Upstream
Issue is also present in Firefox
Build
Alpine
Issues specific to the Alpine Linux build of LibreWolf.
Build
AppImage
Issues specific to the AppImage release of LibreWolf.
Build
AUR
Issues specific to the AUR build of LibreWolf.
Build
Debian
Issues specific to our official release for Debian based distros.
Build
DebianOBS
Issues specific to the non-official OBS build of LibreWolf.
Build
Fedora
Issues specific to our official release for Fedora.
Build
FedoraCOPR
Issues specific to the non-official COPR build of LibreWolf.
Build
Flatpak
Issues specific to the Flatpak release of LibreWolf.
Build
Gentoo
Issues specific to the Gentoo build of LibreWolf.
Component: Infrastructure
Issues related to infrastructure provided by LibreWolf
Component
Builds
Issues related to how we build LibreWolf
Component
Patches
Issue with one of the patches in our source code.
Component
Settings
Issues related to the settings of LibreWolf.
Component
UI
A purely cosmetic issue in our browser.
Component
Website
Issues with our website.
Docs
Change required
A needed change in our documentation.
Docs
FYI
Issues that document a change, or how stuff gets patched, built or configured.
Flag
Caution
Change that might be tricky or that needs to be carefully evaluated. Best suited for core members.
Flag
Good first issue
Suited for a first contribution as it is a straightfoward task!
FreeBSD
Issues related to the FreeBSD release of LibreWolf.
Linux
Issues realted to one or all our Linux releases.
macOS
Issues realated to the MacOS release of LibreWolf.
Needed
Help
We are stuck :-(
Needed
Info
Closing in ten days if no details are provided.
Needed
Testing
We are almost there!
Prio
High
Issues with a high priority
Prio
Low
Prio
Normal
Prio/Urgent
Issues needing immediate attention
Repositories
An issue with our repositories.
Research
Collecting informations to document something or to evaluate a change.
Source
Issues related to the source code of LibreWolf.
Status
Blocked
An issue blocked by another one.
Status
Duplicate
Look for existing issues.
Status
Icebox
Change that is not happening soon or issue that cannot be tested.
Status
Known issue
An issue that we are aware of but that we cannot fix at the moment.
Status
Not Planned
The requested feature is currently not planned
Status
Upstream
Either we upstreamed the issue or a fix is coming directly from Mozilla!
Status
Won't fix
Does not require a fix.
Type
?
What?
Type
Bug
Ouch...
Type
Discussion
Let's have a talk...
Type
Feature
A feature request.
Type
Question
Not a issue but just a user question
Type
Task
This needs to be done
Windows
Issues related to the Windows release of Librewolf.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
librewolf/issues#3005
Reference in a new issue
librewolf/issues
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?