Xcode 4 gcc-4.2 failed with exit code 1 - xcode

Any idea why my build is failing on the following process? I have 2 other targets in this project that build just fine. I cannot see any clear reason based on this what the issue is. I've compared all the build settings in each target and all seems to be well/the same.
Any help is appreciated.
ProcessPCH /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/PrecompiledHeaders/MyApp_Prefix-bknmhqekgexlchfcpbduwcqlcafa/MyApp_Prefix.pch.gch MyApp_Prefix.pch normal armv7 objective-c com.apple.compilers.gcc.4_2
cd /Users/me/Development/myapp/trunk
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 -O0 -Wmissing-prototypes -Wreturn-type -Wunused-variable -DDEBUG_LOGS_ON -DMyApp -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -gdwarf-2 -fvisibility=hidden -mthumb -miphoneos-version-min=4.2 -iquote "/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp-generated-files.hmap" "-I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp-own-target-headers.hmap" "-I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp-all-target-headers.hmap" -iquote "/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/MyApp-project-headers.hmap" -I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Products/Debug-iphoneos/include -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/include/libxml2 -I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/DerivedSources/armv7 -I/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/DerivedSources -F/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/Products/Debug-iphoneos -c /Users/me/Development/myapp/trunk/MyApp_Prefix.pch -o /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gphlhvxbcddmbydldqumpamkmmwu/Build/PrecompiledHeaders/MyApp_Prefix-bknmhqekgexlchfcpbduwcqlcafa/MyApp_Prefix.pch.gch
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Ok, figured it out. I had a preprocessor macro for this target that started with a number e.g. "123TEST", evidently the compiler does not like numbers first, "TEST123" works fine.

You need to take a look at MyApp_Prefix.pch. The compiler doesn't like it.

Related

yocto: failing to find Python.h and cross compiling fails

Im using poky version of yocto, and adding zbar library in my yocto build. I found a readymade recipe at http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/zbar/zbar_0.10.bb and modified it a bit to get working with poky. I got it working fine with imagemagick, and the compiled zbarimg works on the target board.
The modified recipe is available here: http://paste.ubuntu.com/25725000/
When I proceed configuring python support (--with-python) to the build, some dependency issues crept up, which Im unable to resolve.
It appears as if the compiler doesn't find the appropriate headers, since the include paths don't contain appropriate folder.
The full compiler command is:
arm-poky-linux-gnueabi-libtool: compile: arm-poky-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/home/jlumme/imx_build/build-x11-pico-imx6ul/tmp/sysroots/pico-imx6ul-emmc -DHAVE_CONFIG_H -I. -I/home/jlumme/imx_build/build-x11-pico-imx6ul/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/zbar/0.10-r0/zbar-0.10 -I./include -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -I/usr/include/python2.7 -I/usr/include/python2.7 -I/home/jlumme/imx_build/build-x11-pico-imx6ul/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/zbar/0.10-r0/zbar-0.10/include -Wall -Wno-parentheses -O2 -pipe -g -feliminate-unused-debug-types -c /home/jlumme/imx_build/build-x11-pico-imx6ul/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/zbar/0.10-r0/zbar-0.10/python/symbol.c -fPIC -DPIC -o python/.libs/python_zbar_la-symbol.o
You can see that sysroot variable is set, and it appears like the right location, and there is /usr/include/python2.7 there, though its pointing right at the host system include path.
There is a warning from compiler: cc1: warning: include location "/usr/include/python2.7" is unsafe for cross-compilation [-Wpoison-system-directories] which I don't know why it happens, but it seems like the python2.7 folder is appropriately looked at, just not under the sysroot (my host system doesn't have /usr/lib/python2.7)
If I go to the sysroot include (/home/jlumme/imx_build/build-x11-pico-imx6ul/tmp/sysroots/pico-imx6ul-emmc/usr/include/) folder, I can see that it has a subfolder python2.7. If under this usr/include folder I add a symlink Python.h -> python2.7/Python.h, the compiler will complain about the next header file which is not found.
So to me it seems, all I should do is add the appropriate 'sysroot' + usr/include/python2.7 as include search folder it would compile happily - but Im not sure how..
The full compilation log is available here: http://paste.ubuntu.com/25725014/
This is a bug in the zbar configure script.
Try inheriting pythonnative so the configure script can run a compatible Python to know where to look.

