Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build.sh fails when building universal libs #3

Open
gbgames opened this issue May 17, 2021 · 1 comment
Open

build.sh fails when building universal libs #3

gbgames opened this issue May 17, 2021 · 1 comment

Comments

@gbgames
Copy link

gbgames commented May 17, 2021

Upon trying to run the script, it seems to download and build SDL2, but when it gets to the universal libs part, it fails:

==> Building libSDL2 universal libs...
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: build/Release-iphoneos/libSDL2.a and build/Release-iphonesimulator/libSDL2.a have the same architectures (arm64) and can't be in the same fat output file

$ xcodebuild -version
Xcode 12.4
Build version 12D4e

@gbgames
Copy link
Author

gbgames commented May 17, 2021

And I just found this article that describes why lipo is no longer going to work in Xcode 12.4: https://blog.embrace.io/xcode-12-and-xcframework/

Basically, with the new M1 CPUs, a fat binary no longer works well because two different arm64-optimized builds for two different purposes couldn't coexist. Apparently XCFramework is Apple's solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant