New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPATH config in src/CMakeLists.txt #926

Closed
kastiglione opened this Issue Mar 24, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@kastiglione

kastiglione commented Mar 24, 2017

I noticed the resulting binaries had an rpath that looked strange, it was : (colon) followed a path to the rtags lib dir.

I found in src/CMakeLists.txt that CMAKE_INSTALL_RPATH is being set like so:

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/lib")

If CMAKE_INSTALL_RPATH is empty, then this results in the : prefixed path I saw. On macOS, I don't think such a value is a valid rpath. Also, the documentation for CMAKE_INSTALL_RPATH says it's:

A semicolon-separated list

I'm not a cmake expert, but I think this means CMAKE_INSTALL_RPATH may need to be set like this:

list(APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)

thanks for rtags!

@kastiglione kastiglione changed the title from RPATH config src/CMakeLists.txt to RPATH config in src/CMakeLists.txt Mar 24, 2017

@Andersbakken

This comment has been minimized.

Show comment
Hide comment
@Andersbakken

Andersbakken Mar 28, 2017

Owner

We don't really need an rpath at all anymore since we're now building only static libs.

Owner

Andersbakken commented Mar 28, 2017

We don't really need an rpath at all anymore since we're now building only static libs.

@kastiglione

This comment has been minimized.

Show comment
Hide comment
@kastiglione

kastiglione Mar 28, 2017

I actually like the use of rpath. In my setup, I copy libclang.dylib to ${CMAKE_INSTALL_PREFIX}/lib which the rtags binaries were already referencing. This gives me a self contained install.

I actually like the use of rpath. In my setup, I copy libclang.dylib to ${CMAKE_INSTALL_PREFIX}/lib which the rtags binaries were already referencing. This gives me a self contained install.

@Andersbakken

This comment has been minimized.

Show comment
Hide comment
@Andersbakken

Andersbakken Mar 28, 2017

Owner
Owner

Andersbakken commented Mar 28, 2017

Andersbakken added a commit that referenced this issue Mar 30, 2017

Apparently we do use RPATH :-)
Try to fix #926 in the way proposed here:

#926
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment