yonaskolb / Mint

A package manager that installs and runs executable Swift packages
MIT License
2.27k stars 122 forks source link

Mint run fails with illegal hardware instruction #189

Closed Blackjacx closed 3 years ago

Blackjacx commented 4 years ago

Hey there,

I wanted to use the inofficial App Store Connect cli tool asc (included in the Assist repo) with mint. But when entering the command:

mint run blackjacx/assist@develop asc

I get the following error message:

objc[57587]: Class _TtGCs18_DictionaryStorageaSo11CFStringRefS0__$ is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7fff9773bfb0) and /usr/lib/swift/libswiftCore.dylib (0x7fff9773c2c8). One of the two will be used. Which one is undefined.
Fatal error: invalid unsafeDowncast: file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1103.8.25.8/swift/stdlib/public/core/Builtin.swift, line 235
[1]    57587 illegal hardware instruction  mint run blackjacx/assist@develop asc

When I enter swift run asc in the locally checked out folder it works without problems.

Does anybody have an answer what this is or has experienced this message in their own projects? Apart from that can I instruct mint to install the debug version of a package?

ChaosCoder commented 3 years ago

We have the same error even although we are not using mint. @Blackjacx Have you found the underlying issue or some workaround?

Blackjacx commented 3 years ago

Yes! It was related to a dependency (that is not maintained very well) I use in the main tool I develop.

Previously I used:

https://github.com/Kitura/Swift-JWT

and now I use:

https://github.com/vapor/jwt-kit

It is not a Mint problem, so this issue could be closed.

My suggestion: Sequentially remove your dependencies and run your tool with mint to find the dependency that causes the problem.

ChaosCoder commented 3 years ago

Ah, we use that as well! Thank you for pointing us in that direction! We wanted to migrate to the vapor jwt one soon, I guess that will be sooner rather than later now. 😉

stherold commented 3 years ago

Glad it helped you 👍