I have tested various linkers. The Flatpak runtime default linker is gold - it doesn't link with the Oolite deployment build.
lld 20 and 21 both cause a segmentation fault when the game starts. I have created an issue with the LLVM Project and with libobjc2 in case the problem somehow is there which seems unlikely.
ld (bfd) the standard linker works in all cases including flatpak. I also tested mold and it works on Ubuntu and flatpak.
ld, mold work. lld, gold don't
Moderators: another_commander, winston, Getafix
Re: ld, mold work. lld, gold don't
I learnt something new. You can make a reproducible tar to recreate problems with linkers.
To do this in GNUmakefile set:
Comment these link time optimisation lines in that file:
Run
Copy the Resources folder from an existing oolite.app to the unpacked rep.tar folder.
Then you can do
You can test different linkers eg.
I've created a reproduce tar for the issue I raised with LLVM project: https://github.com/llvm/llvm-project/is ... 3695092366
To do this in GNUmakefile set:
Code: Select all
ADDITIONAL_LDFLAGS = -fuse-ld=lld
ADDITIONAL_LDFLAGS += -Wl,--reproduce=/tmp/rep.tar
Code: Select all
ifeq ($(lto),yes)
ADDITIONAL_CFLAGS += -flto
ADDITIONAL_OBJCFLAGS += -flto
ADDITIONAL_CCFLAGS += -flto
ADDITIONAL_LDFLAGS += -flto
endif
make -f Makefile release-deployment then unpack the /tmp/rep.tar file produced.Copy the Resources folder from an existing oolite.app to the unpacked rep.tar folder.
Then you can do
ld.lld @response.txt to produce the oolite executable.You can test different linkers eg.
mold @response.txt or ld.bfd @response.txt for the gcc linker.I've created a reproduce tar for the issue I raised with LLVM project: https://github.com/llvm/llvm-project/is ... 3695092366
Re: ld, mold work. lld, gold don't
see https://lwn.net/Articles/1007541/binutils 2.44 release notes wrote:Perhaps the most significant change is the absence of the "gold" linker, which is deprecated and about to disappear entirely. Gold appeared in 2008 with some fanfare as a faster linker, but it has suffered from a lack of maintenance in recent years.
Don't bother with gold linker.
OS : Arch Linux 64-bit - rolling release
From: The Netherlands, Europe
OXPs : My user page (needs updating)
Retired, occasionally active
From: The Netherlands, Europe
OXPs : My user page (needs updating)
Retired, occasionally active
Re: ld, mold work. lld, gold don't
I wouldn't have bothered with gold, but surprisingly, it is still the standard linker in the flatpak runtime which prompted this investigation.Lone_Wolf wrote: ↑Mon Dec 29, 2025 2:02 pmsee https://lwn.net/Articles/1007541/binutils 2.44 release notes wrote:Perhaps the most significant change is the absence of the "gold" linker, which is deprecated and about to disappear entirely. Gold appeared in 2008 with some fanfare as a faster linker, but it has suffered from a lack of maintenance in recent years.
Don't bother with gold linker.
