libgdx: Symbol not found: _objc_alloc_init
Issue details
After updating to LibGDX 1.9.15-SNAPSHOT, the app crashes on iOS < 13 with this error:
dyld: lazy symbol binding failed: Symbol not found: _objc_alloc_init
Referenced from: /Users/cellcrowd/Library/Developer/CoreSimulator/Devices/D387FB2F-A92D-44F9-A7DB-D3FCB8AAF3D1/data/Containers/Bundle/Application/EE9AFCF3-4FF3-4F64-91D7-08387A843DC3/IOSLauncher.app/IOSLauncher
Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation
dyld: Symbol not found: _objc_alloc_init
Referenced from: /Users/cellcrowd/Library/Developer/CoreSimulator/Devices/D387FB2F-A92D-44F9-A7DB-D3FCB8AAF3D1/data/Containers/Bundle/Application/EE9AFCF3-4FF3-4F64-91D7-08387A843DC3/IOSLauncher.app/IOSLauncher
Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation
Reproduction steps/code
Updated to LibGDX 1.9.15-SNAPSHOT from LibGDX 1.9.13 (=no crashes) Cleaned project, cleared MobiVM and IntelliJ caches
Version of LibGDX and/or relevant dependencies
LibGDX 1.9.15-SNAPSHOT App crashes with given error on iOS < 13. Works on iOS >= 13
LibGDX 1.9.14 Compiling fails with duplicate symbol errors which has been reported and identified as a regression at https://github.com/libgdx/libgdx/issues/6402
LibGDX 1.9.13 Works on all iOS versions
All of the above using: MobiVM 2.3.12 IntelliJ 2020.2.4 (community edition) XCode 12.4
Several Firebase frameworks are added: https://github.com/dkimitsa/robovm-robopods/issues/8
Please select the affected platforms
- Android
- iOS
- HTML/GWT
- Windows
- Linux
- MacOS
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (10 by maintainers)
@obigu this issue was that new xcode is ignoring that flag. When building with xcodebuild to build the audio backend it was overriding it to latest for the system, 14.2. jnigen was fine when i looked at it, (it does not use xcodebuild to generate natives), and no warnings for versions in logs
@cellcrowd Ok, good news, feel free to close the issue, I’ll keep banging my head against the wall to try to understand what’s wrong with my env.
I think the culprit has to do with the fact that we have migrated to gdx-jnigen to build natives and
-miphoneos-version-minwas being set to6instead of8which was causing problems. (https://github.com/libgdx/gdx-jnigen/blob/f9be183adefb5fe9c8917a1b83bc7f9cc8961200/gdx-jnigen/src/main/resources/com/badlogic/gdx/jnigen/resources/scripts/build-ios.xml.template#L87)@Tom-Ski Thanks for the fix.
Had to wait an eternity for Xcode to update from 12 to 12.4, just to confirm that not be an issue
Refreshed snapshot/gradle, cleared cache, compiled, and is now deploying on both my iOS 12 and 14 devices. Seems it’s fixed, was something specific changed in the snapshot?
Please try the latest snapshot and let me know how that goes
Ok, good to see it’s the same issue.
I’m not sure why it may be that it seems to fail on different libGDX and iOS combinations for the 3 of us.
Here is my matrix:
If I understand correctly, this is @cellcrowd
And @yajirobe69 this is your matrix right?
To discard it’s related to the device/iPad OS I’ve tried testing on iPhone 8 and iPad (8th Gen) simulators and results are consistent