-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
"image not found" when building from head #420
Comments
Because Sparkle now only supports versions of OS X that support @rpath, we use it for maximum flexibility instead of hardcoding a predefined search path. The correct solution is to add the linker flag
Or you can set it in the Xcode GUI, whichever you prefer. |
Thanks, that worked! |
I've just got bitten by this myself. When running app via cmd-R in Xcode it magically works even without the linker flag, but the .app launched from Finder crashes with "image not loaded". That's a thing that can drive people to insanity. |
I'm hitting this problem now with the podspec for 1.10 I can fix it by following the instruction (not in the cocoapods instructions) to add In Build Settings tab set “Other Linker Flags” to -Wl,-rpath,@loader_path/../Frameworks. I'm guessing the podspec should be handling this, but if not, then the documentation should list the step. |
This above worked for me for upgrading today. Don't know what will happen tomorrow. ;-) |
Do not do that. The correct solution is to set
in your app's build settings (which adds |
Will that affect the other frameworks I'm linking? |
Obviously, but that's how you should be linking all frameworks, not just Sparkle. |
@rpath isn't new, it's been part of macOS since 2007. I don't expect you to have any problems. |
I'm trying to upgrade to the latest Sparkle, but I get this error when I try to run my program:
dyld: Library not loaded: @rpath/Sparkle.framework/Versions/A/Sparkle
Referenced from: /Users/gnachman/SparkleTest/Build/Debug/SparkleTest.app/Contents/MacOS/SparkleTest
Reason: image not found
Steps to reproduce:
I also tried adding Sparkle.framework to the Copy Bundle Resources phase, as well as adding a new Copy Files phase with the Frameworks destination.
Sparkle 1.5b did not use @rpath. otool -L on a binary linked with 1.5b shows:
@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle (compatibility version 1.5.0, current version 1.5.0)
while otool -L on a program linked with the latest shows:
I'm not sure where the @rpath is coming from, but that seems to be problematic.
The text was updated successfully, but these errors were encountered: