Closed Bug 1759544 Opened 3 years ago Closed 3 years ago

ERROR: Cannot find a wasi sysroot. Please give its location with --with-wasi-sysroot. on mozilla-release

Categories

(Firefox Build System :: General, defect)

Firefox 98
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1740139

People

(Reporter: pmenzel+bugzilla.mozilla.org, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0

Steps to reproduce:

Download Firefox 98.0 and try to build it. To work around the error

ERROR: Cannot find a wasi sysroot. Please give its location with --with-wasi-sysroot. Or build with --without-wasm-sandboxed-libraries.

I passed --enable-bootstrap as recommended in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1744197.

Actual results:

The error is still there:

 0:03.90 Adding configure options from /dev/shm/bee-pmenzel/firefox/firefox-98.0-0/source/mozconfig
 0:03.90   --prefix=/usr
 0:03.90   --enable-application=browser
 0:03.90   --disable-necko-wifi
 0:03.90   --enable-official-branding
 0:03.90   --enable-system-pixman
 0:03.90   --without-system-icu
 0:03.90   --without-system-nspr
 0:03.90   --disable-tests
 0:03.90   --enable-optimize
 0:03.90   --disable-crashreporter
 0:03.90   --disable-updater
 0:03.90   --enable-bootstrap
 0:03.90 checking for vcs source checkout... no
[…]
 0:19.30 ERROR: Cannot find a wasi sysroot. Please give its location with --with-wasi-sysroot. Or build with --without-wasm-sandboxed-libraries.
Error running mach:

    ['build']

Expected results:

I understand, the switch --enable-bootstrap should give a working build. Maybe, I am mistaken. GNU/Linux distribution like Fedora disable that feature. From Firefox 95 on POWER:

The big new feature, besides speculative AOT JIT which doesn't apply to us yet, is RLBox, which compiles certain third-party libraries into safe WebAssembly, and then compiles them back into C, so they can be compiled a third time into pre-sanitized native code. This has obvious security benefits and the performance impact shouldn't be especially large, but it adds yet another build-time prerequisite: the WASI SDK. This kind of really sucks because now you have to have a third toolchain (it builds one whether you like it or not) besides clang and our preferred compiler, gcc. Pending internal package support, some distros have chosen simply to disable this for the immediate future, even including Fedora.

Please find config.log attached.

Component: Untriaged → General
Product: Firefox → Firefox Build System

Oh, I see, thanks for the separate bug and log 👍
I'm afraid that this is caused by this bug, where we're unable to bootstrap when run outside of a VCS-based sourcedir (in other words, when building from a tarball instead of from a git/hg clone).

In the meantime, there's three workarounds:

  1. Easiest, but only viable if you don't need wasi sysroot support: just add ac_add_options --without-wasm-sandboxed-libraries to your mozconfig
  2. If you need wasi support, I'd recommend this: clone Firefox with hg, then hg up FIREFOX_98_0_1_RELEASE, then do a build - you probably still need ac_add_options --enable-bootstrap
  3. Finally, if you're more technically inclined, you can manually fetch the auto-bootstrapped libraries and configure your build to use them, but this is pretty challenging.
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: