-
Notifications
You must be signed in to change notification settings - Fork 430
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
cmake: add only non-system link paths to rpath (fixes #2849) #2850
Conversation
@larsimmisch and @bacterik, do you see any chance to test this pull request on macOS? |
Maybe we should set rpath only on macOS and iOS? if(APPLE) |
Personally, I wouldn't do this, because Linux users might want to install baresip on non-default paths for whatever reasons. Example: Baresip under |
tested OK on macOS 12.7:
|
Given you only showed build-time output…the (breaking) CMake code was added for a reported run-time issue on macOS. |
@robert-scheck Looks good to me. I tested this on MacOS 14.2.1 by running:
And then running |
This patch, even while maybe imperfect from CMake perspective, ensures that only non-system directories used for linking are added to RPATH. Fedora's
/usr/lib/rpm/check-rpaths
claims unnecessary standard RPATHs (e.g./usr/lib
).While such RPATHs might be treated as a minor issue, they are still introducing redundant searchpaths without providing a benefit. They can also cause errors in multilib environments (e.g.
/usr/lib
instead of/usr/lib64
on 64 bit Fedora systems).