0
votes

I always get the same strange error when I try to create .ipa from the iOS version of my libGDX game.I use robovm version 2.3.5. The error only shows this message on robovm console :

`[ERROR] Undefined symbols for architecture armv7:
[ERROR]   "std::_Rb_tree_decrement(std::_Rb_tree_node_base*)", referenced from:
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree > >, std::_Select1st > > >, std::less, std::allocator > > > >::_M_insert_unique(std::_Rb_tree_iterator > > >, std::pair > > const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       ...
[ERROR]   "std::_Rb_tree_increment(std::_Rb_tree_node_base*)", referenced from:
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::User2InternalIndex::buildMapping() in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree > >, std::_Select1st > > >, std::less, std::allocator > > > >::_M_insert_unique(std::_Rb_tree_iterator > > >, std::pair > > const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]   "std::string::_Rep::_S_empty_rep_storage", referenced from:
[ERROR]       std::map, std::allocator > >::operator[](int const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::map, std::allocator > >::operator[](std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::writeGraphvizDotFile(btInverseDynamicsBullet3::MultiBodyTree const*, btInverseDynamicsBullet3::MultiBodyNameMap const*, char const*) in libgdx-bullet.a(MultiBodyTreeDebugGraph.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) in libgdx-bullet.a(extras_wrap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) in libgdx-bullet.a(extras_wrap.o)
[ERROR]   "std::string::assign(std::string const&)", referenced from:
[ERROR]       btInverseDynamicsBullet3::MultiBodyNameMap::addBody(int, std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::MultiBodyNameMap::addJoint(int, std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::MultiBodyNameMap::getBodyName(int, std::string*) const in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::MultiBodyNameMap::getJointName(int, std::string*) const in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]   "std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)", referenced from:
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::_Rb_tree_iterator >, std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_insert_unique(std::pair const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       std::_Rb_tree > >, std::_Select1st > > >, std::less, std::allocator > > > >::_M_insert_unique(std::_Rb_tree_iterator > > >, std::pair > > const&) in libgdx-bullet.a(User2InternalIndex.o)
[ERROR]       ...
[ERROR]   "std::string::_Rep::_M_destroy(std::allocator const&)", referenced from:
[ERROR]       std::map, std::allocator > >::operator[](int const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::map, std::allocator > >::operator[](std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       btInverseDynamicsBullet3::writeGraphvizDotFile(btInverseDynamicsBullet3::MultiBodyTree const*, btInverseDynamicsBullet3::MultiBodyNameMap const*, char const*) in libgdx-bullet.a(MultiBodyTreeDebugGraph.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) in libgdx-bullet.a(extras_wrap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase(std::_Rb_tree_node >*) in libgdx-bullet.a(extras_wrap.o)
[ERROR]   "std::basic_string, std::allocator >::basic_string(std::string const&)", referenced from:
[ERROR]       std::map, std::allocator > >::operator[](int const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::map, std::allocator > >::operator[](std::string const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_create_node(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR]       std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_create_node(std::pair const&) in libgdx-bullet.a(MultiBodyNameMap.o)
[ERROR] ld: symbol(s) not found for architecture armv7
[ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] Couldn't create IPA
org.apache.commons.exec.ExecuteException: Command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -o /var/folders/g8/ngcg1rn95r506xwdly9s9t2r0000gn/T/robovm1251516344287298932.tmp/thumbv7/IOSLauncher -arch armv7 -Wl,-filelist,/var/folders/g8/ngcg1rn95r506xwdly9s9t2r0000gn/T/robovm1251516344287298932.tmp/thumbv7/objects0 -w -L /Users/macUser/.robovm-sdks/robovm-2.3.5/lib/vm/ios/thumbv7 -ObjC -exported_symbols_list /var/folders/g8/ngcg1rn95r506xwdly9s9t2r0000gn/T/robovm1251516344287298932.tmp/thumbv7/exported_symbols -Wl,-no_implicit_dylibs -Wl,-dead_strip -fPIC -miphoneos-version-min=7.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -lrobovm-bc -force_load /Users/macUser/.robovm-sdks/robovm-2.3.5/lib/vm/ios/thumbv7/librobovm-rt.a -lrobovm-core -lgc -lpthread -ldl -lm -lz -liconv -lsqlite3 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework CoreGraphics -framework OpenAL -framework AudioToolbox -framework AVFoundation -force_load /Users/macUser/.robovm/cache/ios/thumbv7/release/Users/macUser/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-box2d-platform/1.9.8/eb549ac5a5dbb5663eacf782d8cb8f22731638e0/gdx-box2d-platform-1.9.8-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libgdx-box2d.a -force_load /Users/macUser/.robovm/cache/ios/thumbv7/release/Users/macUser/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-bullet-platform/1.9.8/44de3e9678419ae2a4cfe7fd674b1bf82d56ae20/gdx-bullet-platform-1.9.8-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libgdx-bullet.a -force_load /Users/macUser/.robovm/cache/ios/thumbv7/release/Users/macUser/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-platform/1.9.8/6e511ad1e19a8c5f792bb149d78c4e7e6f9e828f/gdx-platform-1.9.8-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libgdx.a -force_load /Users/macUser/.robovm/cache/ios/thumbv7/release/Users/macUser/.gradle/caches/modules-2/files-2.1/com.badlogicgames.gdx/gdx-platform/1.9.8/6e511ad1e19a8c5f792bb149d78c4e7e6f9e828f/gdx-platform-1.9.8-natives-ios.jar.extracted/META-INF/robovm/ios/libs/libObjectAL.a -lz -framework MobileCoreServices -Xlinker -sdk_version -Xlinker 12.1 -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks' failed (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:346)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:149)
    at org.robovm.compiler.util.Executor.exec(Executor.java:344)
    at org.robovm.compiler.util.ToolchainUtil.link(ToolchainUtil.java:385)
    at org.robovm.compiler.target.AbstractTarget.doBuild(AbstractTarget.java:276)
    at org.robovm.compiler.target.ios.IOSTarget.doBuild(IOSTarget.java:349)
    at org.robovm.compiler.target.AbstractTarget.build(AbstractTarget.java:270)
    at org.robovm.compiler.Linker.link(Linker.java:433)
    at org.robovm.compiler.AppCompiler.compile(AppCompiler.java:466)
    at org.robovm.compiler.AppCompiler.build(AppCompiler.java:784)
    at org.robovm.idea.compilation.RoboVmCompileTask$1.doCompile(RoboVmCompileTask.java:123)
    at org.robovm.idea.compilation.RoboVmCompilerThread.run(RoboVmCompilerThread.java:66)`

