Skip to content

Incorrect path for scan-view in scan-build #4097

@llvmbot

Description

@llvmbot
Bugzilla Link 3725
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @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";

  • 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";
    }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions