Problem building with latest 1.4.2 and 1.5.0 builds
Has anyone had a problem using the latest nightly builds of Ti Mobilesdk? Perhaps I'm doing something wrong… downloaded, unzipped (as root) latest Mac OS X builds for 1.4.2 and 1.5.0 into /Library/Application Support/Titanium, but that results in some *.h files being read-by-owner only (0600), and when I fix those the build fails at the load phase:
[INFO] One moment, building ...
[TRACE] app property, ti.android.google.map.api.key.development : 0ZnKXkWA2dIAu2EM-OV4ZD2lJY3sEWE5TSgjJNg
[INFO] Titanium SDK version: 1.5.0
[INFO] iPhone Device family: iphone
[INFO] iPhone SDK version: 4.1
[DEBUG] copy resources from /Users/rich/Documents/iPhone/CollegeSearch/Resources/iphone
to /Users/rich/Documents/iPhone/CollegeSearch/build/iphone/build/Debug-iphonesimulator/CollegeSearch.app
[INFO] Skipping JS compile, running from simulator
Ld build/Debug-iphonesimulator/CollegeSearch.app/CollegeSearch normal i386
cd /Users/rich/Documents/iPhone/CollegeSearch/build/iphone
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2
-arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk
-L/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/build/Debug-iphonesimulator
-L/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/lib
-L/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../../tmp/debug/build
-L/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../../tmp/staticlib/build/Debug-iphonesimulator
-L/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../tijs/TiCore/TiCore/build/Release-iphonesimulator
-F/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/build/Debug-iphonesimulator
-filelist /Users/rich/Documents/iPhone/CollegeSearch/build/iphone/build/CollegeSearch.build/Debug-iphonesimulator/CollegeSearch.build/Objects-normal/i386/CollegeSearch.LinkFileList
-mmacosx-version-min=10.6 -ObjC -weak_framework iAd -Xlinker -objc_abi_version -Xlinker 2 -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 -framework ExternalAccessory -ltiverify
-o /Users/rich/Documents/iPhone/CollegeSearch/build/iphone/build/Debug-iphonesimulator/CollegeSearch.app/CollegeSearch
ld: warning: directory '/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../../tmp/debug/build' following -L not found
ld: warning: directory '/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../../tmp/staticlib/build/Debug-iphonesimulator' following -L not found
ld: warning: directory '/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../tijs/TiCore/TiCore/build/Release-iphonesimulator' following -L not found
Undefined symbols:
"_OBJC_CLASS_$_SBJSON", referenced from:
objc-class-ref-to-SBJSON in libtiverify.a(TiVerify.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
PhaseScriptExecution Post-Compile build/CollegeSearch.build/Debug-iphonesimulator/CollegeSearch.build/Script-24CA8D03111169070084E2DE.sh
cd /Users/rich/Documents/iPhone/CollegeSearch/build/iphone
Any ideas what's causing this? Why is it looking for a tmp/ dir in what is essentially my home dir ~/? Both 1.4.2 and 1.5.0 get the same result.
4 Answers
-
I also cannot get 1.4.2 to build for iPhone, can't even build a new project. It does work for Android, however.
-
You don't need to put the new builds in /Library/Application Support/Titanium, you can put them in ~/Library/Application Support/Titanium and skip the sudo part entirely as it will be in your user folder and running in your own permissions. Right now I have just the initial SDK in /Library because that is where it put it but all the rest are in my user folder.
I just downloaded the 1.5.0 nightly yesterday and dropped it into my user's folder with no issue. It's a good idea to empty the target folder if it already has something in it because you may litter your new build with outdated files.
By way of example the final path would look something like this
/Users/[yourusername]/Library/Application Support/Titanium/mobilesdk/osx/1.5.0
FYI - I have seen that SBJSON error if you don't empty your folder first.
-
Thanks, John. I tried this by:
- Closing the Ti IDE
- removing 1.4.2 and 1.5.0 entirely from /Library…
- clearing my project's build/iphone/build/ directory (leaving the empty dir itself)
- Unzipping the 1.4.2 and 1.5.0 into my ~/Library/Application Support/Titanium dir
- Restarting Ti and doing a full build.
Still failed, same problem. Note that in the build.log these messages seem key:
ld: warning: directory '/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../../tmp/debug/build' following -L not found ld: warning: directory '/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../../tmp/staticlib/build/Debug-iphonesimulator' following -L not found ld: warning: directory '/Users/rich/Documents/iPhone/CollegeSearch/build/iphone/../../../tijs/TiCore/TiCore/build/Release-iphonesimulator' following -L not found ld: library not found for -lTiCore collect2: ld returned 1 exit status
-
Issue resolved by creating a brand new project, then copying in the Resources/ directory from the old project, and rebuilding from there using the 1.5.0 SDK. Seems that from time to time, when switching to a new Ti SDK you need to do this to create a truly "clean slate".
Confirmed that another project also required the exact same steps (going from 1.4.1.1 to 1.5.0).
Thanks, Clint!