compile error for iphone simulator - iphone

I'm trying to compile some code for the iphone simulator but am getting this error:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -O3 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -Os -O3 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -Os -x objective-c -I../../include -c version.c
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:29,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:14,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:80,
from version.c:11:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:166: error: expected declaration specifiers or ‘...’ before ‘SecPadding’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:196: error: expected declaration specifiers or ‘...’ before ‘SecPadding’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:228: error: expected declaration specifiers or ‘...’ before ‘SecPadding’
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:257: error: expected declaration specifiers or ‘...’ before ‘SecPadding’
make: *** [version.o] Error 1
However, if I compile for the actual iphone, it works fine:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -O3 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -arch armv6 -Os -O3 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -arch armv6 -Os -x objective-c -I../../include -c version.c
This problem happens with a file as simple as just including Foundation.h with no other code:
#import <Foundation/Foundation.h>
Any ideas on what this is about? The strange this is that I would expect this to fail for both iphone and the simulator.
EDIT: fyi, I'm not using XCode. This is a large, multi-platform project using Makefiles. The commands you see above were emitted from the Makefile.

I saw the same thing. The fix is to add a -miphoneos-version-min=3.0 compiler directive.

The problem only happens if you use SDK 3.0 with the iphone simulator. Using SDK 2.0 (with gcc 4.0) will compile. This appears to be what XCode uses by default.
Its very odd that this problem is only for the simulator and not for the iphone itself. Also strange is that gcc4.2 won't compile with simulator sdk 2.0-- you have to use gcc4.0.
For the curious, I wrote a makefile that demonstrates the problem:
IPHONE_GCC_VER = 4.0
IPHONE_SDK_VER = 3.0
IPHONE_DEV_PATH = /Developer/Platforms/iPhoneOS.platform/Developer
IPHONE_SDK = $(IPHONE_DEV_PATH)/SDKs/iPhoneOS$(IPHONE_SDK_VER).sdk
IPHONE_GCC = $(IPHONE_DEV_PATH)/usr/bin/gcc-$(IPHONE_GCC_VER)
SIMULATOR_GCC_VER = 4.0
SIMULATOR_SDK_VER = 2.0
SIMULATOR_DEV_PATH= /Developer/Platforms/iPhoneSimulator.platform/Developer
SIMULATOR_SDK = $(SIMULATOR_DEV_PATH)/SDKs/iPhoneSimulator$(SIMULATOR_SDK_VER).sdk
SIMULATOR_GCC = $(SIMULATOR_DEV_PATH)/usr/bin/gcc-$(SIMULATOR_GCC_VER)
TEST_FILE=/tmp/test.m
all: info make-test-file
$(IPHONE_GCC) -isysroot $(IPHONE_SDK) -arch armv6 -c $(TEST_FILE)
$(SIMULATOR_GCC) -isysroot $(SIMULATOR_SDK) -arch i386 -c $(TEST_FILE)
info:
#echo "iphone gcc : $(IPHONE_GCC_VER)"
#echo "iphone sdk : $(IPHONE_SDK_VER)"
#echo "simulator gcc: $(SIMULATOR_GCC_VER)"
#echo "simulator sdk: $(SIMULATOR_SDK_VER)"
#echo ""
make-test-file:
echo "#import <Foundation/Foundation.h>" > $(TEST_FILE)
The defaults are the ones that work, but you can override them on the command-line. For example:
$ make -f Makefile.iphone-error-demo SIMULATOR_SDK_VER=3.0 SIMULATOR_GCC_VER=4.0
iphone gcc : 4.0
iphone sdk : 3.0
simulator gcc: 4.0
simulator sdk: 3.0
echo "#import <Foundation/Foundation.h>" > /tmp/test.m
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -arch armv6 -c /tmp/test.m
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -arch i386 -c /tmp/test.m
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:29,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:14,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:80,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:166: error: syntax error before ÔSecPaddingÕ
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:196: error: syntax error before ÔSecPaddingÕ
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:228: error: syntax error before ÔSecPaddingÕ
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecKey.h:257: error: syntax error before ÔSecPaddingÕ
make: *** [all] Error 1
or
$ make -f Makefile.iphone-error-demo SIMULATOR_SDK_VER=2.0 SIMULATOR_GCC_VER=4.2
iphone gcc : 4.0
iphone sdk : 3.0
simulator gcc: 4.2
simulator sdk: 2.0
echo "#import <Foundation/Foundation.h>" > /tmp/test.m
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -arch armv6 -c /tmp/test.m
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk -arch i386 -c /tmp/test.m
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:12,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/usr/include/float.h:8:24: error: float.h: No such file or directory
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:2,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:8,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:107,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:29:23: error: xmmintrin.h: No such file or directory
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:2,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:8,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:107,
from /tmp/test.m:1:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:216: error: expected specifier-qualifier-list before Ô__m128Õ
make: *** [all] Error 1

