function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chrisn5555chrisn5555 

Unable to run install.sh libsbjson-ios.a not being built

I downloaded the latest version of the Mobile SDK today and ran ./install.sh but am getting build errors specifically with the json library.  The git commands seemed to work correctly and located all the libraries.  I have tried ./reset.sh and ./install.sh again with no change.  Here is the area that's failing:  (Note: all of the configurations for json lib fail the same way)

 

pre:

dependency.oauth.check:

iOSShared.dependency.oauth:

dependency.sbjson.check:

iOSShared.dependency.sbjson:

dependency.sbjson.compile:

initArtifacts:
     [echo] artifacts.dir is '/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/sfdc_build/artifacts'

pre:

build:

compileDebug:

iOSShared.compile:
     [echo] installing SBJson for SDK iphoneos
     [exec] Build settings from command line:
     [exec]     INSTALL_ROOT = /Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/sfdc_build/artifacts/SBJson
     [exec]     SDKROOT = iphoneos5.0
     [exec]
     [exec] === BUILD NATIVE TARGET sbjson-ios OF PROJECT SBJson WITH CONFIGURATION Debug ===
     [exec] Check dependencies
     [exec]
     [exec] SetOwnerAndGroup "chrisn5555:staff" /Users/chrisn5555/Documents/xcode-shared/UninstalledProducts/libsbjson-ios.a
     [exec]     cd /Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/json-framework
     [exec]     setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/chrisn5555/Downloads/eclipse/plugins/org.jruby_1.2.0.9419p1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
     [exec]     /usr/sbin/chown -RH "chrisn5555:staff" /Users/chrisn5555/Documents/xcode-shared/UninstalledProducts/libsbjson-ios.a
     [exec]
     [exec] SetMode u+w,go-w,a+rX /Users/chrisn5555/Documents/xcode-shared/UninstalledProducts/libsbjson-ios.a
     [exec]     cd /Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/json-framework
     [exec]     setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/chrisn5555/Downloads/eclipse/plugins/org.jruby_1.2.0.9419p1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
     [exec]     /bin/chmod -RH u+w,go-w,a+rX /Users/chrisn5555/Documents/xcode-shared/UninstalledProducts/libsbjson-ios.a
     [exec]
     [exec]
     [exec] ** BUILD SUCCEEDED **
     [exec]

BUILD FAILED
/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/shared/build.xml:214: The following error occurred while executing this line:
/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/shared/build.xml:222: The following error occurred while executing this line:
/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/sfdc_build/build.xml:40: The following error occurred while executing this line:
/Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/sfdc_build/build.xml:58: Warning: Could not find file /Users/chrisn5555/Documents/sf/SalesforceMobileSDK-iOS/external/json-framework/json-framework/build/UninstalledProducts/libsbjson-ios.a to copy.

Best Answer chosen by Admin (Salesforce Developers) 
chrisn5555chrisn5555

After removing XCode and reinstalling completely I still had the same problem.  Had to create another user on my Mac and build there which worked!  So there is something in my local settings (I have already deleted the XCode prefs plist and recreated it) that is preventing the build from working.

All Answers

tstellanova-sfdctstellanova-sfdc

 

A couple of questions for you:

 

- Did you previously install the beta mobile SDK in the same location or is this a fresh latest SDK install? 

- Which version of Xcode are you using? (Are you using at least Xcode 4.2?)

 

I'm not able to reproduce this problem by installing a fresh latest SDK using Xcode 4.2.  

chrisn5555chrisn5555

I am using Xcode 4.2.1 on OSX Lion.  I have not installed any previous version of this library.  The issue seems to be that xcodebuild is ignoring the INSTALL_ROOT and is placing the built files into /Users/chrisn5555/Documents/xcode-shared folder instead.  When I was using XCode 3 I had previously setup a shared build folder as I was working with some shared libraries that required this.  It seems that this setting is still in effect even though I have XCode Location preferences set to Default.  Any ideas?

tstellanova-sfdctstellanova-sfdc

It sounds like this issue is specific to your Xcode installation.

 

My guess is that the custom build path you previously setup with Xcode 3 has been carried over to your Xcode 4.2.1 install.  Honestly I'm not sure where this is set or cleared in Xcode 4.2.1 but the Xcode docs should help you clear this value. 

 

When I encounter project build or dependency problems with Xcode 4.0+ , my first instinct is to clean my project, close Xcode, delete ~/Library/Developer/Xcode/DerivedData completely and reopen Xcode.  

 

Hope this helps...

 

 

 

 

 

chrisn5555chrisn5555

After removing XCode and reinstalling completely I still had the same problem.  Had to create another user on my Mac and build there which worked!  So there is something in my local settings (I have already deleted the XCode prefs plist and recreated it) that is preventing the build from working.

This was selected as the best answer
vulcanccitvulcanccit

Chris, I have a similar issue...after you created the new user and got the SDK installed, does everything work ok on your original user?  if so I am going to try your fix...

MattLacey.ax1065MattLacey.ax1065

Hey Guys,

 

This worked fine first time for me — I suspect you guys might be missing the Xcode command line tools which Apple removed as part of the default download. Go to your Xcode preferences and ensure they're installed:

 

Xcode Settings

e-bacho 2.0e-bacho 2.0

Hey guys, had the same problem, tried all the above (did not want to create new user only for this)...

 

Please refer to the answer on this link:

 

http://boards.developerforce.com/t5/forums/forumtopicprintpage/board-id/mobile/message-id/575/print-single-message/false/page/1

 

Followed the steps and it worked like a charm!