Closed Bug 2061070 Opened 3 months ago Closed 3 months ago

After bug 1977771, local Windows builds fail with: Can't find clock() in wasi sysroot.

Categories

(Firefox Build System :: Toolchains, defect)

defect

Tracking

(firefox-esr140 unaffected, firefox-esr153 unaffected, firefox153 unaffected, firefox154 unaffected, firefox155 fixed)

RESOLVED FIXED
155 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox153 --- unaffected
firefox154 --- unaffected
firefox155 --- fixed

People

(Reporter: Jamie, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

# I ran mach bootstrap first to ensure everything was up to date.
$ mach build
...
checking for the target C++ compiler... C:/Users/jamie/.mozbuild/clang/bin/clang-cl.exe
...
checking the target C++ compiler version... 21.1.8
...
checking for clock() in wasi sysroot... no
checking for emulated clock() in wasi sysroot...
...
DEBUG: Executing: `C:/Users/jamie/.mozbuild/sccache/sccache.exe C:/Users/jamie/.mozbuild/clang/bin/clang.exe --target=wasm32-wasi 'C:\Users\jamie\AppData\Local\Temp\conftestvhm2p5bn.c' -Werror -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks --sysroot=C:/Users/jamie/.mozbuild/sysroot-wasm32-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.

Reverting git commit 36abd325b3cb498251a36a5cbb91425cdd3d82fb fixes this.

Set release status flags based on info from the regressing bug 1977771

:glandium, since you are the author of the regressor, bug 1977771, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

checking the target C++ compiler version... 21.1.8

This doesn't line up.

Flags: needinfo?(mh+mozilla)

(In reply to Mike Hommey [:glandium] from comment #2)

checking the target C++ compiler version... 21.1.8

This doesn't line up.

I don't know what to tell you. :) I ran mach bootstrap and let it do all the things and this is the version it gave me for a full desktop build (not artifact). But then I don't understand why it was failing with the wasm32-wasi error because I thought that was only a problem with clang 22. 😕 I even tried this multiple times because I lost the log the first time, so I had to run it later in a separate checkout and still hit the same issue until I reverted the patch.

Ok, this is probably a configure.cache problem. A clobber, or more simply, removing $objdir/configure.cache should fix it.

Some code paths led to try_invoke_compiler with the compiler wrapper
added to the compiler command rather than separately in the wrapper
argument. When that happens, try_invoke_compiler is keying the cache on
the wrapper version rather than the compiler version, which leads to
stale cache cases, especially when the compiler version changes compared
to the previous build.

Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Pushed by mh@glandium.org: https://github.com/mozilla-firefox/firefox/commit/680234c423ed https://hg.mozilla.org/integration/autoland/rev/3fee671b9e79 Key the configure compiler cache on the compiler rather than its wrapper. r=firefox-build-system-reviewers,sergesanspaille
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: