JohnSundell/Marathon

Unable to install using Xcode 10.2 and macOS 10.14.4

chrisvasselli opened this issue ยท 6 comments

I just updated my machine to the latest macOS and Xcode releases, and Marathon seemed to no longer work:

๐Ÿ’ฅ  Failed to compile script
๐Ÿƒ  Compiling script...

I uninstalled and attempted to reinstall, and am getting the following error when running `swift build -c release -Xswiftc -static-stdlib':

ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift_static/macosx'
ld: warning: Could not find auto-linked library 'swiftFoundation'
ld: warning: Could not find auto-linked library 'swiftDarwin'
ld: warning: Could not find auto-linked library 'swiftCoreFoundation'
ld: warning: Could not find auto-linked library 'swiftIOKit'
ld: warning: Could not find auto-linked library 'swiftCore'
ld: warning: Could not find auto-linked library 'swiftCoreGraphics'
ld: warning: Could not find auto-linked library 'swiftObjectiveC'
ld: warning: Could not find auto-linked library 'swiftDispatch'
Undefined symbols for architecture x86_64:
  "_$s10Foundation11JSONDecoderC6decode_4fromxxm_AA4DataVtKSeRzlFTj", referenced from:
      _$s12MarathonCore14PackageManagerC04makeC4List33_C9DC8CD203C301B495F1198214516A3CLLSayAA0C0VGyF in PackageManager.swift.o
      _$s12MarathonCore14PackageManagerC06removeC05named20shouldUpdatePackagesAA0C0VSS_SbtKF in PackageManager.swift.o
      _$s12MarathonCore14PackageManagerC21resolvePinnedPackages33_C9DC8CD203C301B495F1198214516A3CLLSayAA0C0V0F0VGyKF in PackageManager.swift.o
  "_$s10Foundation11JSONDecoderCACycfc", referenced from:
      _$s12MarathonCore14PackageManagerC04makeC4List33_C9DC8CD203C301B495F1198214516A3CLLSayAA0C0VGyF in PackageManager.swift.o
      _$s12MarathonCore14PackageManagerC06removeC05named20shouldUpdatePackagesAA0C0VSS_SbtKF in PackageManager.swift.o
 ....

It goes on like that for a while. I also tried forcing the Swift version to 4.2 (swift build -c release -Xswiftc -static-stdlib -Xswiftc -swift-version -Xswiftc 4.2) and it didn't seem to change anything.

I had to build from the "remove-static-linking" branch to get working on 10.2. Looks like there's an outstanding PR for this that will get merged in at some point.

Thanks! Didn't notice that work in progress. Here's a link to that PR for anyone else that ends up here: #202

FWIW, that seems to have fixed the issues installing marathon, but I'm still getting the ๐Ÿ’ฅ Failed to compile script error when I try to actually use it.

To resolve the "Failed to compile script error", I had to delete ~/.marathon/Packages/Generated/Package.swift. I had a version of this file with the line swiftLanguageVersions: [5] in it, which is now invalid. It needed to be updated to swiftLanguageVersions: [.version("5")]. I'm guessing this was a recent change, and my first run of marathon with Swift 5 was still using the old version of Marathon.

It seems like the marathon-generation-version being updated is supposed to trigger this file to be regenerated, so maybe an appropriate fix would be to increment that version number?

This should fix all issues: #202
Thanks @clindsay for your help on this ๐Ÿ™Œ

I'm seeing this on catalina + xcode 10.2 / 10.1 / 11 beta

#206
xcode 11 / swift 5.1 - if I run
swift build -c release -Xswiftc -static-stdlib > results.txt
https://gist.github.com/johndpope/7d01eb3d0b83a3fffdb7045d5fc40768
I'm seeing Undefined symbols for architecture x86_64
I tried bumping .swift-version to 5.1 - no joy.
I'll try digging around to delete ~/.marathon/Packages/Generated/Package.swift