Bug#941614: /usr/share/clang/scan-build-8/bin/scan-build: scan-build fails to find scan-view

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Oct 2 21:12:23 BST 2019


Package: clang-tools-8
Version: 1:8.0.1-3+b1
Severity: normal
File: /usr/share/clang/scan-build-8/bin/scan-build
Control: affects -1 src:wireguard

I'm running scan-build as part of "make check" in src/ of the
wireguard package.  It terminates with this message:

    Use of uninitialized value $ScanView in exec at /usr/bin/scan-build line 1920.
    Can't exec "": No such file or directory at /usr/bin/scan-build line 1920.

As far as i can tell, this is due to weird path shenanigans:

   1917       my $ScanView = Cwd::realpath("$RealBin/scan-view");
   1918       if (! -x $ScanView) { $ScanView = "scan-view"; }
   1919       if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/../../scan-view/bin/scan-view"); }
   1920       exec $ScanView, "$Options{OutputDir}";

Note that debian puts these binaries in places that don't necessarily
line up with the above due to injected version numbers:

0 dkg at alice:~$ for x in build view; do printf '%s: %s\n' scan-$x $(readlink -f $(which scan-$x) ); done
scan-build: /usr/share/clang/scan-build-8/bin/scan-build
scan-view: /usr/share/clang/scan-view-8/bin/scan-view
0 dkg at alice:~$ 

Can't it just search in $PATH?

Thanks for maintaining clang-tools in debian!

       --dkg

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (200, 'unstable-debug'), (200, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages clang-tools-8 depends on:
ii  clang-8      1:8.0.1-3+b1
ii  libc6        2.29-2
ii  libclang1-8  1:8.0.1-3+b1
ii  libgcc1      1:9.2.1-8
ii  libllvm8     1:8.0.1-3+b1
ii  libstdc++6   9.2.1-8
ii  python3      3.7.3-1

clang-tools-8 recommends no packages.

clang-tools-8 suggests no packages.

-- no debconf information



More information about the Pkg-llvm-team mailing list