Package: clang-3.8
Version: 1:3.8.1-16
Severity: important
Tags: patch

Hi,

When running scan-view-3.8 after a scan-build, it can't find the ScanView
module:

$ scan-view /tmp/scan-build-2016-12-14-152605-2260-1
/usr/bin/../share/clang/scan-view
Traceback (most recent call last):
  File "/usr/bin/scan-view", line 144, in <module>
    main()
  File "/usr/bin/scan-view", line 141, in main
    run(port, args, args.root)
  File "/usr/bin/scan-view", line 71, in run
    import ScanView
ImportError: No module named ScanView

Looking at scan-view-3.8, the way it adds the directory to its path is
different depending on whether /usr/share/clang/scan-view-3.8/bin/scan-view is
called or its symbolic link at /usr/bin/scan-view-3.8.

Quick fix:


--- /usr/share/clang/scan-view-3.8/bin/scan-view-3.8.old        2016-12-14
15:54:11.107830663 -0800
+++ /usr/share/clang/scan-view-3.8/bin/scan-view        2016-12-14
16:07:16.868125122 -0800
@@ -61,7 +61,7 @@

 def run(port, options, root):
     # Prefer to look relative to the installed binary
-    share = os.path.dirname(__file__) + "/../share/"
+    share = os.path.dirname(os.path.realpath(__file__)) + "/../share/"
     if not os.path.isdir(share):
         # Otherwise look relative to the source
         share = os.path.dirname(__file__) + "/../../scan-view/share"


Cheers,
Jordi



-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

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

Versions of packages clang-3.8 depends on:
ii  binutils                 2.27.51.20161201-1
ii  libc6                    2.24-7
ii  libc6-dev                2.24-7
ii  libclang-common-3.8-dev  1:3.8.1-16
ii  libclang1-3.8            1:3.8.1-16
ii  libgcc-6-dev             6.2.1-5
ii  libgcc1                  1:6.2.1-5
ii  libllvm3.8               1:3.8.1-16
ii  libobjc-6-dev            6.2.1-5
ii  libstdc++-6-dev          6.2.1-5
ii  libstdc++6               6.2.1-5

Versions of packages clang-3.8 recommends:
ii  llvm-3.8-dev  1:3.8.1-16
ii  python        2.7.11-2

Versions of packages clang-3.8 suggests:
pn  clang-3.8-doc  <none>
pn  gnustep        <none>
pn  gnustep-devel  <none>

-- no debconf information

Reply via email to