Last active
March 9, 2019 23:57
-
-
Save krzyzanowskim/c6459344b0744e5d292830dcf75807aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Load command 12 | |
cmd LC_LOAD_DYLIB | |
cmdsize 80 | |
name @executable_path/../Frameworks/libSwiftSyntax.dylib (offset 24) | |
time stamp 2 Thu Jan 1 01:00:02 1970 | |
current version 0.0.0 | |
compatibility version 0.0.0 | |
Load command 43 | |
cmd LC_RPATH | |
cmdsize 32 | |
path /usr/lib/swift (offset 12) | |
Load command 44 | |
cmd LC_RPATH | |
cmdsize 48 | |
path @executable_path/../Frameworks (offset 12) | |
$ otool -L libSwiftSyntax.dylib | |
libSwiftSyntax.dylib: | |
@executable_path/../Frameworks/libSwiftSyntax.dylib (compatibility version 0.0.0, current version 0.0.0) | |
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) | |
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5) | |
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1560.12.0) | |
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1560.12.0) | |
@rpath/lib_InternalSwiftSyntaxParser.dylib (compatibility version 1.0.0, current version 0.0.0) | |
@rpath/libswiftCore.dylib (compatibility version 1.0.0, current version 0.0.0) | |
@rpath/libswiftCoreFoundation.dylib (compatibility version 1.0.0, current version 0.0.0) | |
@rpath/libswiftCoreGraphics.dylib (compatibility version 1.0.0, current version 0.0.0) | |
@rpath/libswiftDarwin.dylib (compatibility version 1.0.0, current version 0.0.0) | |
@rpath/libswiftDispatch.dylib (compatibility version 1.0.0, current version 0.0.0) | |
@rpath/libswiftFoundation.dylib (compatibility version 1.0.0, current version 0.0.0) | |
@rpath/libswiftIOKit.dylib (compatibility version 1.0.0, current version 0.0.0) | |
@rpath/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 0.0.0) | |
Runtime loads from toolchain: usr/lib/swift/macosx/libSwiftSyntax.dylib | |
dyld: Symbol not found: _$s11SwiftSyntax0B6ParserO5parse6source0D10Transition22filenameForDiagnostics16diagnosticEngineAA010SourceFileB0VSS_AA016IncrementalParseF0CSgSSAA010DiagnosticK0CSgtKFZ | |
Referenced from: /Users/marcinkrzyzanowski/Devel/SwiftStudio/DerivedData/SwiftStudio/Build/Products/Debug/SwiftStudio.app/Contents/MacOS/SwiftStudio | |
Expected in: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2019-03-04-a.xctoolchain/usr/lib/swift/macosx/libSwiftSyntax.dylib | |
Workaround: | |
If I delete /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2019-03-04-a.xctoolchain/usr/lib/swift/macosx/libSwiftSyntax.dylib then it links as expected. |
Another workaround is to rename vendored library to libSwiftSyntax-custom.dylib
obviously
Use env DYLD_PRINT_RPATHS=1
to see how dyld does the lookups.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ld command
The only reference to toolchain is
-L/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2019-03-04-a.xctoolchain/usr/lib/swift/macosx
. Even though, it loads a library with a different identification name than requested@rpath/libSwiftSyntax.dylib
vs@executable_path/../Frameworks/libSwiftSyntax.dylib