xcode 4.5, IOS 6.0, Jenkins 1.476, OSX 10.7.5, Cordova / Phone Gap, Will not build under Jenkins

Getting the following error under Jenkins. Hand builds on the same machine using Xcode and / or other command line build working fine. I assume this has something to do with the IOS 6.0 / Xcode upgrade since it was working fine before this. Top level project is not compiling with the Architecture set for armv7 and Valid Architecture armv7. This builds and runs fine for the V6.0 simulator and devices when done on the same machine by hand with Xcode.
CompileC build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/Objects- normal/armv7/MyAppAgent_vers.o build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/DerivedSources/MyAppAgent_vers.c normal armv7 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent
setenv LANG en_US.US-ASCII
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch armv7 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DNDEBUG=1, -DCORDOVA_FRAMEWORK=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -fexceptions -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -mios-simulator-version-min=5.0 -iquote /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/MyAppAgent-generated-files.hmap -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/MyAppAgent-own-target-headers.hmap -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/MyAppAgent-all-target-headers.hmap -iquote /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/MyAppAgent-project-headers.hmap -iquote../../../Include -iquote../../../Include/logging -iquote../../../Include/messaging -iquote../../../Include/networking -iquote../../../Include/platform -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Builds/MyAppAgent/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/DerivedSources/armv7 -I/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/DerivedSources -F/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Builds/MyAppAgent -F/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/../../../../SDK -F/Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/../../../../SDK -MMD -MT dependencies -MF /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/Objects-normal/armv7/MyAppAgent_vers.d --serialize-diagnostics /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/Objects-normal/armv7/MyAppAgent_vers.dia -c /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/DerivedSources/MyAppAgent_vers.c -o /Users/Shared/Jenkins/Home/jobs/MyAppAgent/workspace/Dev/Projects/MyApp/MyAppAgent/build/MyAppAgent.build/Release-iphonesimulator/MyAppAgent.build/Objects-normal/armv7/MyAppAgent_vers.o
clang: error: invalid architecture 'arm' for deployment target '-mios-simulator-version-min=5.0'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
If you are building with the simulator SDK, make sure the CPU architecture is set to i386.
With the new version of Xcode, the default setting of i386 Architectures includes the new iphone 5 armv7s. Some of the items we were linking in, did not include armv7s and we were bugging out. Needed to change the Workspace (in our case) not to be the default arch, but to specify armv7 only.

ld cannot find -l<library>

I am having trouble installing pyipopt on ubuntu 12.04. During linking, I receive the error:
/usr/bin/ld: cannot find -lcoinhsl
Even though I know that this library is installed and the .so and .la files are available in /home/mostafa/MyBuilds/CoinIpopt/build/lib/
does anyone have a solution for this?
below is the complete return of running setup.py build:
root#ubuntu:~/MyBuilds/pyipopt# sudo python setup.py build
running build
running build_ext
building 'pyipopt' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/home/mostafa/MyBuilds/CoinIpopt/build/include/coin/ -I/usr/include/python2.7 -c src/callback.c -o build/temp.linux-x86_64-2.7/src/callback.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/home/mostafa/MyBuilds/CoinIpopt/build/include/coin/ -I/usr/include/python2.7 -c src/pyipopt.c -o build/temp.linux-x86_64-2.7/src/pyipopt.o
src/pyipopt.c: In function ‘set_intermediate_callback’:
src/pyipopt.c:452:15: warning: variable ‘myowndata’ set but not used [-Wunused-but-set-variable]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relrobuild/temp.linux-x86_64-2.7/src/callback.o build/temp.linux-x86_64-2.7/src/pyipopt.o -L/home/mostafa/MyBuilds/CoinIpopt/build/lib/ -lipopt -lblas -lcoinhsl -lcoinmetis -llapack -ldl -lm -o build/lib.linux-x86_64-2.7/pyipopt.so -Wl,--rpath -Wl,/home/mostafa/MyBuilds/CoinIpopt/build/lib/
/usr/bin/ld: cannot find -lcoinhsl
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
-Ldir
Add directory dir to the list of directories to be searched for -l.
You may install your coinhsl library in one of your standard libraries directories and run 'ldconfig` before doing your ppyipopt install
I had a similar problem with another library and the reason why it didn't found it, was that I didn't run the make install (after running ./configure and make) for that library. The make install may require root privileges (in this case use: sudo make install). After running the make install you should have the so files in the correct folder, i.e. here /usr/local/lib and not in the folder mentioned by you.
you can add the Path to coinhsl lib to LD_LIBRARY_PATH variable. May be that will help.
export LD_LIBRARY_PATH=/xx/yy/zz:$LD_LIBRARY_PATH
where /xx/yy/zz represent the path to coinhsl lib.

