[cfe-dev] Can't exec "clang++" Problem

Jordan Rose jordan_rose at apple.com
Thu Apr 25 10:55:21 PDT 2013


Aha, scan-build currently uses the system xcodebuild to detect the installed version, not the one you specify on the command line. Does this patch clear things up, Howard?

Jordan




On Apr 24, 2013, at 19:38 , 凌欢 <linghuan713 at 126.com> wrote:

> Hi, Jordan:
> My checker version is 274 , and the previous veriosn also has the problem.
> export clang_path=/Applications/xcode4.6_sdk6.1/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
> export xcode_path=/Applications/xcode4.6_sdk6.1/Contents/Developer/usr/bin/xcodebuild
> And the "xcode4.6_sdk6.1" is link to xcode 4.6 directory .
> I have two questions for the scan build usage:
> 1) Do the latest scan-build can support all the Xcode&SDK version ?
> 2) Is the above scan steps is valid  (link xcode 4.6 to anther directory ) ?
> By the way , Can't exec "clang++" Problem throw out after the generated scan report.
> 
> Thanks Jordan.
>  BRs
> 
> Howard Ling
> *****************************************************
>  
> E-mail:    linghuan713 at 126.com
>  
> *****************************************************
> At 2013-04-25 01:28:14,"Jordan Rose" <jordan_rose at apple.com> wrote:
> Hm, this is wrong. You're not getting the new Xcode 4.6 scan-build integration, presumably because $xcode_path doesn't point to a valid "xcodebuild" executable. (Yes, scan-build is checking for that option verbatim.) What is $xcode_path on your system?
> 
> (By the way, if/when you get this working, you shouldn't need the --use-cc option.)
> 
> Jordan
> 
> 
> On Apr 24, 2013, at 3:28 , 凌欢 <linghuan713 at 126.com> wrote:
> 
>> Hi, all,:
>> when I use the following command to analyze the iPhone project , almost every project will throw the Can't exec "clang++" problem.
>> Here is the scan-build log, can anyone give me tip? Thanks for your  help.
>>  
>> My scan command is:
>> /data/checker/scan-build -o report --use-analyzer=Xcode --use-cc=$clang_path $xcode_path -scheme MttHDDistribution -configuration $CONFIG -sdk $SDK archive
>>  
>> And the scan log is the following text:
>> Ld /Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/InstallationBuildProductsLocation/Applications/MttHD.app/MttHD normal armv7
>>     cd /Users/mqq/hudson/clang_browser_ipad/MttHD
>>     setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
>>     setenv PATH "/Applications/xcode4.6_sdk6.1/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/xcode4.6_sdk6.1/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
>>     /data/checker/libexec/c++-analyzer -arch armv7 -isysroot /Applications/xcode4.6_sdk6.1/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/BuildProductsPath/Distribution-iphoneos -L/Applications/xcode4.6_sdk6.1/Contents/Developer/usr/lib -L/Users/mqq/hudson/clang_browser_ipad/MttHD/ffmpeg/compiled/fat/lib -F/Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/BuildProductsPath/Distribution-iphoneos -F/Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/BuildProductsPath/Distribution-iphoneos -F/Users/mqq/hudson/clang_browser_ipad/MttHD/Classes/Engine/MSF -F/Users/mqq/hudson/clang_browser_ipad/MttHD/Classes/Engine/Analytics -F/Users/mqq/hudson/clang_browser_ipad/MttHD/WirelessUnifiedProtocol/build/Distribution-iphoneos -F/Users/mqq/hudson/clang_browser_ipad/MttHD/MiniQQMusic/build/Debug-iphoneos -filelist /Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/IntermediateBuildFilesPath/MttHD.build/Distribution-iphoneos/MttHD.build/Objects-normal/armv7/MttHD.LinkFileList -dead_strip -lxml2 -fobjc-arc -ObjC -fobjc-link-runtime -miphoneos-version-min=4.0 -framework AdSupport -framework StoreKit -framework AddressBookUI -framework AddressBook -framework CoreVideo -liconv -framework CoreMedia /Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/BuildProductsPath/Release-iphoneos/libqrencoder.a /Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/BuildProductsPath/Release-iphoneos/libZXingWidget.a -lCocoaHttpServer -framework Analytics -framework Security /Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/BuildProductsPath/Distribution-iphoneos/libWirelessUnifiedProtocol.a -licucore -lsqlite3.0 -lxml2 -lz -framework Foundation -framework UIKit -framework CoreGraphics -framework CFNetwork -framework QuartzCore -framework SystemConfiguration -framework AudioToolbox -framework MediaPlayer -framework AVFoundation -framework MobileCoreServices -framework CoreFoundation -weak_framework MessageUI -framework CoreLocation -weak_framework CoreTelephony -framework CoreText -lavcodec -lavdevice -lavformat -lavutil -lswscale -o /Users/mqq/Library/Developer/Xcode/DerivedData/MttHD-aqrymoiwlplqyoaerjdmeutxmpdd/Build/Intermediates/ArchiveIntermediates/MttHDDistribution/InstallationBuildProductsLocation/Applications/MttHD.app/MttHD
>> 
>> Can't exec "clang++": No such file or directory at /data/checker/libexec/c++-analyzer line 429.
>> Command /data/checker/libexec/c++-analyzer failed with exit code 255
>> 
>>  BRs
>> Howard Ling
>> *****************************************************
>>  
>> E-mail:    linghuan713 at 126.com
>>  
>> *****************************************************
>> 
>> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130425/0966e5c2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scan-build.patch
Type: application/octet-stream
Size: 932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130425/0966e5c2/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130425/0966e5c2/attachment-0001.html>


More information about the cfe-dev mailing list