Getting this error "clang: error: linker command failed with exit code 1" in Robovm Studio?

767 views
Skip to first unread message

Steven Ferrarese

unread,
Feb 20, 2016, 11:50:22 PM2/20/16
to RoboVM

I just imported my libgdx project that I have been working on in android studio on windows to robovm studio on my mac.  
I first got an error for not finding signing identity and fixed that.

I got this while trying to run the iOS part, it works fine on android. 

Any ideas on what is causing this error ?

This is the log read out, 

[ERROR] ld: file not found: /Users/stevof12/Documents/zomd/ios/build/libs/ios/libgdx-box2d.a
[ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ERROR] Couldn't compile app
org.apache.commons.exec.ExecuteException: Command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -o "/Users/stevof12/Documents/zomd/ios/robovm-build/tmp/iOS Device/ios/x86_64/IOSLauncher" -arch x86_64 "-Wl,-filelist,/Users/stevof12/Documents/zomd/ios/robovm-build/tmp/iOS Device/ios/x86_64/objects0" -L /Users/stevof12/.robovm-sdks/robovm-1.13.0/lib/vm/ios/x86_64 -ObjC -exported_symbols_list "/Users/stevof12/Documents/zomd/ios/robovm-build/tmp/iOS Device/ios/x86_64/exported_symbols" -Wl,-no_implicit_dylibs -Wl,-dead_strip -fPIC -mios-simulator-version-min=6.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -lrobovm-bc -force_load /Users/stevof12/.robovm-sdks/robovm-1.13.0/lib/vm/ios/x86_64/librobovm-rt.a -lrobovm-debug -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/stevof12/Documents/zomd/ios/build/libs/ios/libgdx-box2d.a -force_load /Users/stevof12/Documents/zomd/ios/build/libs/ios/libgdx-bullet.a -force_load /Users/stevof12/Documents/zomd/ios/build/libs/ios/libgdx-freetype.a -force_load /Users/stevof12/Documents/zomd/ios/build/libs/ios/libgdx.a -force_load /Users/stevof12/Documents/zomd/ios/build/libs/ios/libObjectAL.a -framework MobileCoreServices -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:348)
at org.robovm.compiler.util.ToolchainUtil.link(ToolchainUtil.java:398)
at org.robovm.compiler.target.AbstractTarget.doBuild(AbstractTarget.java:272)
at org.robovm.compiler.target.ios.AppleDeviceTarget.doBuild(AppleDeviceTarget.java:536)
at org.robovm.compiler.target.AbstractTarget.build(AbstractTarget.java:266)
at org.robovm.compiler.Linker.link(Linker.java:439)
at org.robovm.compiler.AppCompiler.compile(AppCompiler.java:458)
at org.robovm.compiler.AppCompiler.build(AppCompiler.java:773)
at org.robovm.idea.compilation.RoboVmCompilerThread.doCompile(RoboVmCompilerThread.java:53)
at org.robovm.idea.compilation.RoboVmCompilerThread.run(RoboVmCompilerThread.java:59)

Mario Zechner

unread,
Feb 23, 2016, 7:06:15 AM2/23/16
to RoboVM
Hi,

what libGDX version are you running? Please post your robovm.xml and the ios/build.gradle file. It appears that the linker tries to find the file /Users/stevof12/Documents/zomd/ios/build/libs/ios/libgdx-box2d.a. However, that mechanism has changed in libGDX a long time ago. If you are on a libGDX version from before this change, there should be a task in the ios/build.gradle file that copies the static libraries to the ios/build/libs/ios directory.

Best,
Mario

Steven Ferrarese

unread,
Feb 24, 2016, 10:39:29 PM2/24/16
to RoboVM
I have updated libGDX to latest version now and runs fine on IOS simulator, but when I go to generate an IPA i get this error ,

my IOS launcher java class is called IOSLauncher in the ios/scr/com.zombie directory.


[ERROR] Couldn't create IPA
org.robovm.compiler.CompilerException: Main class com.zombie.IOSLauncher not found
at org.robovm.compiler.AppCompiler.getRootClasses(AppCompiler.java:262)
at org.robovm.compiler.AppCompiler.compile(AppCompiler.java:444)
at org.robovm.compiler.AppCompiler.build(AppCompiler.java:782)
at org.robovm.idea.compilation.RoboVmCompileTask$1.doCompile(RoboVmCompileTask.java:109)
at org.robovm.idea.compilation.RoboVmCompilerThread.run(RoboVmCompilerThread.java:59)

Kirill Prazdnikov

unread,
Feb 25, 2016, 5:28:59 AM2/25/16
to RoboVM
Is there a way to post libgdx issues on libgdx forum ? 

Mario Zechner

unread,
Feb 25, 2016, 11:55:15 AM2/25/16
to RoboVM
Yes there is, at https://www.badlogicgames.com/forum

This looks like the classes have not been comiled by Gradle. Please make sure you compile the Java classes before you invoke the createIPA task. The libGDX wiki guides you through the process https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline#packaging-for-ios.
Reply all
Reply to author
Forward
0 new messages