Set install name to full install path by default on macOS, closes #4. #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On macOS, running a build of openEMS installed to a custom location will fail. The RPATH for the custom location is not set correctly, only system directories are searched, as a result, fparser cannot be found (Bug #4).
Curiously, only fparser is affected, other libraries such as CSXCAD is not.
After some investigation, I found the root cause is that the "install name" of
libfparser
does not contain a full path, but CSXCAD's "install name" is an absolute path. Thus, CSXCAD can be found correctly using the absolute install path, butlibfparser
cannot. After CSXCAD and openEMS are built, this incomplete install name will propagate upwards, so all binaries will have a wrong search path forlibfparser
.This commits set the install name of fparser to its full install path by default on macOS, so it behaves consistently to libCSXCAD.