Bug 982645 - scan-build does not works
scan-build does not works
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: llvm (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Včelák
Fedora Extras Quality Assurance
:
: 923834 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-09 09:26 EDT by Clément DAVID
Modified: 2013-12-16 18:06 EST (History)
10 users (show)

See Also:
Fixed In Version: llvm-3.3-3.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-13 22:21:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Clément DAVID 2013-07-09 09:26:30 EDT
Description of problem:
I'm unable to use it.

Version-Release number of selected component (if applicable):

clang-analyzer-3.3-0.6.rc3.fc19.x86_64
clang-3.3-0.6.rc3.fc19.x86_64
llvm-3.3-0.6.rc3.fc19.x86_64

Steps to Reproduce:

$ make CC=/usr/lib64/clang-analyzer/scan-build/ccc-analyzer
# works fine and produce warning as expected

$ scan-build make 
scan-build: error: Cannot find an executable 'clang' relative to scan-build.  Consider using --use-analyzer to pick a version of 'clang' to use for static analysis.

$ scan-build --use-analyzer /usr/lib64/clang-analyzer/scan-build/ccc-analyzer make
# produce make output with cc=gcc
# end with 
scan-build: Removing directory '/tmp/scan-build-2013-07-09-1' because it contains no reports.
scan-build: No bugs found.


Expected results:
a scan build html output


Additional info:
Comment 1 Jan Včelák 2013-11-29 18:46:20 EST
*** Bug 923834 has been marked as a duplicate of this bug. ***
Comment 2 Fedora Update System 2013-11-30 03:44:55 EST
llvm-3.3-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/llvm-3.3-3.fc19
Comment 3 Fedora Update System 2013-11-30 06:58:02 EST
llvm-3.3-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/llvm-3.3-3.fc20
Comment 4 Fedora Update System 2013-12-01 04:38:41 EST
Package llvm-3.3-3.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing llvm-3.3-3.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22509/llvm-3.3-3.fc19
then log in and leave karma (feedback).
Comment 5 Olivier Crête 2013-12-05 14:41:20 EST
On F20, even after this update, scan-build still does not work.

Doing scan-build --help-checkers does now list the checkers. But it seem to never run them.
Comment 6 Jan Včelák 2013-12-05 15:00:15 EST
Works for me. How do you invoke the compilation?

$ cat main.c 
#include <stdio.h>

int main(void)
{
        int var;
        printf("test %d\n", var);
        return 0;
}
$ scan-build gcc ./main.c
scan-build: Using '/usr/bin/clang' for static analysis
./main.c:6:2: warning: Function call argument is an uninitialized value
        printf("test %d\n", var);
        ^~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
scan-build: 1 bugs found.
scan-build: Run 'scan-view /tmp/scan-build-2013-12-05-3' to examine bug reports.
Comment 7 Olivier Crête 2013-12-05 15:08:54 EST
I did "scan-build make" in a autoconf/automake project (the core GStreamer repository).
Comment 8 Jan Včelák 2013-12-05 16:39:24 EST
If it is an automake project, you should run even ./configure through scan-build. Have you done it?
 
[1] http://clang-analyzer.llvm.org/scan-build.html#recommended_autoconf
Comment 9 Olivier Crête 2013-12-05 17:08:19 EST
I'm an idiot, sorry
Comment 10 Olivier Crête 2013-12-05 17:15:58 EST
Btw, the man page isn't installed in the right place.
Comment 11 Jan Včelák 2013-12-05 17:23:22 EST
No problem. :-) I will fix the man page in next update.
Comment 12 Fedora Update System 2013-12-13 22:21:33 EST
llvm-3.3-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2013-12-16 18:06:05 EST
llvm-3.3-3.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.