FS#33358 - [clang-analyzer] scan-build looks in the wrong path for clang

Attached to Project: Arch Linux
Opened by Peter Wu (Lekensteyn) - Thursday, 10 January 2013, 11:41 GMT
Last edited by Evangelos Foutras (foutrelis) - Monday, 14 January 2013, 06:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
scan-build is a symlink from /usr/bin/scan-build to /usr/lib/clang-analyzer/scan-build/scan-build. Running `scan-build gcc ...` gives:

scan-build: error: Cannot find an executable 'clang' relative to scan-build. Consider using --use-analyzer to pick a version of 'clang' to use for static analysis.

I expected something like:

scan-build: Using '/usr/bin/clang' for static analysis
...

The attached patch gives an idea of where a hard-coded patch can be included. An alternative (tested too) is creating a symlink /usr/lib/clang-analyzer/scan-build/clang -> /usr/bin/clang.

Version: clang-analyzer 3.2-3
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Monday, 14 January 2013, 06:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  clang-analyzer 3.2-4
Comment by Evangelos Foutras (foutrelis) - Monday, 14 January 2013, 06:08 GMT
This is something that broke in 3.2; 3.1 and earlier had a fallback: "scan-build: Using 'clang' from path: /usr/bin/clang"

Thanks for the report; will fix it using your alternate symlink method. :)

Loading...