Are you sure your settings are identical between the two projects? I'd bet you accidentally changed some simulator settings.

Right click the framework and click Get Info. Take a look at the path in the Info dialog. It should be short, like "System/Library/Frameworks/"
If it is not, use the Choose button to find the framework underneath the current SDK's folder.
Also, make sure just below the path you see the option "Relative to Current SDK" selected.

When you added the frameworks to your project, did you set the checkbox to YES when asked if you wanted to copy the framework into the project folder. If so, the checkbox should be set to NO.
Does this also happen if you create a new project and attempt to run without adding anything, because it is possible that you've accidentally changed the compile flags in that project

This should be fixed by adding this to the compiler options:
-D__IPHONE_OS_VERSION_MIN_REQUIRED=30000

I encountered this problem when changing a project from sdk 3.2 to 4.1. Turns out the solution was changing the iOS Deployment Target in the build settings of my project from 2.0 to 3.0.
Right click your project in xcode (if you're using it), build pane, iOS Deployment Target -> 3.0.

Related

Xcode 5 Command Line: invalid deployment target '3.0.0' for architecture 'arm64'

I'm building a fat Crypto++ library from the command line under Xcode 5 with the iOS 7 SDK. The iOS 7 SDK includes the arm64 target. All goes well for the armv7 and armv7s architectures, but arm64 is a different matter:
clang++ -DNDEBUG -g -Os -pipe -fPIC -DCRYPTOPP_DISABLE_ASM -arch arm64
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
-Wno-tautological-compare -Wno-unused-value -c 3way.cpp
error: invalid deployment target '3.0.0' for architecture 'arm64' (requires '7.0.0' or later)
1 error generated.
make: *** [3way.o] Error 1
I've never experienced the error before, and searching produced no hits. Any ideas on how to proceed?
Thanks in advance.
Add the command line option:
-mios-version-min=7.0.0
or:
-miphoneos-version-min=7.0.0
See this clang reference.
Remove the armv64 from vaild - architure in build setting and run the project
Try /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++

iPhone app compilation failed for simulator: llvm-gcc-4.2 failed with exit code 255

My teammate compiled the application with a new branch of Restkit, and it works fine on his machine. After I pulled the new code, I was unable to run it in simulator mode anymore.
There is some error with the vendor code in the restkit.
I tried e solutions discussed in other qns: changing the architecture, valid architecture, compiler (to llvm 2.1), and a whole host of other settings.
But nothing seems to work. Any advise would be greatly appreciated.
The only key difference in our configuration is that he has installed ios5 on his xcode, while i do not have it
CompileC /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/Objects-normal/armv6/NXJsonParser.o Vendor/NXJSON/NXJsonParser.m normal armv6 objective-c com.apple.compilers.llvmgcc42
cd /Users/mingyeow/tmp/DailyMus.es/RestKit
setenv LANG en_US.US-ASCII
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/llvm-gcc-4.2 -x objective-c -arch armv6 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-generated-files.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-own-target-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-all-target-headers.hmap -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-project-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator/include -IVendor/NSJSON -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources/armv6 -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources -F/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator -c /Users/mingyeow/tmp/DailyMus.es/RestKit/Vendor/NXJSON/NXJsonParser.m -o /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/Objects-normal/armv6/NXJsonParser.o
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/
bin/llvm-gcc-4.2 failed with exit code 255
Exit code 255 means a file was not found, usually an executable like ld is missing from /Developer/usr/bin. To find out which file it cannot find open up a Terminal, and manually run these 4 commands (from the error log):
cd /Users/mingyeow/tmp/DailyMus.es/RestKit
export LANG=en_US.US-ASCII
export PATH="/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -x objective-c -arch armv6 -fmessage-length=0 -pipe -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-generated-files.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-own-target-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-all-target-headers.hmap -iquote /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/RestKitJSONParserNXJSON-project-headers.hmap -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator/include -IVendor/NSJSON -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources/armv6 -I/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/DerivedSources -F/Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Products/Debug-iphonesimulator -c /Users/mingyeow/tmp/DailyMus.es/RestKit/Vendor/NXJSON/NXJsonParser.m -o /Users/mingyeow/Library/Developer/Xcode/DerivedData/onethingaday-espywbsoeffyaedhqzaoogguqyci/Build/Intermediates/RestKit.build/Debug-iphonesimulator/RestKitJSONParser+NXJSON.build/Objects-normal/armv6/NXJsonParser.o
Then it will tell you the exact file it is looking for that is missing.
Im guessing something is missing from /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin, if you recently upgraded to xcode 4.2 and still have xcode 4.1 installed I suggest copying everything from /Developer-4.1/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ to /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ but without overwriting/replacing anything, just copy everything that is in the 4.1 dir but not in the /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin.
According to this article this is how to fix a missing execvp:
Check out your build configuration. The Architectures probably have an inherited $(ARCHS_…) value which can fire a build error:
Navigate to Build Settings in Xcode and check out values in the Architectures group.
Remove “VALID ARCH” entry from Architectures field to reset settings. Use $(ARCHS_STANDARD_32_BIT), or armv6, armv7 values as you wish. $(ARCHS_STANDARD_32_BIT) should show armv6 armv7.
Repeat these steps at your dependent projects.

iPhone Xcode RELEASE configuration build error - yet DEBUG works OK

I am a fairly new iPhone developer. I have four apps in final testing stages and working to get them signed and ready for the app store.
I duplicated the RELEASE configuration, and when I try to build using it I get this error:
Precompile myappname_Prefix.pch<br>
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1<br>
I do not get errors with the DEBUG configuration.
Any help would be appreciated.
I realize I may have some other issues here but a direction from one of you awsome developers would be great!
Here's the full text from Xcode Build Results:
ProcessPCH /var/folders/kP/kPjI69l+HP0oTFOqT+IHLE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/myappname_Pro_Prefix-aozmnrcmoaunqpberswshlqzvjyv/myappname_Pro_Prefix.pch.gch myappname_Pro_Prefix.pch normal armv7 objective-c com.apple.compilers.gcc.4_2
cd "/Users/hanaan/Documents/iPhone dev/myappname Pro"
setenv LANG en_US.US-ASCII
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 -x objective-c-header -arch armv7 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -DPRO -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -fvisibility=hidden -gdwarf-2 -mthumb -miphoneos-version-min=4.0 -iquote "/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/myappname Pro-generated-files.hmap" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/myappname Pro-own-target-headers.hmap" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/myappname Pro-all-target-headers.hmap" -iquote "/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/myappname Pro-project-headers.hmap" "-F/Users/hanaan/Documents/iPhone dev/myappname Pro/build/iphoneDistribution-iphoneos" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/iphoneDistribution-iphoneos/include" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/DerivedSources/armv7" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/DerivedSources" -DNS_BLOCK_ASSERTIONS=1 -c "/Users/hanaan/Documents/iPhone dev/myappname Pro/myappname_Pro_Prefix.pch" -o /var/folders/kP/kPjI69l+HP0oTFOqT+IHLE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/myappname_Pro_Prefix-aozmnrcmoaunqpberswshlqzvjyv/myappname_Pro_Prefix.pch.gch
arm-apple-darwin10-gcc-4.2.1: /Users/hanaan/Documents/iPhone dev/myappname Pro/myappname_Pro_Prefix.pch: No such file or directory
arm-apple-darwin10-gcc-4.2.1: warning: '-x objective-c-header' after last input file has no effect
arm-apple-darwin10-gcc-4.2.1: no input files
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
OK, found the problem.
I have renamed some files due to a spelling error and had the file name correct in the DEBUG configuration build plist, but not in the Release one...
It's complaining that it can't find the myappname_Pro_Prefix.pch file which contains the headers for the major frameworks.
Make sure the pch file is added to the release target (you may have more than one target) by getting info on it and checking its "targets" tag. Check the path to the file in the "general" tab to make sure there is no weirdness there.
Clear the Xcode cache with Xcode>Empty Caches.... Then clean all targets.

Distribution build of Finch demo ends with GCC error

thanks to zoul for sharing his openal avaudioplayer alternative!! its exactly what i needed,
heres my problem.. i cant build a distribution build w/o getting
general gcc-4.2 failed with error code 1,
i built my code within the finch demo project and figured it might be
something i did.
so i re-downloaded demo... duplicated release, renamed distribution
and same thing...
know what im missing?
thanks!!
built clean finch demo in device 3.0 distribution,
it works for device debug so i think codesigning is ok
-
here is the error code:
ProcessPCH /var/folders/vB/vBGLPzEOHIaZaBe67EuRZU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Demo_Prefix-dhjhmgdrpwujnmakgukffcldlmim/Demo_Prefix.pch.gch Demo_Prefix.pch normal armv6 objective-c com.apple.compilers.gcc.4_2
cd /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo
setenv LANG en_US.US-ASCII
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 -x objective-c-header -arch armv6 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk -fvisibility=hidden -gdwarf-2 -mthumb -miphoneos-version-min=3.1.3 -iquote /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/Demo-generated-files.hmap -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/Demo-own-target-headers.hmap -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/Demo-all-target-headers.hmap -iquote /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/Demo-project-headers.hmap -F/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Release-iphoneos -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Release-iphoneos/include -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/DerivedSources/armv6 -I/Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/build/Demo.build/Release-iphoneos/Demo.build/DerivedSources -c /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/Demo_Prefix.pch -o /var/folders/vB/vBGLPzEOHIaZaBe67EuRZU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Demo_Prefix-dhjhmgdrpwujnmakgukffcldlmim/Demo_Prefix.pch.gch
arm-apple-darwin10-gcc-4.2.1: /Users/giles73/Downloads/zoul-Finch-a97b909-1/Demo/Demo_Prefix.pch: No such file or directory
arm-apple-darwin10-gcc-4.2.1: warning: '-x objective-c-header' after last input file has no effect
arm-apple-darwin10-gcc-4.2.1: no input files
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Aha, my fault, that’s a bug. Wrong prefix header setting in the Release build mode. Fixed, thank you. To fix your project: right-click your target, select Get Info, switch to the Build tab, set Configuration to All Configurations, search for Prefix Header and set it to prefix.pch.

gcc-4.2 failed with exit code 1 in Xcode

I'm working with Xcode 3.2.3 and iOS 4.0.1 and I have downloaded an open source iPhone game to learn from but without editing anything I tried to run it in the simulator and it throws this error message:
ProcessPCH /var/folders/-r/-r6hd0CEEASnoGYBU9KSlk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/catchcat_Prefix-crjsognppahnfgdfvinmsqvdioie/catchcat_Prefix.pch.gch
catchcat_Prefix.pch normal i386
objective-c
com.apple.compilers.gcc.4_2
cd "/Users/ryanpoolos/Desktop/Open Source
iPhone/lifengtian-catchcat-f3d5f20"
setenv LANG en_US.US-ASCII
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/gcc-4.2
-x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=30200 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk
-fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote "/Users/ryanpoolos/Desktop/Open Source
iPhone/lifengtian-catchcat-f3d5f20/build/catchcat.build/Debug-iphonesimulator/catchcat.build/catchcat-generated-files.hmap"
"-I/Users/ryanpoolos/Desktop/Open
Source
iPhone/lifengtian-catchcat-f3d5f20/build/catchcat.build/Debug-iphonesimulator/catchcat.build/catchcat-own-target-headers.hmap"
"-I/Users/ryanpoolos/Desktop/Open
Source
iPhone/lifengtian-catchcat-f3d5f20/build/catchcat.build/Debug-iphonesimulator/catchcat.build/catchcat-all-target-headers.hmap"
-iquote "/Users/ryanpoolos/Desktop/Open Source
iPhone/lifengtian-catchcat-f3d5f20/build/catchcat.build/Debug-iphonesimulator/catchcat.build/catchcat-project-headers.hmap"
"-F/Users/ryanpoolos/Desktop/Open
Source
iPhone/lifengtian-catchcat-f3d5f20/build/Debug-iphonesimulator"
"-I/Users/ryanpoolos/Desktop/Open
Source
iPhone/lifengtian-catchcat-f3d5f20/build/Debug-iphonesimulator/include"
"-I/Users/ryanpoolos/Desktop/Open
Source
iPhone/lifengtian-catchcat-f3d5f20/build/catchcat.build/Debug-iphonesimulator/catchcat.build/DerivedSources/i386"
"-I/Users/ryanpoolos/Desktop/Open
Source
iPhone/lifengtian-catchcat-f3d5f20/build/catchcat.build/Debug-iphonesimulator/catchcat.build/DerivedSources"
-c "/Users/ryanpoolos/Desktop/Open Source
iPhone/lifengtian-catchcat-f3d5f20/catchcat_Prefix.pch" -o /var/folders/-r/-r6hd0CEEASnoGYBU9KSlk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/catchcat_Prefix-crjsognppahnfgdfvinmsqvdioie/catchcat_Prefix.pch.gch
i686-apple-darwin10-gcc-4.2.1: /Users/ryanpoolos/Desktop/Open Source
iPhone/lifengtian-catchcat-f3d5f20/catchcat_Prefix.pch: No such file or directory
i686-apple-darwin10-gcc-4.2.1: warning: '-x objective-c-header' after
last input file has no effect
i686-apple-darwin10-gcc-4.2.1: no input files
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
failed with exit code 1
Help me out anyone?
Sounds like something somewhere isn't properly quoting the spaces in your path. Try renaming OPen Source iPhone to OpenSourceIPhone or something.
Silly, I know, but occasionally the unixisms creep through.
This can happen if you have an empty line in any of configuration lists of the project. For example in user defines or include paths.