[LLVMdev] llvm trunk build failed in cmake_install.cmake on ARM platform

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Feb 14 12:01:54 PST 2014


On 14 February 2014 14:32, Brad King <brad.king at kitware.com> wrote:
> On 2/14/2014 2:15 PM, Rafael EspĂ­ndola wrote:
>> Btw, an awesome way to fix this would be to set rpath to
>> $ORIGIN/../lib during the link itself. That way it doesn't need to be
>> update during install. Is there a way to do that with cmake?
>
> Use -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 to skip RPATH support for
> the build tree and link directly with the final installation RPATH.
> See my first response in this thread for details.
>
> However, CMake's install-time RPATH update is a widely used feature
> that is known to work in general.  (On non-ELF systems it even does
> a preinstall step that re-links the binaries with the installation
> tree RPATH.)  There must be something particular to the ARM platform
> linker or the way it is being invoked that prevents the RPATH field
> from appearing in the binary, but we'll have to wait for Mathias to
> report back.

The point is that it is unnecessary for us. We can always use $ORIGIN.
That is what we have been doing with configure for ages. I have just tried
the attached patch and it fixes my last remaining reason for using
configure! :-)

Running "readelf -dW lib/LLVMgold.so" shows

0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib]

Both in the build and in the install directory, which is exactly what we want.

I will try to port this to also work on OS X and not break windows and send for
code review.

Thanks,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140214/aa670bee/attachment.bin>


More information about the llvm-dev mailing list