Hi guys,
I'm starting to play with Alloy a little I've used both npm and github versions of it. Everything went fine with the installation, so I created a new Titanium Studio default template project, went to the command line ran: alloy new, the folder structure got created in my project along with the Alloy "Hello World" app, then I ran alloy compile, everything went fine here too. But when I run the app using alloy run I get the following error messages:
[INFO] Performing clean build [ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation) [ERROR] Error: Traceback (most recent call last): [INFO] File "/Users/lucian/Library/Application Support/Titanium/mobilesdk/osx/2.1.2.GA/iphone/builder.py", line 1309, in main [INFO] execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 T I_VERSION=%s %s %s" % (log_id,sdk_version,debugstr,kroll_coverage)],False) [INFO] File "/Users/lucian/Library/Application Support/Titanium/mobilesdk/osx/2.1.2.GA/iphone/builder.py", line 1215, in execute_xcode [INFO] output = run.run(args,False,False,o) [INFO] File "/Users/lucian/Library/Application Support/Titanium/mobilesdk/osx/2.1.2.GA/iphone/run.py", line 41, in run [INFO] sys.exit(rc) [INFO] SystemExit: 65Running
alloy run once more, starts the app in the iOS Simulator but the app closes itself right after it displays the splash screen. What am I doing wrong here?
Thanks!
4 Answers
Accepted Answer
OK, we figured out what's going on!
There is a bug in the iPhone build scripts when compiling a project that uses a module, that module is accidentally duplicated in the list of libraries to link with. Furthermore, it only seems happens when the module has a dependency on another native library in which case Xcode finds duplicate symbols from the module's dependencies.
So, to test this, you can remove the offending module from the tiapp.xml, clean the project, and build again. If it works, then you have two options:
1) Discontinue use of the module until the we ship a fix in a couple weeks
2) Hack your builder.py in the Titanium SDK's iphone directory by fixing the Python code to not insert duplicate entries into the module_lib_search_path variable around line 825 and 833
Let me know if the module was the problem. Good luck!
I just tested following your steps and the Hello World app runs for me. Also since alloy new and compile run as expected it appears it's not a path issue. If you not already done so can you npm install the latest Alloy, and try again? Another thing to try is run or debug the Alloy application project from Titanium Studio as you would do in non Alloy projects.
I saw this same error for the first time today. I was unable to figure out exactly what was causing the problem.
For starters, this error is NOT an Alloy specific error. It's not related to a specific version of the Titanium SDK either. It happened for me regardless what SDK version (2.1.1, 2.1.2, 3.0.0). Running clean did not fix the problem either.
I sorta forgot about it for an hour, then I manually ran builder.py from the command line and it worked. After that, I was able to successfully launch my app in the iPhone Simulator. After that, I can run the simulator from Titanium Studio again.
This may be a Titanium Studio bug. I'll keep an eye on it.
I have a couple of projects with alloy in the name (AlloyHunter and alloy_fugitive) and they work fine. I'm running Alloy 0.2.34 with the 2.1.3RC SDK. I haven't upgraded Xcode to v4.5 yet on this machine. I wonder what differs between our setups that I can use "alloy" in the name and you cannot?
Your Answer
Think you can help? Login to answer this question!