This is my build.graddle :

`buildscript {


    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://plugins.gradle.org/m2/" }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        jcenter()
        apply plugin: 'signing'
        google()
    }
    dependencies {
        classpath 'org.wisepersist:gwt-gradle-plugin:1.0.6'
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.5'


    }
}

allprojects {
    apply plugin: "eclipse"
    apply plugin: "idea"

    version = '1.0'
    ext {
        appName = "Debt Collector"
        gdxVersion = '1.9.8'
        roboVMVersion = '2.3.5'
        box2DLightsVersion = '1.4'
        ashleyVersion = '1.7.0'
        aiVersion = '1.8.0'
    }

    repositories {
        mavenLocal()
        mavenCentral()
        google()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}

project(":android") {
    apply plugin: "android"

    configurations { natives }

    dependencies {
        implementation project(":core")
        implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
        implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
        implementation "com.badlogicgames.gdx:gdx-ai:$aiVersion"
        implementation "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-x86_64"

    }
}


project(":core") {
    apply plugin: "java"


    dependencies {
        implementation "com.badlogicgames.gdx:gdx:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-ai:$aiVersion"
        implementation "io.socket:socket.io-client:1.0.0"
        implementation files("build/libs/kryonet-2.21-all.jar")
        implementation "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"

    }
}

project(":ios") {
    apply plugin: "java"
    apply plugin: "robovm"


    dependencies {
        implementation project(":core")
        implementation "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
        implementation "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
        implementation "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
        implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
        implementation "com.badlogicgames.gdx:gdx-bullet:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-ios"
        implementation files("build/libs/kryonet-2.21-all.jar")


    }
}

project(":desktop") {
    apply plugin: "java"


    dependencies {
        implementation project(":core")
        implementation "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
        implementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
        implementation "com.badlogicgames.gdx:gdx-bullet-platform:1.9.1:natives-desktop"

    }
}

project(":html") {
    apply plugin: "gwt"
    apply plugin: "war"


    dependencies {
        implementation project(":core")
        implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
        implementation "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
        implementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources"
        implementation "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources"
        implementation "com.badlogicgames.gdx:gdx-ai:$aiVersion:sources"

    }
}

tasks.eclipse.doLast {
    delete ".project"
}`

How i can use bullet 1.9.8 to create ipa with libgdx without error of that compile in libgdx ?.

1

1 Answers

0
votes

Updating libGDX to version 1.9.9 seems to resolve the error.

Also, I got the same error on 1.9.8. I think it was due to an update on ios.iml configuration file. I had to remove the Android facet part from this file because another build error, hence (my guess) disabling different architectures dependencies on iOS target.

Another solution is remove the bullet physics engine dependency. The error source. Simple removing the line from iOS:

project(":ios") {
    apply plugin: "java"
    apply plugin: "robovm"

    dependencies {
        implementation project(":core")
        implementation "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
        implementation "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
        implementation "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
        implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
        //remove this line
        //implementation "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-ios"
    }
}

Of course, it won't make sense if you are actually using the bullet engine.