Arctic-Fox
Arctic-Fox copied to clipboard
amd64 Void Linux musl build failed, same problem with gcc12 & llvm/clang12
After several weeks experimenting with Pale Moon, it compiled, but didn't execute due to linking errors I assume (it was unable to find the liblgpllibs which lie in the same dir). I gave up and decided to try this browser, because I don't think Pale Moon devs will provide any help when I show them my config (too different from the default). So, I'm here, trying to build this browser with the following config, not too far from what is the default linux-amd64 in the repo:
export CC="gcc"
export CXX="g++"
mk_add_options MOZ_MAKE_FLAGS="-s -j4"
ac_add_options --disable-crashreporter
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-updater
ac_add_options --disable-mozril-geoloc
ac_add_options --disable-webrtc
ac_add_options --disable-safe-browsing
ac_add_options --disable-parental-controls
ac_add_options --enable-release
ac_add_options --disable-necko-wifi
ac_add_options --disable-eme
ac_add_options --disable-gamepad
ac_add_options --disable-dbus
ac_add_options --disable-gio
ac_add_options --disable-pulseaudio
ac_add_options --disable-gstreamer
ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-application=browser
ac_add_options --with-branding=browser/branding/arcticfox
ac_add_options --enable-optimize="-g0 -O2 -pipe -march=native -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
With the following result (seems like it was truncated for some reason, but you can see the final error I suppose). I'm in no way an expert in C or C++, so I have no idea what is the problem here, but it was the same regardless of whether I used clang or gcc. I would prefer to use clang because it has more security hardening options, but if it can't be helped and I need gcc then sure, I will use it.
checked gcc6 available in the repos, looks like a very similar problem happens: gcc6-output.txt
hmm.... gcc6 works fine for me on most systems, I don't know which other compiler did you attempt. I don't have void, but I do try Alpine Linux. I have issues which might me due to musl, but I don't see why.
How can you do the compiling with Musl? Could you share your mozconfig?
I compile with the following mozconfig on 3.17 Alpine linux. Compilation fails for errors inside mozspell/hunspell.
export CXX="g++ -march=pentium4 -mtune=pentium4"
#mk_add_options MOZ_MAKE_FLAGS="-s -j4"
ac_add_options --enable-gold
ac_add_options --disable-crashreporter
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-updater
ac_add_options --disable-mozril-geoloc
ac_add_options --disable-webrtc
ac_add_options --disable-safe-browsing
ac_add_options --disable-parental-controls
ac_add_options --enable-release
ac_add_options --disable-necko-wifi
ac_add_options --disable-eme
ac_add_options --disable-gamepad
ac_add_options --disable-dbus
ac_add_options --disable-gio
ac_add_options --disable-pulseaudio
ac_add_options --disable-gconf
ac_add_options --disable-gstreamer
#ac_add_options --enable-strip
#ac_add_options --enable-install-strip
ac_add_options --enable-application=browser
ac_add_options --with-branding=browser/branding/arcticfox
ac_add_options --enable-optimize="-O2 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
# System libraries
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-icu
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
#ac_add_options --enable-system-hunspell
#ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman
-ggdb -O1 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2
worked for me with 45.1 on ppc musl, using GCC 13.3.1.
You should be able to use my optimization string having -O2, tested on multiple platforms, then it disables specific optimisations which may cause issues (but don't anymore on gcc 13/gcc14 on Linux 64bit). Otherwise you can use -O1.