-
Notifications
You must be signed in to change notification settings - Fork 169
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
PathKit build fails through Carthage #5
Comments
Does |
Yup - it's in the second code block (I edited my post right after I pressed submit). |
Just curious, can you try the following before running $ install_name_tool -add_rpath "@executable_path/Carthage/Build/Mac/" "main" |
Huh... that worked. I've never heard of that command before. What does it do? Output: $ ./main
/Users/dan/Desktop/test |
I've written about it at https://github.com/kylef/Commander#installation When you said it works perfectly for other frameworks, we're you doing this the exact same way? With |
Yup - take a look at the build script for MastCLI if you need an example. |
@Danappelxx I think MastCLI is only working because you haven't used any APIs from Commander only imported it. Once you try using Commander, without the Commander framework available in the rpath it will not run too. |
Src/main.swift uses Commander. |
Ah missed that file, was looking in |
Hm... adding |
@Danappelxx The rpath you've shown is relative to executable path, and Should become: $ install_name_tool -add_rpath "@executable_path/../Carthage/Build/Mac/" "bin/mast" |
Man, you really know your stuff - thanks! |
Going to close this since it looks like we've resolved the problem. |
Example:
So carthage builds PathKit, which is great. However, the framework can't be used for whatever reason.
$ cat main.swift import PathKit print(Path.current) $ ls Carthage/Build/Mac PathKit.framework $ swiftc main.swift -F Carthage/Build/Mac/ $ ./main dyld: Library not loaded: @rpath/PathKit.framework/Versions/A/PathKit Referenced from: /Users/dan/Desktop/test/./main Reason: image not found [1] 45284 trace trap ./main
It works perfectly fine with other frameworks, for example Commander.
Thoughts?
The text was updated successfully, but these errors were encountered: