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

[SR-10529] SwiftPM related tools included in Command Line Tools fail to launch with error: dyld: Library not loaded: @rpath/llbuild.framework/Versions/A/llbuild #4717

Open
norio-nomura opened this issue Apr 22, 2019 · 2 comments
Labels

Comments

@norio-nomura
Copy link
Contributor

Previous ID SR-10529
Radar rdar://problem/49521846
Original Reporter @norio-nomura
Type Bug
Environment

Command Line Tools (macOS 10.14) for Xcode 10.2.1

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 1aeea099d3b2b37888ab832703422247

Issue Description:

$ xcrun swift-build
dyld: Library not loaded: @rpath/llbuild.framework/Versions/A/llbuild
  Referenced from: /Library/Developer/CommandLineTools/usr/bin/swift-build
  Reason: image not found
[1]    20585 abort      xcrun swift-build
$ xcrun swift-package
dyld: Library not loaded: @rpath/llbuild.framework/Versions/A/llbuild
  Referenced from: /Library/Developer/CommandLineTools/usr/bin/swift-package
  Reason: image not found
[1]    20621 abort      xcrun swift-package
$ xcrun swift-run
dyld: Library not loaded: @rpath/llbuild.framework/Versions/A/llbuild
  Referenced from: /Library/Developer/CommandLineTools/usr/bin/swift-run
  Reason: image not found
[1]    20630 abort      xcrun swift-run
$ xcrun swift-test
dyld: Library not loaded: @rpath/llbuild.framework/Versions/A/llbuild
  Referenced from: /Library/Developer/CommandLineTools/usr/bin/swift-test
  Reason: image not found
[1]    20639 abort      xcrun swift-test
@belkadan
Copy link

Maybe the rpath isn't set up correctly for Command Line Tools installs?

@norio-nomura
Copy link
Contributor Author

Maybe the rpath isn't set up correctly for Command Line Tools installs?

Yes, it has rpathes assuming placed inside bundle of Xcode.

$ otool -l /Library/Developer/CommandLineTools/usr/bin/swift-packageLoad command 26
          cmd LC_RPATH
      cmdsize 32
         path /usr/lib/swift (offset 12)
Load command 27
          cmd LC_RPATH
      cmdsize 56
         path @executable_path/../../../../../Frameworks (offset 12)
Load command 28
          cmd LC_RPATH
      cmdsize 64
         path @executable_path/../../../../../SharedFrameworks (offset 12)

It should have rpathes like OSS Toolchains:

$ otool -l $(xcrun --toolchain org.swift.5120190417a --find swift-package)
…
Load command 27
          cmd LC_RPATH
      cmdsize 136
         path /Users/buildnode/jenkins/workspace/oss-swift-5.1-package-osx/build/buildbot_osx/swift-macosx-x86_64/lib/swift/macosx (offset 12)
Load command 28
          cmd LC_RPATH
      cmdsize 56
         path @executable_path/../lib/swift/macosx (offset 12)
Load command 29
          cmd LC_RPATH
      cmdsize 56
         path @executable_path/../lib/swift/pm/llbuild (offset 12)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants