Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vl-ms opened this issue Jan 17, 2023 · 8 comments
Open

Comments

@vl-ms
Copy link

vl-ms commented Jan 17, 2023

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
Copy link
Author

vl-ms commented Jan 17, 2023

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

@rmottola
Copy link
Owner

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.

@xplshn
Copy link

xplshn commented Jun 4, 2023

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

@rmottola
Copy link
Owner

rmottola commented Jun 8, 2023

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

@awilfox
Copy link

awilfox commented Oct 22, 2024

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

@rmottola
Copy link
Owner

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
Copy link
Owner

@awilfox I was able to import certain header fixes, this improved situation on FreeBSD and OpenBSD where now a GCC build works (but not a clang build). The MUSL error was identical to the Clang. Still, worth a test if you want to check out dev with and without your fix..

@xplshn
Copy link

xplshn commented Dec 14, 2024

Hi, a list of packages for that are needed to build in Alpine would be helpful ;)

I'm about to try to compile ArcticFox yet again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants