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.
Related
I renamed a project file from TopPlaces to TopRegions in XCode. After renaming it and cleaning up file locations and references, I can "clean" the file in XCode without any trouble, but when I go to compile it, I get the following error.
clang: error: no such file or directory: '/Users/iOSPadawan/Documents/Developer/Stanford iOS 7/TopRegions/TopPlaces/ImageVC.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I tried deleting the view controller referenced in the error and reimporting it from the original (pre-renamed) project, but that doesn't take care of the error.
I did a text search of "Build Settings" and "Build Phases" of the project to TopPlaces, but it turns up nothing. However, under Compile Sources in Build Settings, I see references (that don't turn up in text search) to the old project name. I've tried removing them and adding the implementation files back, but I still get the same error.
I knew I'm missing something really ****ing noobish, but I don't know what? Any suggestions? Here's a complete listing from the compiler error:
CompileC /Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/Objects-normal/i386/ImageVC.o TopPlaces/ImageVC.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Users/iOSPadawan/Documents/Developer/Stanford iOS 7/TopRegions"
export LANG=en_US.US-ASCII
export 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 objective-c -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/iOSPadawan/Library/Developer/Xcode/DerivedData/ModuleCache -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -fexceptions -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -mios-simulator-version-min=7.0 -iquote /Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/TopRegions-generated-files.hmap -I/Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/TopRegions-own-target-headers.hmap -I/Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/TopRegions-all-target-headers.hmap -iquote /Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/TopRegions-project-headers.hmap -I/Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/DerivedSources/i386 -I/Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/DerivedSources -F/Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Products/Debug-iphonesimulator -include /Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/PrecompiledHeaders/TopRegions-Prefix-gvxkjoatgnwponegpmitcljtrjli/TopRegions-Prefix.pch -MMD -MT dependencies -MF /Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/Objects-normal/i386/ImageVC.d --serialize-diagnostics /Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/Objects-normal/i386/ImageVC.dia -c /Users/iOSPadawan/Documents/Developer/Stanford\ iOS\ 7/TopRegions/TopPlaces/ImageVC.m -o /Users/iOSPadawan/Library/Developer/Xcode/DerivedData/TopRegions-euvbevtdsgmfzsbsgnulbhzytzij/Build/Intermediates/TopRegions.build/Debug-iphonesimulator/TopRegions.build/Objects-normal/i386/ImageVC.o
For reasons I don't understand, the compiler didn't update the sources for the new project name, despite the fact I updated their locations in file inspector. I was able to resolve the problem by nuking the references (NOT the files) in the project navigator and dragging them back in from Finder.
“Experience is merely the name men gave to their mistakes.”
― Oscar Wilde
I took the following steps after reading suggestions from http://andhikalegawa.wordpress.com/2012/01/05/installing-mysql-python-on-snow-leopard-using-xampp-mysql/
Downloaded MySQL-python-1.2.4b4 and unzipped
Changed the mysql_config = /Applications/XAMPP/xamppfiles/bin/mysql_config (as I am using XAMPP 1.7.3)
Downloaded mysql-5.1.70-osx10.6-x86 (I could not find 5.1.55 which is the version used in XAMPP) kept the include folder at /Applications/XAMPP/xamppfiles/
I am new to development so, downloaded XCode 4.6.3 with command line tools.
Logically it should have worked I am getting the following error
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.7-intel-2.7/MySQLdb
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.7-intel-2.7
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,4,'beta',4) -D_version_=1.2.4b4 -I/Applications/XAMPP/xamppfiles/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -mmacosx-version-min=10.4 -arch i386 -arch ppc -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
In file included from _mysql.c:44:
/Applications/XAMPP/xamppfiles/include/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined
In file included from /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:8,
from _mysql.c:29:
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:891:1: warning: this is the location of the previous definition
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/6p/8bxdl12d2nq05dmwbmdzttt40000gn/T//cc0v0ehE.out
error: command 'llvm-gcc-4.2' failed with exit status 255
Looks like it's trying to compile universal for PowerPC, which you probably don't have?
error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2'
I would suggest setting the ARCHFLAGS:
shell> rm -Rf build/
shell> ARCHFLAGS="-arch i386" /usr/bin/python setup.py build
Or instead of i386, on 64-bit x86_64. But since you are downloading 32-bit MySQL, might be good to use i386.
Good luck! (Shameless advert: you can always try MySQL Connector/Python)
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.
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.
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.