I have an xcode Objective-C iPhone static library project. When I build it in xcode I get no errors or warnings. But when I build it using xcodebuild from the command line I get:
"/Developer/usr/bin/gcc" -v -dM -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk -E -arch armv6 -o - -x objective-c /dev/null
gcc-4.2: error trying to exec '/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1': execvp: No such file or directory
I cannot find anything that helps me to understand what the issue is, any ideas?
And yes the /Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 file does exist :-)
-
You should probably post the xcodebuild command line too, so that we can see the arguments etc that you are passing to it.Paul R– Paul R2010年06月05日 09:06:00 +00:00Commented Jun 5, 2010 at 9:06
-
I had it in a command shell target in xcode. I've just tried it from a command shell and it didn't produce the error. So I think it's something to do with running it from within Xcode.drekka– drekka2010年06月05日 09:09:36 +00:00Commented Jun 5, 2010 at 9:09
-
Nope, getting it in xcode as well now. Oh hang a sec, now it's gone, GRRR!drekka– drekka2010年06月06日 10:25:53 +00:00Commented Jun 6, 2010 at 10:25
1 Answer 1
For some reason what seemed to fix this for me is actually passing in the architectures to be used.
For instance, this command fails:
/Developer-SDK4/usr/bin/xcodebuild -target ProjectName -configuration Release build PLATFORM_NAME=iphonesimulator BUILDSDK=/Developer-SDK4
But this one works:
/Developer-SDK4/usr/bin/xcodebuild -target ProjectName -configuration Release build PLATFORM_NAME=iphonesimulator BUILDSDK=/Developer-SDK4 ARCHS=i386
Note, this only failed for me when building against the simulator. Building against the device seemed to work just fine.
3 Comments
ARCHS=x86_64 worked for me in 2023, seems like this question is older, but it still lead me to the solution