-
-
Notifications
You must be signed in to change notification settings - Fork 464
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
dolphin-emu build seems to output a bad binary when using mold 1.1 #360
Comments
Thank you for your report. If it fails with an illegal instruction error, it is very likely that mold corrupted the binary. However, unfortunately, I couldn't reproduce the issue by checking out dolphin-emu from https://github.com/dolphin-emu/dolphin and built on my machine. If you check it out from the git repository and build it yourself, does it still fail? Here is what I did:
|
Building with your instructions seems to work fine. |
I exported all your variables as below, but it still succeeded.
What am I missing? |
Honestly not sure... Using the default arch makepkg flags also results in the same issue when For Reference these are the defaults for
Could be CPU-family specific unless you're also on Ryzen. Appears to be isolated to $ echo $CFLAGS
-fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection $ echo $CXXFLAGS
-fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS Which means that getting rid of $ gcc --help=optimizers | grep fno-plt
-fplt Use PLT for PIC calls (-fno-plt: load the address from GOT at call site). Rerunning the AUR installation of Haven't seen other builds with similar behavior quite yet but I only just recently swapped over to And just to sanity check, here's the $ readelf -p .comment /usr/bin/dolphin-emu
String dump of section '.comment':
[ 0] GCC: (GNU) 11.2.0
[ 12] mold 1.1 (89612b709638b90c8a044e2f96f47d28054ba789; compatible with GNU ld) |
Thanks! I added |
To verify the fix, please rebuild mold after |
$ paru -Ss mold-git
aur/mold-git v1.0.1_11_g4ccbd24c-1 [+4 ~0.37] [Installed: v1.1_14_g9f348308-1]
A Modern Linker Clean install of $ dolphin-emu --version
Dolphin 5.0-16081 $ readelf -p .comment /usr/bin/dolphin-emu
String dump of section '.comment':
[ 0] GCC: (GNU) 11.2.0
[ 12] mold 1.1 (9f3483088206dd6f939d7b2c090570cf1f83d728; compatible with GNU ld) All is well! |
As stated in the title, building dolphin-emu appears to spit out a corrupted binary when using
mold
.$ mold -v mold 1.1 (89612b709638b90c8a044e2f96f47d28054ba789; compatible with GNU ld)
(Clean/purged build from
dolphin-emu-git
AUR package.)$ paru -Ss dolphin-emu-git aur/dolphin-emu-git 5.0.r15933.g900a0b0eee-1 [+111 ~2.53] [Installed: 5.0.r16081.g5b3b6a7f1d-1] A Gamecube / Wii emulator - git version
Does not work. Instant core dump.
Removed
-B/usr/lib/mold
fromCFLAGS
(Clean/purged build from
dolphin-emu-git
AUR package.)$ readelf -p .comment /usr/bin/dolphin-emu String dump of section '.comment': [ 0] GCC: (GNU) 11.2.0
$ paru -Ss dolphin-emu-git aur/dolphin-emu-git 5.0.r15933.g900a0b0eee-1 [+111 ~2.53] [Installed: 5.0.r16081.g5b3b6a7f1d-1] A Gamecube / Wii emulator - git version
Works and runs successfully.
Disabling LTO via
-fno-lto
doesn't seem to help either as the result is the same.The text was updated successfully, but these errors were encountered: