Ableton / LinkKit

iOS SDK for Ableton Link, a new technology that synchronizes musical beat, tempo, and phase across multiple applications running on one or more devices.
http://ableton.github.io/linkkit
Other
149 stars 10 forks source link

Latest release not compatible with Xcode 14 #67

Closed fpcafpca closed 2 years ago

fpcafpca commented 2 years ago

The latest release cannot be linked against an app built with Xcode 14, because of the following linker error:

ld: in [...]/LinkKit/lib/libABLLink.a(ABLLink.o), building for iOS, but linking in object file built for iOS Simulator, file '[...]/LinkKit/lib/libABLLink.a' for architecture arm64

mazbox commented 2 years ago

I'm also getting this error - this may be relevant to finding a fix: https://stackoverflow.com/questions/65978359/xcode-error-building-for-ios-simulator-but-linking-in-dylib-built-for-ios-f

Probably worth mentioning I'm on an M1

I reverted to my older Xcode (13.3.1) and it compiles happily again.

Not sure what the difference between a simulator vs device static lib is now everything is arm64, I wonder how you're supposed to distinguish between them?

fgo-ableton commented 2 years ago

There is indeed an issue with the fat .a library. @mazbox is right: It is kind of random which arm64 symbols end up in the bundle. I wonder why it works in Xcode 13 but not in Xcode 14 tho. Anyways, using LinkKit. xcframework should work. I'll remove the .a from the release.

fpcafpca commented 2 years ago

Thank you both for the info, it was very helpful for us to find a workaround!

VielfaltSoftware commented 2 years ago

Thanks for the workaround! Including LinkKit.xcframework instead of libABLLink.a works fine using Xcode 14 on an M1 Max Mac. By the way, first I tried something different, I only need arm64 and removed the other architectures via lipo libABLLink.a -extract arm64 -output libABLLink_arm64.a but that didn't work, the same error persisted. Any ideas why?

fgo-ableton commented 2 years ago

Thanks for checking! I removed libABLLink.a from the latest release.