BrowserWorks / Waterfox

The official Waterfox 💧 source code repository

Home Page:https://www.waterfox.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

building fails in gecko profiler

Manoa1911 opened this issue · comments

commented

What happened?

I tested versions 4, 5, 6, all have the same problem (4 has a slightly different problem, it fails on pk11 includes)

I already tried to toggle:
mk_add_options MOZ_GECKO_PROFILER=1
mk_add_options MOZ_GECKO_PROFILER_PARSE_ELF=1
and also tried to remove it both from the mozconfig and also from mozilla-config.h - no effect
./mach configure --release --without-wasm-sandboxed-libraries
platform is CRUX Linux x86_64

I also tried with the original firefox 114.0.2, same error
I compiled NSPR and NSS (4.34.1 / 3.99)

thank you

Reproducible?

  • I have checked that this issue cannot be reproduced on Mozilla Firefox.

Version

Other

What platform are you seeing the problem on?

Linux

Relevant log output

error[E0412]: cannot find type `SpliceableJSONWriter` in module `mozilla::baseprofiler`
 4:37.68   --> tools/profiler/rust-api/src/gecko_bindings/glue.rs:18:46
 4:37.68    |
 4:37.68 18 |     json_writer: &mut mozilla::baseprofiler::SpliceableJSONWriter,
 4:37.68    |                                              ^^^^^^^^^^^^^^^^^^^^ not found in `mozilla::baseprofiler`
 4:37.68 error[E0412]: cannot find type `SpliceableJSONWriter` in module `mozilla::baseprofiler`
 4:37.68   --> tools/profiler/rust-api/src/gecko_bindings/glue.rs:36:46
 4:37.68    |
 4:37.69 36 |     json_writer: &mut mozilla::baseprofiler::SpliceableJSONWriter,
 4:37.69    |                                              ^^^^^^^^^^^^^^^^^^^^ not found in `mozilla::baseprofiler`
 4:37.69 error[E0425]: cannot find function `gecko_profiler_marker_schema_stream` in module `bindings`

ac_add_options --with-libclang-path=/mnt/apps/llvm-18/lib
mk_add_options MOZ_OBJDIR=/mnt/wf/waterfox-build/build
ac_add_options --prefix=/mnt/apps/wf6-1
mk_add_options AUTOCLOBBER=1
mk_add_options MOZ_PARALLEL_BUILD=13
mk_add_options MOZ_ENABLE_WARNINGS_AS_ERRORS=0
mk_add_options MOZ_GECKO_PROFILER=0
mk_add_options MOZ_GECKO_PROFILER_PARSE_ELF=0 
unset MOZ_TELEMETRY_REPORTING
ac_add_options --disable-bootstrap
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --disable-warnings-as-errors
ac_add_options --disable-pulseaudio
ac_add_options --disable-audio-backends
ac_add_options --disable-alsa
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman
ac_add_options --with-system-icu
ac_add_options --with-system-libevent
#ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-webp
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-zlib
ac_add_options --disable-av1
ac_add_options --without-av1

Do you want to use the profiler or are you just trying to build Waterfox and the profiler is causing build issues?

You can try adding ac_add_options --disable-gecko-profiler and maybe disable-profiling while you're at it as well, to the mozconfig to see if it'll build.

commented

I could not find documentation for the LLVM requirement -DLLVM_TARGETS_TO_BUILD:STRING="X86;WebAssembly"
once it was added I managed to build, but not waterfox :( only FF 126b4
and this does solves this specific problem, FF lately using verry heavily LLVM/Clang I didden't expected it to no longer be at all possible to build with GCC, in the end I could not build any version of waterfox, because once this problem is solved, it for some reason failed on bindings of p11 :(

I could not find complete build instructions with all requirements :( I saw not a single page where it says LLVM must be built with wasm. and building with GCC - I guess LLVM/Clang is mutch bether this days, they wouldn't choosed it if it wasen't I guess to keep alife compatibility with GCC building was useless because the project depends so mucth on LLVM things so even GCC build would need LLVM with wasm

since this problem was not specific to waterfox I opened it on bugzila for FF, too: https://bugzilla.mozilla.org/show_bug.cgi?id=1892724

the real problem in the end was missing build instructions
I guess once you update waterfox to FF 126 it will be able to build it as well :)

but missing wasm software in LLVM should been detected in configure stage and informed the builder...

Ah yes I remember now! I used to have a custom built LLVM toolchain, but also ran into this; so I switched to using the bootstrapped tools.

You can see how clang is built here: https://searchfox.org/mozilla-central/source/build/build-clang/build-clang.py

commented

FF and waterfox is able to build his own LLVM ? that's nice :)