[cfe-dev] set-xcode-analyzer requires Python 2.7.0+
Jonathan Sauer
jonathan.sauer at gmx.de
Tue Jul 10 03:34:56 PDT 2012
Hello,
I was just trying out clang's static analyzer and, following the instructions at
<http://clang-analyzer.llvm.org/xcode.html>, set XCode's analyzer to my build of
clang TOT using the following command line (in myLLVM/llvm/tools/clang/tools/scan-build)
./set-xcode-analyzer --use-checker-build=myLLVM/build/Release+Asserts/bin/clang
This resulted in the following error:
(+) Using Clang located at: myLLVM/build/Release+Asserts/bin/clang
Traceback (most recent call last):
File "./set-xcode-analyzer", line 88, in <module>
main()
File "./set-xcode-analyzer", line 78, in main
xcode_path = subprocess.check_output(["xcode-select", "-print-path"])
AttributeError: 'module' object has no attribute 'check_output'
This is because OS X 10.6.8 (which I'm running) only has Python 2.6.1 installed, but
"check_output" was introduced in 2.7.0 (<http://docs.python.org/library/subprocess.html>).
The change to set-xcode-analyzer was made with r151179 to make the script work with
XCode 4.3 (which I assume can be installed in a different location than /Developer).
Of course it's no problem to locally undo this change; I am just wondering if the above
is the indented behavior on Snow Leopard.
Jonathan
More information about the cfe-dev
mailing list