question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Symbol not found: _objc_alloc_init

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Tom-Skicommented, Feb 23, 2021

@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

1reaction
obigucommented, Feb 22, 2021

@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-min was being set to 6 instead of 8 which 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Objective-C Class Reference: Symbols not found error
If the files are added to the project, then make sure that the implementation (.m) files for these missing classes are added to...
Read more >
Symbol(s) not found for arm64 | Apple Developer Forums
My app builds and runs fine on the Sim and on the phone/Watch, but fails with "Symbol(s) not found for arm64". when building...
Read more >
Undefined symbols for some ObjC files - CMake Discourse
Hi guys. Im breaking my head for days because a problem. Im getting undefined error without any reason apparently: Undefined symbol: ...
Read more >
Undefined symbol on Flipper using 0.62 on real iOS device
I'm not able to run the 0.62 version of the react native when I target a real device on the XCode. Using the...
Read more >
Objective-C Metadata & Symbols in Swift & Objective-C Apps
strings test.bin Hello world Class1 Class2 myMethod alloc init v16@0:8 ... For Objective-C code, the function symbol is not needed, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found