I have a project managed by SPM which depends on Swift Syntax. Ever since upgrading to Swift 5/XCode 10.2.x I get this error when trying to run the executable:
dyld: Symbol not found: _$SBOWV Referenced from: <project build dir>/libSwiftSyntax.dylib Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib in <project build dir>/libSwiftSyntax.dylib Abort trap: 6
The dependancy is included in my
Package.swift like so:
// swift-tools-version:5.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "MyPackage", dependencies: [ .package(url: "https://github.com/apple/swift-syntax.git", .exact("0.50000.0")), ], targets: [ .target( name: "MyExecutable", dependencies: ["SwiftSyntax"]), ] ... }
So it looks like for some reason at runtime my executalble is unable to link to a separately compiled SwiftSyntax dynamic library which is not part of the XCode toolchain?
What is the recommended way to deal with this issue? I would like to keep my code platform independent as well if it makes a difference.