gamecenter generate_xcframework error when building modules GameKit and simd
sourencho opened this issue · 4 comments
I'm trying to build the plugin libraries on a Apple M1 running Sanoma 14.0 and Xcode 15.0 but I run into an error at the generate_xcframework
step.
Here are the steps I took:
scons platform=ios target=editor
scons target=editor arch=arm64 simulator=no plugin=gamecenter version=4.1.3
./scripts/generate_xcframework.sh gamecenter debug 4.0
~ godot-ios-plugins git:(master) ✗
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o plugins/gamecenter/game_center_module.o -c -gdwarf-2 -O0 -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -D_DEBUG -DDEBUG=1 -DDEBUG_ENABLED -DVULKAN_ENABLED -std=gnu++17 -DNEED_LONG_INT -DLIBYUV_DISABLE_NEON -DIOS_ENABLED -DUNIX_ENABLED -DCOREAUDIO_ENABLED -fmodules -fcxx-modules -miphoneos-version-min=10.0 -fobjc-arc -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -fno-exceptions -Wno-ambiguous-macro -Wall -Werror=return-type -arch arm64 -isysroot -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk -DPTRCALL_ENABLED -I. -Igodot -Igodot/platform/ios plugins/gamecenter/game_center_module.cpp
g++ -o plugins/gamecenter/game_center.o -c -gdwarf-2 -O0 -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -D_DEBUG -DDEBUG=1 -DDEBUG_ENABLED -DVULKAN_ENABLED -std=gnu++17 -DNEED_LONG_INT -DLIBYUV_DISABLE_NEON -DIOS_ENABLED -DUNIX_ENABLED -DCOREAUDIO_ENABLED -fmodules -fcxx-modules -miphoneos-version-min=10.0 -fobjc-arc -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -fno-exceptions -Wno-ambiguous-macro -Wall -Werror=return-type -arch arm64 -isysroot -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk -DPTRCALL_ENABLED -I. -Igodot -Igodot/platform/ios plugins/gamecenter/game_center.mm
scons: `bin/libgamecenter.arm64-ios.debug.a' is up to date.
scons: done building targets.
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o plugins/gamecenter/game_center_module.o -c -gdwarf-2 -O0 -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -D_DEBUG -DDEBUG=1 -DDEBUG_ENABLED -DVULKAN_ENABLED -std=gnu++17 -fno-aligned-allocation -DNEED_LONG_INT -DLIBYUV_DISABLE_NEON -DIOS_ENABLED -DUNIX_ENABLED -DCOREAUDIO_ENABLED -fmodules -fcxx-modules -miphoneos-version-min=10.0 -fobjc-arc -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -fno-exceptions -Wno-ambiguous-macro -Wall -Werror=return-type -arch armv7 -isysroot -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk -DPTRCALL_ENABLED -I. -Igodot -Igodot/platform/ios plugins/gamecenter/game_center_module.cpp
g++ -o plugins/gamecenter/game_center.o -c -gdwarf-2 -O0 -DDEBUG_MEMORY_ALLOC -DDISABLE_FORCED_INLINE -D_DEBUG -DDEBUG=1 -DDEBUG_ENABLED -DVULKAN_ENABLED -std=gnu++17 -fno-aligned-allocation -DNEED_LONG_INT -DLIBYUV_DISABLE_NEON -DIOS_ENABLED -DUNIX_ENABLED -DCOREAUDIO_ENABLED -fmodules -fcxx-modules -miphoneos-version-min=10.0 -fobjc-arc -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -fno-exceptions -Wno-ambiguous-macro -Wall -Werror=return-type -arch armv7 -isysroot -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk -DPTRCALL_ENABLED -I. -Igodot -Igodot/platform/ios plugins/gamecenter/game_center.mm
While building module 'GameKit' imported from plugins/gamecenter/game_center_delegate.h:31:
While building module 'simd' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/GameKit.framework/Headers/GameKit.h:3:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/usr/include/simd/simd.h:23:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/usr/include/simd/matrix.h:1105:25: error: use of undeclared identifier 'vzip1q_f32'; did you mean 'vzipq_f32'? [2]
simd_float4 __r01 = vzip1q_f32(__x0, __x1);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/arm_neon.h:32079:20: note: 'vzipq_f32' declared here [2]
__ai float32x4x2_t vzipq_f32(float32x4_t __p0, float32x4_t __p1) {
^
....
Someone posted this on apple forums claiming that the issue is on apple's end, but I wanted to double check here. https://developer.apple.com/forums/thread/740770?login=true&page=1#770668022
I just saw this on the Godot 4 issue thread but thought I'd respond here as it's more relevant. I have not found a workaround yet as it seems to be an Apple SDK issue because it's to do with the import of GameKit.h.
I also tested this with Godot 3.5 and got the same issue, if I can find a way to rollback the iOS SDK version I might try that and see if it works.
Seems like scripts still include armv7
, and Xcode 15 doesn't have support for 32-bit iOS anymore. Godot is also built without 32-bit support, so it should be removed.
Just removed all reference to armv7 in code and it works now! Thank you so much.
@nicoformaggio oh nice! Can you share your diff so I can fix it on my end too?