Xcode 4.2 cannot build anything

I've recently installed Xcode 4.2 on my macbookpro 10.7.2 . I have my drived partitioned by BootCamp. When I installed XCode 4.2, I ran XCode and I try to see if it can simply build stuff so I picked a Command Line Tool. When the wizard is done generating the files, I simply ran it and it already gave me an error. I tried other templates and it generated the same error. Whats the solution for this problem?
Anyway, this is the error:
Clang LLVM 1.0 Error
Command /Developer/usr/bin/clang failed with exit code 11
ProcessPCH /Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/PrecompiledHeaders/SecondApp-Prefix-grjbjgpsgeilsbghzjmhjjxmgsqx/SecondApp-Prefix.pch.pth SecondApp/SecondApp-Prefix.pch normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/revin122/Downloads/Ex_Files_ObjC_EssT/exercise_files/ch03/SecondApp
setenv LANG en_US.US-ASCII
/Developer/usr/bin/clang -x objective-c-header -arch x86_64 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wshorten-64-to-32 -DDEBUG -isysroot /Developer/SDKs/MacOSX10.7.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -Wno-sign-conversion "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -iquote /Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/Intermediates/SecondApp.build/Debug/SecondApp.build/SecondApp-generated-files.hmap -I/Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/Intermediates/SecondApp.build/Debug/SecondApp.build/SecondApp-own-target-headers.hmap -I/Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/Intermediates/SecondApp.build/Debug/SecondApp.build/SecondApp-all-target-headers.hmap -iquote /Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/Intermediates/SecondApp.build/Debug/SecondApp.build/SecondApp-project-headers.hmap -I/Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/Products/Debug/include -I/Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/Intermediates/SecondApp.build/Debug/SecondApp.build/DerivedSources/x86_64 -I/Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/Intermediates/SecondApp.build/Debug/SecondApp.build/DerivedSources -F/Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/Products/Debug -c /Users/revin122/Downloads/Ex_Files_ObjC_EssT/exercise_files/ch03/SecondApp/SecondApp/SecondApp-Prefix.pch -o /Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/PrecompiledHeaders/SecondApp-Prefix-grjbjgpsgeilsbghzjmhjjxmgsqx/SecondApp-Prefix.pch.pth -MMD -MT dependencies -MF /Users/revin122/Library/Developer/Xcode/DerivedData/SecondApp-dderlmctlgoalofwkqvuhanbimji/Build/PrecompiledHeaders/SecondApp-Prefix-grjbjgpsgeilsbghzjmhjjxmgsqx/SecondApp-Prefix.pch.d
Command /Developer/usr/bin/clang failed with exit code 11
To try and narrow down the problem here, one thing to try would be to change the compiler from "Apple LLVM Complier 3.0" to "LLVM GCC 4.2" and see if you get different results. That might start to narrow down what is going on.
The other thing worth trying is just to re-install Xcode 4.2. A few people—myself included—found the initial install was bad but reinstalling over the top fixed the problem.

Clang scan-build won't work with Xcode 4.2 LLVM 3.0 build configuration

I've installed Xcode 4.2 final version to be able to compile for iOS 5.
We are using Jenkins for CI and run Clang scan-build from the llvm.org project page. (Version 258) The project is configured to use LLVM 3.0 (which is default since Xcode 4.2). Now every time I try to run scan-build do I get following error:
CompileC build/Cortado.build/Debug-iphonesimulator/Cortado.build/Objects-normal/i386/TPContentDetailViewController_iPad.o Classes/iPad/TPContentDetailViewController_iPad.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Volumes/Sources/Starteam - Main View/Workplace/Cortado"
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/Applications/android-sdk-mac_x86/android-ndk-r6b:/Applications/android-sdk-mac_x86/platform-tools:/Applications/android-sdk-mac_x86/tools:/Volumes/Sources/Starteam - Main View/Tools:/Volumes/Sources/Tools:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
/Users/thwee/Downloads/checker-258/libexec/ccc-analyzer -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -fexceptions -fasm-blocks -fprofile-arcs -ftest-coverage -mmacosx-version-min=10.6 -gdwarf-2 -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -iquote "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Cortado-generated-files.hmap" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Cortado-own-target-headers.hmap" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Cortado-all-target-headers.hmap" -iquote "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Cortado-project-headers.hmap" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Debug-iphonesimulator/include" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/DerivedSources/i386" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/DerivedSources" "-F/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Debug-iphonesimulator" -include "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/Cortado_Prefix.pch" -MMD -MT dependencies -MF "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Objects-normal/i386/TPContentDetailViewController_iPad.d" -c "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/Classes/iPad/TPContentDetailViewController_iPad.m" -o "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Objects-normal/i386/TPContentDetailViewController_iPad.o"
cc1obj: error: unrecognized command line option "-Wno-sign-conversion"
cc1obj: error: unrecognized command line option "-fdiagnostics-print-source-range-info"
cc1obj: error: unrecognized command line option "-fdiagnostics-show-category=id"
cc1obj: error: unrecognized command line option "-fdiagnostics-parseable-fixits"
If I use the static code analyze of Xcode self I get following output which works without issues:
CompileC build/Cortado.build/Debug-iphonesimulator/Cortado.build/Objects-normal/i386/TPInfoCell.o Classes/TPInfoCell.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Volumes/Sources/Starteam - Main View/Workplace/Cortado"
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/clang -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -DDEBUG -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -fexceptions -fasm-blocks -fprofile-arcs -ftest-coverage -mmacosx-version-min=10.6 -gdwarf-2 -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -iquote "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Cortado-generated-files.hmap" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Cortado-own-target-headers.hmap" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Cortado-all-target-headers.hmap" -iquote "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Cortado-project-headers.hmap" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Debug-iphonesimulator/include" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/DerivedSources/i386" "-I/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/DerivedSources" "-F/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Debug-iphonesimulator" -include /var/folders/m7/1lwxj7113xb17b8k635bn0200000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Cortado_Prefix-curmpedgpezkvsgarfuwvmdrauwa/Cortado_Prefix.pch -MMD -MT dependencies -MF "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Objects-normal/i386/TPInfoCell.d" -c "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/Classes/TPInfoCell.m" -o "/Volumes/Sources/Starteam - Main View/Workplace/Cortado/build/Cortado.build/Debug-iphonesimulator/Cortado.build/Objects-normal/i386/TPInfoCell.o"
Has someone an idea what I can do to get scan-build running again without disabling LLVM 3.0 use?!
Found a solution to have checker-258 build :
Pass this param to scan-build : --use-cc=`which clang`
Then to make it builds by jenkins and the scan-build plugin... it's a little trickier :
Move scan-build to scan-build.bin, and then make scan-build be a script :
#!/bin/sh
dir=$(dirname $0)
$dir/scan-build.bin --use-cc=`which clang` $#
The result of which clang is : /usr/bin/clang
Edit: worked for two projects, one with LLVM 3.0, the other with llvm-gcc4.2.
I raised a bug with Apple about this and other issues (like scan-build not recognising ARC'd code).
The fix is to install checker-260, see http://clang-analyzer.llvm.org/release_notes.html plus this modification to ccc-analyzer - http://llvm.org/viewvc/llvm-project?view=rev&revision=149094. Hopefully the fix to ccc-analyzer will be incorporated into a future release of scan-build.
Using this latest version of scan-build will avoid you having to make the modifications to scan-build described in the previous answer.
It looks like scan-build is deciding to use llvm-gcc, which is confusing Xcode because it is expecting to be running clang. Probably just a bug in scan-build; I'd suggest sending an email to cfe-dev.

Resources