[LLVMdev] rpaths in llvm binaries
Larson, Timothy E.
TELarson at west.com
Mon Nov 16 13:42:32 PST 2009
Hello LLVM devs,
I am trying to package llvm for NetBSD. The package checker scripts are complaining about bad rpaths in the binaries. I see that they are relative to the build directory. I have no idea why that would be. Can you explain?
If I build as myself, for testing (e.g.):
$ readelf -d ~/downloads/llvm-2.6/Release/bin/llvm-ar
Dynamic section at offset 0x15af28 contains 25 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
0x00000001 (NEEDED) Shared library: [libm.so.0]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.12]
0x0000000f (RPATH) Library rpath: [/home/tim/downloads/llvm-2.6/Release/bin]
0x0000000c (INIT) 0x804dfe0
.............
As root, for packaging:
# readelf -d /usr/pkg/bin/llvm-ar
Dynamic section at offset 0x152028 contains 25 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
0x00000001 (NEEDED) Shared library: [libm.so.0]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.12]
0x0000000f (RPATH) Library rpath: [/usr/pkg/lib:/usr/pkgsrc/wip/llvm/work.i386/llvm-2.6/Release/bin]
0x0000000c (INIT) 0x804e1c0
.......
In the latter case, it ought to find the binaries in /usr/pkg/lib and never need to worry about the second path, but that second (in the former case, only) path ought not be there anyway. Should it? Why would you include an rpath from the build directory?
Thanks,
Tim
PS Please cc me on replies.
More information about the llvm-dev
mailing list