Open jmcarcell opened 2 months ago
Hi @jmcarcell , how is the linker related to the command that fails for you? That is the invocation of rootcling, the generator of dictionaries. Could you confirm that the problem is there also if you do not export the LDFLAGS env variable?
I have no idea why that's happening but it's definitely that because building with LDFLAGS
empty (so using /usr/bin/ld
) works fine. I just checked and using lld
works fine, I'll add to the issue.
I reported this to mold in https://github.com/rui314/mold/issues/1270 and was able to compile by using a different linker for libCling.so
. However, many of the tests fail (with segmentation faults) so I think it's best not to allow compiling with mold at all.
Closed by #15689 and it's backport to 6.32.
We should apply the suggested fix in the bugreport submitted to the mold linker.
I just tried to build master with mold 2.32.0 (released last week) and it worked fine. Also, for some reason the CMakeLists check didn't prevent me from using mold as a linker, so I think it's defective. We should either remove it or fix it, and if we fix it we want to check for the mold version, since there's no point in disallowing mold >= 2.32.
Here is my cmake cmdline:
cmake -Ddev=on -Dtesting=on -Dccache=on -Droot7=on -Dbuiltin_davix=off -During=on -DCMAKE_BUILD_TYPE=debug -Dtmva=on -Droofit=on -Dbuiltin_pcre=off -Dbuiltin_zstd=on -Dbuiltin_lz4=off -Dbuiltin_lzma=off -Dbuiltin_xxhash=off -DCMAKE_EXE_LINKER_FLAGS='-fuse-ld=mold' -DCMAKE_SHARED_LINKER_FLAGS='-fuse-ld=mold' -DCMAKE_MODULE_LINKER_FLAGS='-fuse-ld=mold' -DCMAKE_EXPORT_COMPILE_COMMANDS=on -G Ninja ../../root
I then built with
mold -run cmake --build . -j32
I verified that mold was indeed called instead of the default linker by doing watch -n 0.5 pgrep mold
and watch -n 0.5 pgrep lld
: the first one showed some output several times during compilation, the second didn't.
Check duplicate issues.
Description
When using the mold linker there is a segmentation fault when running
rootcling
, like hereI haven't tried with
lld
to see if it also doesn't build. This is certainly not very important, but I'm reporting here in case someone else finds this. EDIT:lld
works fine for me.Reproducer
ROOT version
master, any recent one also doesn't work
Installation method
Build from source
Operating system
Linux (Arch)
Additional context
I'm compiling with GCC 13 and 14