[cfe-dev] 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.

Saheel Godhane srgodhane at ucdavis.edu
Tue Mar 3 20:07:46 PST 2015


Hi! You can do this:

1) export LLVM_BIN=/home/zq/LLVM/build/Release+Asserts/bin/
2) scan-build --use-analyzer $LLVM_BIN/clang [other options to clang go
here]

You may even want to put the 1st command in your ~/.bashrc file so that you
don't have to export LLVM_BIN each time you want to use it.

Regards,
Saheel.




On Tue, Mar 3, 2015 at 7:47 PM, Q Z <zhaoqian301 at gmail.com> wrote:

> I'm a beginner of clang-analyzer. I got a problem when I execute command
> "scan-build make":
> 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.
>
> PS:I have compiled llvm+clang(with source code llvm 3.3). And I have added
> the two
> PATH:/home/zq/LLVM/llvm-3.3.src/tools/clang/tools/scan-view/:/home/zq/LLVM/llvm-3.3.src/tools/clang/tools/scan-build/:/home/zq/LLVM/build/Release+Asserts/bin/
>
> Can anybody help me?
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150303/e79c7950/attachment.html>


More information about the cfe-dev mailing list