Opened 3 years ago

Closed 3 years ago

#63047 closed defect (fixed)

clang-12: scan-view does not work: Already fixed upstream

Reported by: szhorvat (Szabolcs Horvát) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kencu (Ken), jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager)
Port: clang-12

Description (last modified by szhorvat (Szabolcs Horvát))

Following the recent fix of issue #63026, I built clang-12 with the +analyzer variant and checked whether it works, roughly along the lines I wrote up in this wiki: https://github.com/igraph/igraph/wiki/Running-linters-and-analysers

The analyzer itself, and the scan-build script appear to work fine.

The scan-view script (called scan-view-mp-12) does not work. The output is this:

Traceback (most recent call last):
  File "/opt/local/libexec/llvm-12/bin/scan-view", line 150, in <module>
    main()
  File "/opt/local/libexec/llvm-12/bin/scan-view", line 147, in main
    run(port, args, args.root)
  File "/opt/local/libexec/llvm-12/bin/scan-view", line 74, in run
    import ScanView
  File "/opt/local/libexec/llvm-12/bin/../share/scan-view/ScanView.py", line 29, in <module>
    import Reporter
ImportError: No module named Reporter

scan-view is used to view the analysis reports in a browser. One might use scan-view-mp-11 to view the results of an analysis from clang-12, so it's not a huge deal. But scan-view-mp-12 should work as well.

I have not yet had the time to figure out why exactly this is broken and how to fix it, but here's the bug report in advance. I'll let you know if I figure out a fix.

Related:

Change History (6)

comment:1 Changed 3 years ago by szhorvat (Szabolcs Horvát)

Description: modified (diff)

comment:2 Changed 3 years ago by szhorvat (Szabolcs Horvát)

Reporter.py seems to be missing from the llvm-12 installation. Note:

~ $ ls /opt/local/libexec/llvm-11/share/scan-view/
FileRadar.scpt       Reporter.py          bugcatcher.ico
GetRadarVersion.scpt ScanView.py          startfile.py

~ $ ls /opt/local/libexec/llvm-12/share/scan-view/
ScanView.py    bugcatcher.ico startfile.py

I think this is an upstream bug. See here:

https://github.com/llvm/llvm-project/tree/main/clang/tools/scan-view/share

and see this commit which fixes it:

https://github.com/llvm/llvm-project/commit/e3cd3a3c91524c957e06bb0170343548f02b6842

comment:3 Changed 3 years ago by kencu (Ken)

that looks fixed in the 12.x branch, so it should roll out with the clang-12 v12.1.0 update that comes out fairly soon.

Not much point putting in a patch for MacPorts and revbumping 12 systems @3hours each for this, I would say, so we'll leave this to the next update.

comment:4 Changed 3 years ago by kencu (Ken)

Owner: set to kencu
Status: newaccepted
Summary: clang-12: scan-view does not workclang-12: scan-view does not work: Already fixed upstream

comment:5 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:6 Changed 3 years ago by kencu (Ken)

Resolution: fixed
Status: acceptedclosed

12.0.1 (not 12.1.0) came out recently with this fix in it.

Please reopen if still an issue with new information.

Note: See TracTickets for help on using tickets.