Open llvmbot opened 15 years ago
=================================================================== --- tools/clang/utils/scan-build (revision 65935) +++ tools/clang/utils/scan-build (working copy) @@ -1218,7 +1218,7 @@ if ($ViewResults and -r "$HtmlDir/index.html") { Diag "Analysis run complete.\n"; Diag "Viewing analysis results in '$HtmlDir' using scan-view.\n";
- my $ScanView = Cwd::realpath("$RealBin/scan-view");
- my $ScanView = Cwd::realpath("$RealBin/scan-view/scan-view"); if (! -x $ScanView) { $ScanView = "scan-view"; } exec $ScanView, "$HtmlDir"; }
In the checker builds 'scan-view' is put in the same directory as 'scan-build', hence the current logic works. On my system 'scan-view' is also in my path, so I hadn't noticed this issue.
I'm not certain why doing "$RealBin/scan-view/scan-view" should work, since 'scan-view' is in the 'tools' directory and 'scan-build' in the 'utils' directory (that can easily be changed of course by moving 'scan-build' to 'tools'). $RealBin is suppose to be the directory where 'scan-build' resides.
assigned to @tkremenek
Extended Description
Here's the error message I get when running 'scan-build make' on the latest (21.5-b28) XEmacs sources:
... make[1]: Leaving directory `/usr/local/src/xemacs/man' scan-build: 257 bugs found. scan-build: Run 'scan-view /tmp/scan-build-2009-03-03-1' to examine bug reports. scan-build: Analysis run complete. scan-build: Viewing analysis results in '/tmp/scan-build-2009-03-03-1' using scan-view. Can't exec "scan-view": No such file or directory at /usr/local/src/llvm/tools/clang/utils/scan-build line 1223.
Here's the fix I used (note: scan-view is not installed by 'make install'):
$ cd /usr/local/src/llvm $ svn di tools/clang/utils/scan-build Index: tools/clang/utils/scan-build
--- tools/clang/utils/scan-build (revision 65935) +++ tools/clang/utils/scan-build (working copy) @@ -1218,7 +1218,7 @@ if ($ViewResults and -r "$HtmlDir/index.html") { Diag "Analysis run complete.\n"; Diag "Viewing analysis results in '$HtmlDir' using scan-view.\n";