browser
browser copied to clipboard
Gluon build doesn't build
Gluon gets stuck here. The CPU doesn't show any work being done.
$ node node_modules/gluon-build/dist/index.js build
WARNING Latest version of Firefox (107.0) does not match frozen version (106.0.5).
WARNING You have not imported all of your patches. This may lead to unexpected behavior
✔ Are you sure you want to continue? … yes
00:00:05 Applying mozconfig...
00:00:05 Dynamic config 'brand not set, defaulting to 'unofficial'
00:00:05 Dynamic config 'buildMode not set, defaulting to 'dev'
00:00:05 Config for this `linux` build:
00:00:05 --with-ccache=sccache
00:00:05 --without-wasm-sandboxed-libraries
00:00:05 --with-app-basename="Pulse Browser"
00:00:05 --with-app-name=pulse-browser
00:00:05 MOZ_USER_DIR="Pulse browser"
00:00:05 MOZ_APP_VENDOR="Pulse browser"
00:00:05 MOZ_APP_BASENAME=PulseBrowser
00:00:05 MOZ_APP_PROFILE=pulse-browser
00:00:05 MOZ_APP_DISPLAYNAME="Pulse browser"
00:00:05 MOZ_MACBUNDLE_ID=com.fushra.browser.desktop
00:00:05 MOZ_DISTRIBUTION_ID=com.fushra.browser.desktop
00:00:05 MOZ_MACBUNDLE_NAME="Pulse browser.app"
00:00:05 MOZ_INCLUDE_SOURCE_INFO=1
00:00:05 MOZ_REQUIRE_SIGNING=
00:00:05 MOZ_SOURCE_REPO=https://github.com/pulse-browser/browser
00:00:05 MOZ_SOURCE_CHANGESET=d9f66264442f94fc8e71b4e89285b0f8182ceb88
00:00:05 --disable-debug
00:00:05 --disable-geckodriver
00:00:05 --disable-profiling
00:00:05 --disable-tests
00:00:05 --with-branding=browser/branding/unofficial
00:00:05 --enable-unverified-updates
00:00:05 --enable-update-channel=unofficial
00:00:05 MOZ_APPUPDATE_HOST=updates.pulsebrowser.app
00:00:05 Starting build...
00:00:05 Building for "linux"...
WARNING If you get any dependency errors, try running |gluon bootstrap|.
Try running:
cd engine
./mach bootstrap # (select regular browser, 2)
cd ..
@trickypr Thanks, I got further into the build, but it failed compiling gkrust:
$ cd engine/toolkit/library/rust
$ cargo build --release
...
Compiling num-traits v0.2.15
Compiling cc v1.0.73
Compiling encoding_rs v0.8.31
error: environment variable `BUILDCONFIG_RS` not defined
--> build/rust/mozbuild/lib.rs:13:14
|
13 | include!(env!("BUILDCONFIG_RS"));
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find value `TOPOBJDIR` in module `config`
--> build/rust/mozbuild/lib.rs:8:76
|
8 | pub static TOPOBJDIR: Lazy<&'static Path> = Lazy::new(|| Path::new(config::TOPOBJDIR));
| ^^^^^^^^^ not found in `config`
error[E0425]: cannot find value `TOPSRCDIR` in module `config`
--> build/rust/mozbuild/lib.rs:10:76
|
10 | pub static TOPSRCDIR: Lazy<&'static Path> = Lazy::new(|| Path::new(config::TOPSRCDIR));
| ^^^^^^^^^ not found in `config`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `mozbuild` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
This isn't something you do with gluon. Gluon is used from the base directory (e.g. $HOME/gluonproject) and generally trying to compile Firefox with cargo in the engine/ directory always fails with that error.
Did the actual gluon build
still not finish?
Did the actual
gluon build
still not finish?
gluon build
failed. I then ran mach build
from the engine
directory and it outputed:
./mach build
0:02.04 Clobber not needed.
0:04.15 Adding make options from /home/yonas/git/pulse-browser/engine/mozconfig
MOZ_OBJDIR=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu
OBJDIR=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu
FOUND_MOZCONFIG=/home/yonas/git/pulse-browser/engine/mozconfig
export FOUND_MOZCONFIG
Parallelism determined by memory: using 4 jobs for 4 cores based on 11.7 GiB RAM and estimated job size of 1.0 GiB
0:04.15 /usr/bin/gmake -f client.mk -j4 -s
0:04.64 Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:04.64 Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:05.24 Elapsed: 0.61s; From _tests: Kept 648 existing; Added/updated 0; Removed 0 files and 0 directories.
0:06.90 Elapsed: 2.04s; From dist/bin: Kept 3014 existing; Added/updated 0; Removed 0 files and 0 directories.
0:07.21 Elapsed: 2.59s; From dist/include: Kept 6575 existing; Added/updated 0; Removed 0 files and 0 directories.
0:07.28 ./buildid.h.stub
0:07.28 ./source-repo.h.stub
0:07.55 ./application.ini.stub
0:07.61 ./IsCombiningDiacritic.h.stub
0:07.64 ./dap_ffi_generated.h.stub
0:07.81 ./application.ini.h.stub
0:08.56 toolkit/library/rust/force-cargo-library-build
0:08.85 browser/app
0:21.89 Compiling gkrust v0.1.0 (/home/yonas/git/pulse-browser/engine/toolkit/library/rust)
0:24.37 toolkit/library/buildid.cpp.stub
0:25.82 browser/app/pulse-browser
0:26.44 toolkit/library
TIER: pre-export export compile misc libs tools
7:53.64 sccache: Compiler killed by signal 9
7:53.68 error: could not compile `gkrust`
7:53.68 Caused by:
7:53.68 process didn't exit successfully: `/home/yonas/.mozbuild/sccache/sccache /home/yonas/snap/rustup/common/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name gkrust toolkit/library/rust/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type staticlib --emit=dep-info,link -C opt-level=2 -C panic=abort -C embed-bitcode=no -Clto -C metadata=5735dba91e816f82 -C extra-filename=-5735dba91e816f82 --out-dir /home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/home/yonas/git/pulse-browser/engine/build/cargo-linker -L dependency=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/release/deps --extern gkrust_shared=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libgkrust_shared-f81384812f4cccdc.rlib --extern lmdb_sys=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/liblmdb_sys-fdc405d39ade55c6.rlib --extern mozglue_static=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libmozglue_static-4ac5ea49a47ff282.rlib --extern mozilla_central_workspace_hack=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libmozilla_central_workspace_hack-ef06490bc3a72575.rlib --extern swgl=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libswgl-c181a8e154d72405.rlib -C debuginfo=2 --cap-lints warn -Cembed-bitcode=yes -C codegen-units=1 -L native=/usr/lib/x86_64-linux-gnu -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/audioipc-29477cbfb4e39ec8/out -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/audioipc2-4a2598f9c6c3e321/out -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/lmdb-rkv-sys-1fc27f0f3ac9687c/out -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/mozglue-static-2ea9b3ed76399642/out -L native=/usr/lib/x86_64-linux-gnu -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/dist/bin -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/security/nss/lib/nss/nss_nss3 -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/security/nss/lib/ssl/ssl_ssl3 -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/config/external/nspr/pr -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/swgl-aff8a6b11bee6e68/out` (exit status: 254)
7:54.10 gmake[4]: *** [/home/yonas/git/pulse-browser/engine/config/makefiles/rust.mk:433: force-cargo-library-build] Error 101
7:54.10 gmake[3]: *** [/home/yonas/git/pulse-browser/engine/config/recurse.mk:72: toolkit/library/rust/target] Error 2
7:54.10 gmake[2]: *** [/home/yonas/git/pulse-browser/engine/config/recurse.mk:34: compile] Error 2
7:54.10 gmake[1]: *** [/home/yonas/git/pulse-browser/engine/config/rules.mk:361: default] Error 2
7:54.11 gmake: *** [client.mk:63: build] Error 2
7:54.13 402 compiler warnings present.
7:54.70 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Build failed
Did you run mach bootstrap
as said in TrickyPR's comment?
@splatboydev Yes, that's why I was able to get further down the build.
I see. I'll quickly try and test this on my own linux env.
Try disabling sccache in the mozconfig (./configs/common/mozconfig) and running mach build
again.
# ac_add_options --with-ccache=sccache
@splatboydev Disabling sscache didn't fix the build:
./mach build
0:01.11 Clobber not needed.
0:03.24 Adding make options from /home/yonas/git/pulse-browser/engine/mozconfig
MOZ_OBJDIR=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu
OBJDIR=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu
FOUND_MOZCONFIG=/home/yonas/git/pulse-browser/engine/mozconfig
export FOUND_MOZCONFIG
Parallelism determined by memory: using 4 jobs for 4 cores based on 11.7 GiB RAM and estimated job size of 1.0 GiB
0:03.24 /usr/bin/gmake -f client.mk -j4 -s
0:03.68 Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:03.70 Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:04.33 Elapsed: 0.65s; From _tests: Kept 648 existing; Added/updated 0; Removed 0 files and 0 directories.
0:05.93 Elapsed: 2.08s; From dist/bin: Kept 3014 existing; Added/updated 0; Removed 0 files and 0 directories.
0:06.25 Elapsed: 2.54s; From dist/include: Kept 6575 existing; Added/updated 0; Removed 0 files and 0 directories.
0:06.32 ./buildid.h.stub
0:06.32 ./source-repo.h.stub
0:06.58 ./application.ini.stub
0:06.62 ./IsCombiningDiacritic.h.stub
0:06.63 ./dap_ffi_generated.h.stub
0:06.79 ./application.ini.h.stub
0:07.45 toolkit/library/rust/force-cargo-library-build
0:07.69 browser/app
0:17.25 browser/app/pulse-browser
0:17.44 Compiling gkrust v0.1.0 (/home/yonas/git/pulse-browser/engine/toolkit/library/rust)
6:47.01 sccache: Compiler killed by signal 9
6:47.09 error: could not compile `gkrust`
6:47.10 Caused by:
6:47.10 process didn't exit successfully: `/home/yonas/.mozbuild/sccache/sccache /home/yonas/snap/rustup/common/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name gkrust toolkit/library/rust/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type staticlib --emit=dep-info,link -C opt-level=2 -C panic=abort -C embed-bitcode=no -Clto -C metadata=5735dba91e816f82 -C extra-filename=-5735dba91e816f82 --out-dir /home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/home/yonas/git/pulse-browser/engine/build/cargo-linker -L dependency=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/release/deps --extern gkrust_shared=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libgkrust_shared-f81384812f4cccdc.rlib --extern lmdb_sys=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/liblmdb_sys-fdc405d39ade55c6.rlib --extern mozglue_static=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libmozglue_static-4ac5ea49a47ff282.rlib --extern mozilla_central_workspace_hack=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libmozilla_central_workspace_hack-ef06490bc3a72575.rlib --extern swgl=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/deps/libswgl-c181a8e154d72405.rlib -C debuginfo=2 --cap-lints warn -Cembed-bitcode=yes -C codegen-units=1 -L native=/usr/lib/x86_64-linux-gnu -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/audioipc-29477cbfb4e39ec8/out -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/audioipc2-4a2598f9c6c3e321/out -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/lmdb-rkv-sys-1fc27f0f3ac9687c/out -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/mozglue-static-2ea9b3ed76399642/out -L native=/usr/lib/x86_64-linux-gnu -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/dist/bin -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/security/nss/lib/nss/nss_nss3 -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/security/nss/lib/ssl/ssl_ssl3 -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/config/external/nspr/pr -L native=/home/yonas/git/pulse-browser/engine/obj-x86_64-pc-linux-gnu/x86_64-unknown-linux-gnu/release/build/swgl-aff8a6b11bee6e68/out` (exit status: 254)
6:47.65 gmake[4]: *** [/home/yonas/git/pulse-browser/engine/config/makefiles/rust.mk:433: force-cargo-library-build] Error 101
6:47.65 gmake[3]: *** [/home/yonas/git/pulse-browser/engine/config/recurse.mk:72: toolkit/library/rust/target] Error 2
6:47.65 gmake[2]: *** [/home/yonas/git/pulse-browser/engine/config/recurse.mk:34: compile] Error 2
6:47.66 gmake[1]: *** [/home/yonas/git/pulse-browser/engine/config/rules.mk:361: default] Error 2
6:47.66 gmake: *** [client.mk:63: build] Error 2
6:47.66 402 compiler warnings present.
6:48.23 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Build failed
It also needs to be disabled in the engine mozconfig, my bad.
It also needs to be disabled in the engine mozconfig, my bad.
What's the full path to that file?
engine/mozconfig?
error: could not compile
gkrust
gkrust
failing to compile is generally due to the host running out of memory. My recommendation is to close all other applications whilst it is compiling. If that fails, creating an extra swap file.
$ cd engine/toolkit/library/rust $ cargo build --release
Mach really doesn't like when things are being built without its specific configuration and you will end up running into package resolution errors.