Paresh Masani
Paresh Masani

Reputation: 7504

XCode 3.x to 4.0 upgrade issue

I have just upgraded XCode 3.x to 4.0 and ran into following build error.

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

I tried juggling around this error but couldn't get rid of it. Does anyone know fix for this please?

Complete error message:

Ld /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/myApp.app/myApp normal armv7 cd "/xcode - svn/TheAppStudio/TheAppStudio" setenv IPHONEOS_DEPLOYMENT_TARGET 4.2 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos -F/Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos -filelist /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Intermediates/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/armv7/myApp.LinkFileList -dead_strip -all_load -ObjC -miphoneos-version-min=4.2 -framework Foundation -framework UIKit -framework CoreGraphics -framework QuartzCore /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20.a /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20Core.a /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20Network.a /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20Style.a /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20UI.a /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20UICommon.a /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20UINavigator.a -framework Security -framework SystemConfiguration -framework MessageUI -framework AVFoundation -framework MediaPlayer -framework CoreLocation -framework CoreLocation -framework MapKit -framework CFNetwork -framework AudioToolbox -lz.1.2.3 -framework MobileCoreServices -lxml2 -o /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/myApp.app/myApp

arm-apple-darwin10-gcc-4.2.1: /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20.a: No such file or directory arm-apple-darwin10-gcc-4.2.1: /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20Core.a: No such file or directory arm-apple-darwin10-gcc-4.2.1: /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20Network.a: No such file or directory arm-apple-darwin10-gcc-4.2.1: /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20Style.a: No such file or directory arm-apple-darwin10-gcc-4.2.1: /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20UI.a: No such file or directory arm-apple-darwin10-gcc-4.2.1: /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20UICommon.a: No such file or directory arm-apple-darwin10-gcc-4.2.1: /Users/xxx/Library/Developer/Xcode/DerivedData/myApp-ddoknnyqnanytlcpbqpazmjjqbpx/Build/Products/Debug-iphoneos/libThree20UINavigator.a: No such file or directory Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Thanks.

PS: I tried cleaning up the solution and also verified Library Search path is the same as another machine where it works fine.

Upvotes: 1

Views: 988

Answers (2)

Paresh Masani
Paresh Masani

Reputation: 7504

I have sorted this out. The situation was littel bit weird. The three20 libraries base SDK was setup to iphonesimulator and hence, it was generating *.a files for simulator path ..../Debug-iphonesimulator but my project was trying to look them on .../Debug-iphoneos path. The three20 library wasn't allowing me to build for iPhone unless I had removed iphonesimulator from supported platform and changed base SDK to iphones. Rebuild all three20 projects individually and then it worked fine!!

Upvotes: 1

macshome
macshome

Reputation: 949

If cleaning the target in Xcode didn't work, try just trashing the build directory that's in your DerivedData folder for that app.

Upvotes: 0

Related Questions