Arctic-Fox icon indicating copy to clipboard operation
Arctic-Fox copied to clipboard

amd64 Void Linux musl build failed, same problem with gcc12 & llvm/clang12

Open vl-ms opened this issue 2 years ago • 4 comments

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.

vl-ms avatar Jan 17 '23 13:01 vl-ms

checked gcc6 available in the repos, looks like a very similar problem happens: gcc6-output.txt

vl-ms avatar Jan 17 '23 14:01 vl-ms

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.

rmottola avatar Mar 14 '23 23:03 rmottola

How can you do the compiling with Musl? Could you share your mozconfig?

xplshn avatar Jun 04 '23 20:06 xplshn

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

rmottola avatar Jun 08 '23 23:06 rmottola

-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.

awilfox avatar Oct 22 '24 23:10 awilfox

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.

rmottola avatar Oct 24 '24 22:10 rmottola