[cfe-dev] set-xcode-analyzer requires Python 2.7.0+

Ted Kremenek kremenek at apple.com
Wed Jul 11 22:49:25 PDT 2012


Hi Jonathan,

I've heard about a related issue with Python version compatibility:

  Bug 11661 - set-xcode-analyzer fails if Python 2.7 is installed 
  http://llvm.org/bugs/show_bug.cgi?id=11661

That seems like a different issue, that I haven't been able to reproduce.

I think the bottom line is that I'd like set-xcode-analyzer to work regardless of your Python configuration, at least back to Snow Leopard (which supported Xcode 4.0).  I'm not a Python expert, this would also be easy to implement in straight C code, and remove the dependency on Python entirely.

Can you file a bug report?

Thanks,
Ted

On Jul 10, 2012, at 3:34 AM, Jonathan Sauer <jonathan.sauer at gmx.de> wrote:

> 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
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list