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

Rolf Eike Beer eike at sf-mail.de
Thu Jun 9 07:08:22 EDT 2011


> 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


More information about the CMake mailing list