[llvm] r201921 - Use relative rpath so that the installation and build dirs are relocatable.
Rafael EspĂndola
rafael.espindola at gmail.com
Wed Feb 26 08:34:09 PST 2014
On 25 February 2014 20:35, David Fang <fang at csl.cornell.edu> wrote:
> Hi,
> This patch is giving me runtime dyld errors on darwin8 (cmake+shared
> build):
>
> [ 6%] Building Intrinsics.gen...
> dyld: Library not loaded: @rpath/libLLVMSupport.dylib
> Referenced from:
> /Volumes/Isolde/builds/LLVM/gcc40-cmake-build/include/llvm/IR/../../../bin/llvm-tblgen
> Reason: image not found
> make[2]: *** [include/llvm/IR/Intrinsics.gen.tmp] Error 133
> make[1]: *** [include/llvm/IR/CMakeFiles/intrinsics_gen.dir/all] Error 2
> make: *** [all] Error 2
>
> because:
>
> % otool -L bin/llvm-tblgen
> bin/llvm-tblgen:
> @rpath/libLLVMSupport.dylib (compatibility version 0.0.0, current
> version 0.0.0)
that looks correct. What is the rpath in llvm-tablgen? I get:
$ otool -L ./bin/llvm-tblgen
./bin/llvm-tblgen:
@rpath/libLLVMSupport.dylib (compatibility version 0.0.0, current version 0.0.0)
$ otool -l ./bin/llvm-tblgen
Load command 18
cmd LC_RPATH
cmdsize 40
path @executable_path/../lib (offset 12)
$ otool -l lib/libLLVMSupport.dylib
Load command 3
cmd LC_ID_DYLIB
cmdsize 56
name @rpath/libLLVMSupport.dylib (offset 24)
>
> The old 'set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")' used to work fine.
Old OS X used $ORIGIN? That is the ELF path.
> I suppose I could attempt to conditionally use the old behavior depending on
> host OS X version? Or can I also use @executable_path/../lib as
> CMAKE_INSTALL_NAME_DIR?
What do you get with the configure build if you do a shared build?
Cheers,
Rafael
More information about the llvm-commits
mailing list