[CMake] strange rpath with lotf of ":"-s

Szilárd Páll szilard.pall at cbr.su.se
Sat Jun 11 11:55:56 EDT 2011


Thanks Rolf & Michael for the explanation and tips, now it's clear
what the colons are for! I will see if CMAKE_NO_BUILTIN_CHRPATH is
feasible in our project or not.

Regard,
--
Szilárd



On Thu, Jun 9, 2011 at 11:48 PM, Michael Hertling <mhertling at online.de> wrote:
> On 06/09/2011 01:08 PM, Rolf Eike Beer wrote:
>>> Hi,
>>>
>>> I see strange rpath in binaries inside the build tree, linked in such
>>> a way that these can run from the build tree. In some cases the rpath
>>> list contains a fairly large amount of ":"-s, sometimes only one at
>>> the end. Already one colon is unnecessary (at least in my case), but
>>> the case when there are many of them is very strange. After make
>>> install-ing the colons are gone, so it's not really a security
>>> vulnerability, but it's still strange.
>>>
>>> Does anyone have any idea whether this is caused by a bug in my
>>> CMakeList.txt-s or it's a CMake "feature"?
>>
>> If you look closely you will see that both rpaths are of the same length.
>> CMake inserts an rpath with lot's of empty settings in the build tree so
>> it can simply overwrite this later for the install tree without the need
>> to rebuild the file.
>>
>> Eike
>
> FYI: This placeholder mechanism is in effect only if an RPATH is
> enabled for the installed binaries, e.g. via CMAKE_INSTALL_RPATH,
> and it can be switched off by setting CMAKE_NO_BUILTIN_CHRPATH to
> TRUE; in the letter case, the final binaries are actually relinked
> at installation time instead of being patched with the final RPATH.
> See [1] for a related discussion.
>
> Regards,
>
> Michael
>
> [1] http://www.mail-archive.com/cmake@cmake.org/msg35955.html
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list