-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
KiCad: Create App Bundle with CMake fails on macOS CoreFoundation RPATH @rpath #98203
Comments
Never heard of this. Also, changing RPATH is often done via recompilation anyway. I think, changing |
I assume I fix this by putting |
Sorry, wrong button 🤦🏼♂️ |
@hannesweisbach [1] https://cmake.org/cmake/help/latest/module/BundleUtilities.html |
I read it on some thread on the NixOS discourse.
I fixed fontconfig by adding CoreFoundation to buildInputs in #98379
I've created (what do you call them? "pure"?) version of gettext & curl without RPATH references to use for me locally. While doing this I looked for libraries in my /nix/store with non-absolute RPATH references to CoreFoundation. Should I be fixing those (assuming they are not bootstrap-packages, like |
I marked this as stale due to inactivity. → More info |
I marked this as stale due to inactivity. → More info |
Describe the bug
I am trying to make KiCad build under macOS + nix. My last hurdle is that the CMake scripts of KiCad want to create an app bundle during the install phase. This currently fails, because during verification of the created app bundle CMake encounters the non-absolute RPATH to CoreFoundation
@rpath/CoreFoundation.framework/Versions/A/CoreFoundation
in the dependencies of the executables in the app bundle. Because an app bundle is supposed to be self-contained and CMake does not recognize the reference as one to a system library, verification of the bundle, and hence the install step, fails.For example,
eeschema
depends oncairo
, which in turn depends onfontconfig
:libfontconfig in turn has an RPATH set:
libcontconfig gets copied into app bundle as dependency. CMake notices this:
warning: unexpected reference to '@rpath/CoreFoundation.framework/Versions/A/CoreFoundation'
And finally, the verification step of the Bundle creation fails:
My question now is, how do I fix or work around this? IIRC, nix uses an RPATH to CoreFoundation to be able to switch between pure and impure versions without recompilation? Correct me, if I'm wrong.
If I hack around this, i.e. make CMake think RPATHs are system libraries and don't need to be copied, the resulting app bundle works for me. So this is basically the last step to have KiCad build on Darwin. Maybe someone can give me hint.
I tried to search for how to build app bundle via CMake under Nix, but Github only let's me search open issues. Whenever I search for closed issues I get the Github unicorn and it tells me generation of the page has timed out :(
To Reproduce
Steps to reproduce the behavior:
nix-shell --pure
Expected behavior
Create a working app bundle.
Screenshots
Full install log (CMake verbose enabled)
https://gist.github.com/hannesweisbach/f9c81f08e298f99bb6e55f76d7f40897
Notify maintainers
@evils @Kiwi @berce
Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: