scan-build broken

Bug #574719 reported by Thomas Jones
48
This bug affects 10 people
Affects Status Importance Assigned to Milestone
clang (Debian)
Fix Released
Unknown
clang (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Jack Leigh

Bug Description

Binary package hint: clang

when trying to do anything other than get the help output scan-build fails with the message

scan-build: Executable 'c++-analyzer' does not exist at '/usr/bin/c++-analyzer'

symlinking /usr/bin/c++-analyzer to /usr/bin/ccc-analyzer seems to make it happy... but I haven't tried it with a project that's actually written in C++

steps to reproduce:
1) get the source to some project that uses autoconf (so I can give only one set of instructions...)
2) cd into the directory and do scan-build ./configure
3) see the message

Also the scan-view tool is missing from the clang package and you need it to view the results of the scan-build run

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: clang 2.7-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
Architecture: amd64
Date: Mon May 3 15:20:11 2010
ProcEnviron:
 LANGUAGE=en_CA:en
 PATH=(custom, user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: clang

[Impact]
scan-build is not usable

[Stable Fix]
Patch is in comment #3

[Test case]
run
scan-build gcc -c file.c

Related branches

Revision history for this message
Thomas Jones (thomas-jones-utoronto) wrote :
Anders Kaseorg (andersk)
Changed in clang (Ubuntu):
status: New → Confirmed
Revision history for this message
Rob Keim (robkeim) wrote :

I'm guess from #549680 that the static analysis tools were added fairly last-minute, and all of the support tools they require are missing. It's missing 3 files:

c++-analyzer (just needs to be symlinked from ccc-analyzer)
sorttable.js and scanview.css (MISSING -- probably should be added to a /usr/share/scan-build, which isn't created at all)

scan-build will run successfully without the missing files if there are no bugs in the code it's analyzing, but if it actually needs to generate a report, it will crap out and die when trying to actually generate the report.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Here’s a trivial packaging fix that makes scan-view and clang++ (bug 584759) work. I’ve tested it in my PPA <https://launchpad.net/~anders-kaseorg/+archive/ppa>; I can now successfully use scan-build on a program with errors.

Evan Broder (broder)
Changed in clang (Ubuntu):
assignee: nobody → Evan Broder (broder)
status: Confirmed → In Progress
Evan Broder (broder)
Changed in clang (Ubuntu):
assignee: Evan Broder (broder) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package clang - 2.7-0ubuntu4

---------------
clang (2.7-0ubuntu4) maverick; urgency=low

  [ Anders Kaseorg ]
  * Install all scan-build files into /usr/share/clang/scan-build.
    (LP: #574719)
  * Install /usr/bin/clang++ symlink. (LP: #584759)

  [ Evan Broder ]
  * Touch up the maintainer field.
 -- Evan Broder <email address hidden> Mon, 09 Aug 2010 23:29:42 -0400

Changed in clang (Ubuntu):
status: In Progress → Fix Released
Changed in clang (Debian):
status: Unknown → Fix Released
Revision history for this message
Eero Pajarre (epajarre) wrote :

Maybe this should also fixed in Lucid branch?

 Eero

Revision history for this message
Dern (nico-sonycom) wrote :

I second that. Please fix this in the lucid (10.4.1 LTS) branch!

Nico

Revision history for this message
Anders Kaseorg (andersk) wrote :

If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for “How to request new packages” at https://help.ubuntu.com/community/UbuntuBackports#request-new-packages .

Jack Leigh (leighman)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.