JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.74k stars 5.49k forks source link

libunwind linked statically if Julia is built with `USE_BINARYBUILDER=0` #40390

Open ghost opened 3 years ago

ghost commented 3 years ago
ninjin@cyclops:~/repo/julia$ make -j 8 USE_BINARYBUILDER=0 VERBOSE=1
<SNIP/>
ninjin@cyclops:~/repo/julia$ ls usr/lib/*unwind*
usr/lib/libunwind.a            usr/lib/libunwind.la         usr/lib/libunwind-setjmp.la
usr/lib/libunwind-coredump.a   usr/lib/libunwind-ptrace.a   usr/lib/libunwind-x86_64.a
usr/lib/libunwind-coredump.la  usr/lib/libunwind-ptrace.la  usr/lib/libunwind-x86_64.la
usr/lib/libunwind-generic.a    usr/lib/libunwind-setjmp.a
ninjin@cyclops:~/repo/julia$ make cleanall
<SNIP/>
ninjin@cyclops:~/repo/julia$ make -j 8 VERBOSE=1
<SNIP/>
ninjin@cyclops:~/repo/julia$ ls usr/lib/*unwind*
usr/lib/libunwind.a                  usr/lib/libunwind-ptrace.a         usr/lib/libunwind-setjmp.so.0.0.0
usr/lib/libunwind-coredump.a         usr/lib/libunwind-ptrace.la        usr/lib/libunwind.so
usr/lib/libunwind-coredump.la        usr/lib/libunwind-ptrace.so        usr/lib/libunwind.so.8
usr/lib/libunwind-coredump.so        usr/lib/libunwind-ptrace.so.0      usr/lib/libunwind.so.8.0.1
usr/lib/libunwind-coredump.so.0      usr/lib/libunwind-ptrace.so.0.0.0  usr/lib/libunwind-x86_64.a
usr/lib/libunwind-coredump.so.0.0.0  usr/lib/libunwind-setjmp.a         usr/lib/libunwind-x86_64.la
usr/lib/libunwind-generic.a          usr/lib/libunwind-setjmp.la        usr/lib/libunwind-x86_64.so
usr/lib/libunwind-generic.so         usr/lib/libunwind-setjmp.so        usr/lib/libunwind-x86_64.so.8
usr/lib/libunwind.la                 usr/lib/libunwind-setjmp.so.0      usr/lib/libunwind-x86_64.so.8.0.1
ninjin@cyclops:~$ uname -a
Linux cyclops 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

This leads to the LibUnwind_jll unit tests failing as they attempt to locate the shared library. Possibly this is a regression (or sneaky edge case?) from #36697? I dug through the issue tracker, but nothing else from the last two years looked related. Link to Yggdrasil build script (thank you @giordano!).

ghost commented 3 years ago

Should have mentioned that this is on the release-1.6 branch. It was fixed on master by d1fa5a57acff6ebe51424dca71f6e962d86d28b1, but this was after the release branch forked. This is an easy patch for packagers out there, so not sure if it is worthy of backporting. On the flip side, it is also about as trivial of a patch as it can be to backport. Would also be addressed if #39400 is backported as the commit is included as a part of it.