Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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.

— asked October 21st 2010 by Richard Baughman
  • 1.4.2
  • 1.5.0
  • build
  • iphone
  • mobile
  • sdk
0 Comments

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.

    — answered October 21st 2010 by Sheryl Butler
    permalink
    0 Comments
  • 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.

    — answered October 21st 2010 by John McKnight
    permalink
    0 Comments
  • Thanks, John. I tried this by:

    1. Closing the Ti IDE
    2. removing 1.4.2 and 1.5.0 entirely from /Library…
    3. clearing my project's build/iphone/build/ directory (leaving the empty dir itself)
    4. Unzipping the 1.4.2 and 1.5.0 into my ~/Library/Application Support/Titanium dir
    5. 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
    
    — answered October 22nd 2010 by Richard Baughman
    permalink
    0 Comments
  • 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!

    — answered October 22nd 2010 by Richard Baughman
    permalink
    1 Comment
    • Very odd. The steps you listed should have been enough to move from one version to another. It's what I do and I have never had to make a new project to change versions.

      — commented October 22nd 2010 by John McKnight
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.