Skip to content
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

Building with rpaths on OSX High Sierra #63

Closed
rijobro opened this issue Dec 20, 2017 · 3 comments
Closed

Building with rpaths on OSX High Sierra #63

rijobro opened this issue Dec 20, 2017 · 3 comments
Milestone

Comments

@rijobro
Copy link
Contributor

rijobro commented Dec 20, 2017

With OSX, dynamic libraries can be referred to as (using the example of libboostfilesystem.dylib):

  1. libboostfilesystem.dylib,
  2. @rpath/libboostfilesystem.dylib, or
  3. /absolute/path/to/libboostfilesystem.dylib.

Compilation against the first of these three causes linking errors on my version of OSX. This is possibly due to changes to SIP for High Sierra (or possible a problem specific to my machine).

Possible solutions include:

  1. using install_name_tool to change the first option to the second or third, or
  2. linking against static libraries.

Hopefully this issue will sort itself out over time.

@KrisThielemans
Copy link
Member

@rijobro, I think this can be closed?

@rijobro rijobro closed this as completed Feb 7, 2018
@rijobro rijobro reopened this Mar 16, 2018
@rijobro
Copy link
Contributor Author

rijobro commented Mar 16, 2018

The option, SHARED_LIBS_ABS_PATH, means that all dynamic libraries compiled by CMake will have the full paths, and so the problem is resolved. However, for dependencies that are not compiled with CMake (e.g., Boost, which is compiled with boostrap), the problem remains.

A short-term fix is to use brew install boost (or brew upgrade boost, if they're not using the current version, 1.66).

As for long-term, I'm not so sure. Boost isn't compiled with CMake; what else isn't? We would have to find fixes for all of those...

@KrisThielemans
Copy link
Member

I was wondering if this wouldn't be fixed if we'd let the SuperBuild use boost 1.66. I saw no reason not to, until I found that boost 1.66 doesn't compile on Travis OSX, and therefore presumably some versions of OSX. Sigh.

I therefore suggest that on OSX, we currently set the USE_SYSTEM_BOOST to ON by default, and document the brew stuff in our OSX installation instructions.

@KrisThielemans KrisThielemans added this to the v1.0.0 milestone Mar 17, 2018
evgueni-ovtchinnikov added a commit that referenced this issue Mar 26, 2018
use system boost by default because of #63
paskino added a commit that referenced this issue Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants