The Wayback Machine - https://web.archive.org/web/20200713192552/https://github.com/CocoaPods/CocoaPods/issues/9156
Skip to content
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

macOS CLI: dyld: Library not loaded ... image not found #9156

Open
michaeleisel opened this issue Sep 10, 2019 · 7 comments
Open

macOS CLI: dyld: Library not loaded ... image not found #9156

michaeleisel opened this issue Sep 10, 2019 · 7 comments

Comments

@michaeleisel
Copy link
Contributor

@michaeleisel michaeleisel commented Sep 10, 2019

Report

What did you do?

Create Podfile for empty MacOS CLI tool with:

target 'podNew' do
  use_frameworks!

  pod 'RxSwift'
  # Pods for podNew

end

Then run pod install and build

What did you expect to happen?

A successful build

What happened instead?

dyld: Library not loaded: @rpath/RxSwift.framework/Versions/A/RxSwift
  Referenced from: /Users/michaeleisel/Documents/Projects/podNew/Build/Products/Debug/podNew
  Reason: image not found

CocoaPods Environment

Stack

   CocoaPods : 1.7.5
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
    RubyGems : 3.0.3
        Host : Mac OS X 10.15 (19A536g)
       Xcode : 10.3 (10G8)
         Git : git version 2.21.0
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : artsy - https://github.com/artsy/Specs.git @ ef1735b844309562ba59a1ef257a3148958fe4e9
               master - https://github.com/CocoaPods/Specs.git @ e32f4aaa8f6ad641a62cf88b3b54b521055331d0

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate                 : 1.0.4
cocoapods-disable-podfile-validations : 0.1.1
cocoapods-generate                    : 1.5.0
cocoapods-plugins                     : 1.0.0
cocoapods-search                      : 1.0.0
cocoapods-stats                       : 1.1.0
cocoapods-trunk                       : 1.3.1
cocoapods-try                         : 1.1.0

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'podNew' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  pod 'RxSwift'
  # Pods for podNew

end

Project that demonstrates the issue

It's just an empty project, created and built with Xcode 10.

@michaeleisel
Copy link
Contributor Author

@michaeleisel michaeleisel commented Sep 10, 2019

It seems that there are other issues like this one related to CLI tools, e.g. #3709, but the steps from that guide are outdated (e.g. link_with), and there didn't seem to be a really clear answer anyways.

@dnkoutso
Copy link
Contributor

@dnkoutso dnkoutso commented Sep 10, 2019

We do not support macOS CLI tools in CocoaPods IIRC.

@dnkoutso dnkoutso changed the title dyld: Library not loaded ... image not found macOS CLI: dyld: Library not loaded ... image not found Sep 10, 2019
@michaeleisel
Copy link
Contributor Author

@michaeleisel michaeleisel commented Sep 10, 2019

I see, which types of Mac apps are supported? And could there be some sort of warning when the user runs pod install, telling them that it isn't supported? I think that other users would be surprised by that as well

@dnkoutso
Copy link
Contributor

@dnkoutso dnkoutso commented Sep 10, 2019

@michaeleisel actually I think @amorde implemented a warning here #6493! It has shipped with 1.8.0.beta.1

@dnkoutso
Copy link
Contributor

@dnkoutso dnkoutso commented Sep 10, 2019

We can probably further enhance it with the list of supported targets. But I would say Applications and Frameworks / Libraries are supported for macOS.

@michaeleisel
Copy link
Contributor Author

@michaeleisel michaeleisel commented Sep 10, 2019

OK thank you

@amorde
Copy link
Member

@amorde amorde commented Sep 11, 2019

Yup we added a warning when using dynamic frameworks with CLI targets, since there’s no way to embed the framework into the binary.

CLI targets should work though, as long as you’re using static linking or are able to package the dynamic frameworks with the binary somehow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.