clang-view cannot import module ScanView
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
llvm-toolchain-3.9 (Debian) |
Fix Released
|
Unknown
|
|||
llvm-toolchain-3.9 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Fresh package from today still has the problem of clang-view unable to import module ScanView.
This is the same bug as in: https:/
Proposed fix does work if applied locally.
Copied from the link:
Hello,
scan-view-3.9 fails to find the needed python modules:
$ scan-view-3.9 scan-build-master/
Traceback (most recent call last):
File "/usr/bin/
main()
File "/usr/bin/
run(port, args, args.root)
File "/usr/bin/
import ScanView
ImportError: No module named ScanView
the problem is that os.path.
/usr/share/
as expected by the script.
A quick way to fix that is to hardcode the scan-view dir:
$ diff -u ../bin/
--- ../bin/
+++ ../bin/scan-view 2016-09-22 16:39:19.383579819 +0200
@@ -22,6 +22,8 @@
kDefaultPort = 8181
kMaxPortsToTry = 100
+BASE_DIR = '/usr/share/
+
###
@@ -61,7 +63,7 @@
def run(port, options, root):
# Prefer to look relative to the installed binary
- share = os.path.
+ share = os.path.
if not os.path.
# Otherwise look relative to the source
share = os.path.
tags: | added: patch |
Changed in llvm-toolchain-3.9 (Debian): | |
status: | Unknown → Fix Released |
I retested this on 16.04 with clang-3.8 and there exists the same issue.