Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to run on device as of 2.0 #1

Closed
ddanna opened this issue Jul 4, 2012 · 7 comments
Closed

Fails to run on device as of 2.0 #1

ddanna opened this issue Jul 4, 2012 · 7 comments

Comments

@ddanna
Copy link

ddanna commented Jul 4, 2012

I recently discovered your module and am loving how it performs on the simulator. It does exactly what I need with no hassle. When I'm using your module, however, I am unable to run on device from Titanium and the project won't compile in Xcode. Here's the error from the build.log:

** BUILD FAILED **

The following build commands failed:
Ld "build/APPNAME.build/Debug-iphoneos/APPNAME-universal.build/Objects-normal/armv6/APPNAME" normal armv6
(1 failure)
EXIT CODE WAS: 65

Exception detected in script:
Traceback (most recent call last):
File "/Users/USERNAME/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1465, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Users/USERNAME/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1224, in execute_xcode
output = run.run(args,False,False,o)
File "/Users/USERNAME/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/run.py", line 41, in run
sys.exit(rc)
SystemExit: 65


From Xcode:

Undefined symbols for architecture i386:
"OBJC_CLASS$_TiUITabGroupProxy", referenced from:
OBJC_CLASS$_TiUITabGroupProxyEx in libcom.obscure.tiuiex.a(TiUITabGroupProxyEx.o)
(maybe you meant: OBJC_CLASS$_TiUITabGroupProxyEx)
"OBJC_METACLASS$_TiUITabGroupProxy", referenced from:
OBJC_METACLASS$_TiUITabGroupProxyEx in libcom.obscure.tiuiex.a(TiUITabGroupProxyEx.o)
(maybe you meant: OBJC_METACLASS$_TiUITabGroupProxyEx)
"OBJC_CLASS$_TiUIImageView", referenced from:
OBJC_CLASS$_ComObscureTiUIExImageView in libcom.obscure.tiuiex.a(ComObscureTiUIExImageView.o)
"OBJC_METACLASS$_TiUIImageView", referenced from:
OBJC_METACLASS$_ComObscureTiUIExImageView in libcom.obscure.tiuiex.a(ComObscureTiUIExImageView.o)
"OBJC_METACLASS$_TiUIImageViewProxy", referenced from:
OBJC_METACLASS$_ComObscureTiUIExImageViewProxy in libcom.obscure.tiuiex.a(ComObscureTiUIExImageViewProxy.o)
"OBJC_CLASS$_TiUIImageViewProxy", referenced from:
OBJC_CLASS$_ComObscureTiUIExImageViewProxy in libcom.obscure.tiuiex.a(ComObscureTiUIExImageViewProxy.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@pegli
Copy link
Collaborator

pegli commented Jul 4, 2012

Whenever you get "SystemExit: 65", it means that there was a problem with the call to xcodebuild in the build.py script. To find out what the actual error is, open the build/iphone/build/build.log file and scroll to the end. The actual compile or link error should be listed near there.

The problem with building in Xcode appears to be that Xcode can't find the Titanium SDK classes required to compile the module. Check the titanium.xcconfig file and make sure the path to the SDK is correct. On my system, I put the SDK under /Users/paul/Library/Application Support/Titanium, but you may have installed it into another location on your system.

You should be able to use the compiled version of the module that is available on the Downloads section of the project here on Github. I've been using the module in a couple of projects that are installing to various devices and haven't seen the problem that you describe with the module running on the simulator but not the device.

@ddanna
Copy link
Author

ddanna commented Jul 10, 2012

In TitaniumStudio, run as iPad simulator works; Run on iOS device fails.

Here's the resulting build.log contents (cropped to where the error starts):

Ld "build/APPNAME.build/Debug-iphoneos/APPNAME-universal.build/Objects-normal/armv7/APPNAME" normal armv7
cd "/Users/USERNAME/Documents/Titanium Studio Workspace/OCS/build/iphone"
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk "-L/Users/USERNAME/Documents/Titanium Studio Workspace/OCS/build/iphone/build/Debug-iphoneos" "-L/Users/USERNAME/Documents/Titanium Studio Workspace/OCS/build/iphone/lib" "-L/Users/USERNAME/Library/Application Support/Titanium/modules/iphone/com.obscure.TiUIEx/1.0" "-L/Users/USERNAME/Library/Application Support/Titanium/modules/iphone/com.obscure.TiUIEx/1.0" "-F/Users/USERNAME/Documents/Titanium Studio Workspace/OCS/build/iphone/build/Debug-iphoneos" -filelist "/Users/USERNAME/Documents/Titanium Studio Workspace/OCS/build/iphone/build/APPNAME.build/Debug-iphoneos/APPNAME-universal.build/Objects-normal/armv7/APPNAME.LinkFileList" -dead_strip -ObjC -weak_framework iAd -weak_framework iAd -weak_framework CoreVideo -weak_framework CoreMedia -miphoneos-version-min=4.0 -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework CFNetwork -framework CoreLocation -framework MapKit -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -lsqlite3 -lz -framework AudioToolbox -weak_framework MediaPlayer -framework AVFoundation -lxml2 -framework StoreKit -lTiCore -lcom.obscure.tiuiex -lcom.obscure.tiuiex -ltiverify -lti_ios_debugger -licucore -o "/Users/USERNAME/Documents/Titanium Studio Workspace/OCS/build/iphone/build/APPNAME.build/Debug-iphoneos/APPNAME-universal.build/Objects-normal/armv7/APPNAME"
Undefined symbols for architecture armv7:
"OBJC_CLASS$_TiUIImageViewProxy", referenced from:
OBJC_CLASS$_ComObscureTiUIExImageViewProxy in libcom.obscure.tiuiex.a(ComObscureTiUIExImageViewProxy.o)
"OBJC_METACLASS$_TiUITabGroupProxy", referenced from:
OBJC_METACLASS$_TiUITabGroupProxyEx in libcom.obscure.tiuiex.a(TiUITabGroupProxyEx.o)
(maybe you meant: OBJC_METACLASS$_TiUITabGroupProxyEx)
"OBJC_CLASS$_TiUIImageView", referenced from:
OBJC_CLASS$_ComObscureTiUIExImageView in libcom.obscure.tiuiex.a(ComObscureTiUIExImageView.o)
"OBJC_METACLASS$_TiUIImageViewProxy", referenced from:
OBJC_METACLASS$_ComObscureTiUIExImageViewProxy in libcom.obscure.tiuiex.a(ComObscureTiUIExImageViewProxy.o)
"OBJC_METACLASS$_TiUIImageView", referenced from:
OBJC_METACLASS$_ComObscureTiUIExImageView in libcom.obscure.tiuiex.a(ComObscureTiUIExImageView.o)
"OBJC_CLASS$_TiUITabGroupProxy", referenced from:
OBJC_CLASS$_TiUITabGroupProxyEx in libcom.obscure.tiuiex.a(TiUITabGroupProxyEx.o)
(maybe you meant: OBJC_CLASS$_TiUITabGroupProxyEx)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
Ld "build/APPNAME.build/Debug-iphoneos/APPNAME-universal.build/Objects-normal/armv6/APPNAME" normal armv6
Ld "build/APPNAME.build/Debug-iphoneos/APPNAME-universal.build/Objects-normal/armv7/APPNAME" normal armv7
(2 failures)
EXIT CODE WAS: 65

Exception detected in script:
Traceback (most recent call last):
File "/Users/USERNAME/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1465, in main
execute_xcode("iphoneos%s" % iphone_version,args,False)
File "/Users/USERNAME/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/builder.py", line 1224, in execute_xcode
output = run.run(args,False,False,o)
File "/Users/USERNAME/Library/Application Support/Titanium/mobilesdk/osx/2.0.1.GA2/iphone/run.py", line 41, in run
sys.exit(rc)
SystemExit: 65

@ddanna
Copy link
Author

ddanna commented Jul 16, 2012

So, no update? I have yet to figure out how to get this to work on a device.

If you need more info to help debug this please let me know... I tried creating a new project and adding your module, as soon as your module is included the app will no longer run on device.

@pegli
Copy link
Collaborator

pegli commented Jul 16, 2012

I've been using this module on an active project for several months and haven't seen this build error. On the off chance that I had something weird in my development environment, I pulled the code to a new directory, built, installed the module, and rebuilt the project that uses it, but it didn't fail in the manner you describe.

Does your test project include both a Ti.UI.ImageView and Ti.UI.TabGroup? Maybe the titanium compiler is leaving those out because they aren't referenced in your .js files.

@ddanna
Copy link
Author

ddanna commented Jul 17, 2012

The test project I created was the default Titanium project, with a tab group which had 2 views in it. I didn't add any code, didn't even create the TiUIEx object, and the app would not run on device. The only thing I did after creating the new test project was add the module. I've tried countless things to try and fix this and have been unsuccessful, it's really disappointing for me because the module works so very well in the simulator.

I appreciate any further insight you may have.

@pegli
Copy link
Collaborator

pegli commented Aug 3, 2012

Can you try the new build that I posted a few days ago?

@pegli
Copy link
Collaborator

pegli commented Feb 22, 2013

It turns out this is a bug in the Titanium SDK (current version is 3.0.2.GA). See #2 for a workaround.

@pegli pegli closed this as completed Feb 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants