[llvm-bugs] [Bug 30345] New: lld shared libraries build is broken on MacOS (and probably has been for a while)
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Sep 10 15:55:30 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30345
Bug ID: 30345
Summary: lld shared libraries build is broken on MacOS (and
probably has been for a while)
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: MachO
Assignee: unassignedbugs at nondot.org
Reporter: davide at freebsd.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
While trying the MachO lld I saw some tests failing with BUILD_SHARED_LIBS,
e.g.:
******************** TEST 'lld :: mach-o/linker-as-ld.yaml' FAILED
********************
The reason is that dyld gets confused and can't find the library:
dyld: Library not loaded: @rpath/liblldDriver.dylib
Referenced from:
/Users/davide/work/llvm/build-shared/tools/lld/test/mach-o/Output/linker-as-ld.yaml.tmp.dir/ld
Reason: image not found
$ otool -L
/Users/davide/work/llvm/build-shared/tools/lld/test/mach-o/Output/linker-as-ld.yaml.tmp.dir/lld
/Users/davide/work/llvm/build-shared/tools/lld/test/mach-o/Output/linker-as-ld.yaml.tmp.dir/lld:
@rpath/liblldDriver.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/liblldCOFF.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/liblldELF.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libLLVMSupport.dylib (compatibility version 0.0.0, current version
0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1226.10.1)
Apparently, just moving the built lld to the parent directory (../) will cause
the same problem. I suspected it was rpath related and actually forcing rpath
to the absolute correct value (via install_name_tool) seems to work around the
problem.
I think this should be fixed in the build system, anyway (and maybe a bot
should be set up to catch up these kind of failures).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160910/d255289c/attachment.html>
More information about the llvm-bugs
mailing list