Bug 147434 - devel/clang: c++-analyzer missing, breaking scan-build
Summary: devel/clang: c++-analyzer missing, breaking scan-build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 14:00 UTC by Matthias Andree
Modified: 2010-08-18 02:00 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree freebsd_committer freebsd_triage 2010-06-03 14:00:08 UTC
scan-build misses c++-analyzer installed:

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

Fix: 

patch/install c++-analyzer, add to pkg-plist.

I'm not sufficiently familiar with the clang ports build to propose a
patch.
How-To-Repeat: install clang port
cd into the configured source directory of some software
run scan-build make as shown in Description
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2010-06-03 14:04:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->brooks

Over to maintainer
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2010-06-03 14:12:47 UTC
Further input, if I manually install c++-analyzer,
scan-build fails at the end of its run with
"Cannot find 'sorttable.js'.":

...
ANALYZE: ../transact.c gen_send
ANALYZE: ../transact.c gen_recv
ANALYZE: ../transact.c gen_transact
2 diagnostics generated.
mv -f .deps/transact.Tpo .deps/transact.Po
/usr/local/bin/ccc-analyzer  -O2 -ggdb3 -Wextra -Wall -pedantic -std=c99
-I/usr/kerberos/include  -L/usr/lib -o fetchmail socket.o getpass.o
fetchmail.o env.o idle.o  options.o daemon.o driver.o  transact.o sink.o
smtp.o  idlist.o uid.o mxget.o  md5ify.o cram.o gssapi.o  opie.o
interface.o netrc.o  unmime.o conf.o checkalias.o  lock.o rcfile_l.o
rcfile_y.o  norm_charmap.o  pop3.o  imap.o etrn.o odmr.o       libfm.a
/usr/local/lib/libintl.so -L/usr/local/lib /usr/local/lib/libiconv.so
-Wl,-rpath -Wl,/usr/local/lib   -lcrypt -lmd  -lkvm -lcom_err  -lssl
-lcrypto  -L/usr/lib -lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err
-lcrypto -lasn1 -lroken -lcrypt
Making all in po
scan-build: Cannot find 'sorttable.js'.
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2010-06-03 14:16:57 UTC
It appears that scan-build looks for sorttable et al. in the same
directory as itself, i. e. $LOCALBASE/bin. Perhaps build-scan needs to
be patched to look in $DATADIR.
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2010-06-03 14:23:10 UTC
Also, the Python script scan-view does not get installed, so the
output that scan-build provides after a complete run is a dead end:

$ scan-build make -j4 -e
...
ANALYZE: ../transact.c gen_recv
ANALYZE: ../transact.c gen_transact
2 diagnostics generated.
mv -f .deps/transact.Tpo .deps/transact.Po
/usr/local/bin/ccc-analyzer  -O2 -ggdb3 -Wextra -Wall -pedantic -std=c99
-I/usr/kerberos/include  -L/usr/lib -o fetchmail socket.o getpass.o
fetchmail.o env.o idle.o  options.o daemon.o driver.o  transact.o sink.o
smtp.o  idlist.o uid.o mxget.o  md5ify.o cram.o gssapi.o  opie.o
interface.o netrc.o  unmime.o conf.o checkalias.o  lock.o rcfile_l.o
rcfile_y.o  norm_charmap.o  pop3.o  imap.o etrn.o odmr.o       libfm.a
/usr/local/lib/libintl.so -L/usr/local/lib /usr/local/lib/libiconv.so
-Wl,-rpath -Wl,/usr/local/lib   -lcrypt -lmd  -lkvm -lcom_err  -lssl
-lcrypto  -L/usr/lib -lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err
-lcrypto -lasn1 -lroken -lcrypt
Making all in po
scan-build: 7 bugs found.
scan-build: Run 'scan-view /tmp/scan-build-2010-06-03-5' to examine bug
reports.

$ scan-view /tmp/scan-build-2010-06-03-5/
bash: scan-view: command not found

either the script should be patched (shebang line) or the output of
scan-build should be changed appropriately (f. i. that users should use
a browser to view file:///tmp/scan-build-2010-06-03-5/index.html)
Comment 5 Matthias Andree 2010-08-18 01:26:42 UTC
FYI: I am currently testing a patch that should fix scan-build and install  
scan-view properly, and also fix minor portlint and other issues about the  
port.

-- 
Matthias Andree
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2010-08-18 01:29:54 UTC
Responsible Changed
From-To: brooks->mandree

Steal PR according to mail cc'd to portmgr@ on Aug 10.
Comment 7 Matthias Andree freebsd_committer freebsd_triage 2010-08-18 01:30:59 UTC
State Changed
From-To: open->analyzed

patch that fixes this is under testing, and I have maintainer's carte 
blanche
Comment 8 dfilter service freebsd_committer freebsd_triage 2010-08-18 01:59:28 UTC
mandree     2010-08-18 00:59:19 UTC

  FreeBSD ports repository

  Modified files:
    devel/clang          Makefile pkg-plist 
  Log:
  Fix clang analyzer, and clean up port a bit. Adds dependencies.
  
  - patch scan-view to use PYTHON_CMD
  - also install c++-analyzer and scan-view
  - also install ScanView.py and its dependencies into PYTHON_SITELIBDIR
  - change USE_PERL5_BUILD to USE_PERL5, as scan-build needs it
    at run time
  - add USE_PYTHON, as scan-view needs it
    (let's see to making these dependencies optional later)
  
  - move EXTRACT_SUFX up to quiet portlint
  - indent CONFLICTS value with TAB to quiet portlint
  - add USE_LDCONFIG, found missing by portlint
  - nuke empty $DOCSDIR/html/img that made deinstall complain
  
  - amend to build-plist target
  - rebuild pkg-plist
  - bump PORTREVISION (changed pkg-plist)
  
  The approval was a blanket approval under the condition that build-plist
  was also updated, and was mailed to portmgr@ and yours truly
  on 2010-08-10 by brooks@ in reference to the PR mentioned below.
  
  Approved by:    brooks (maintainer)
  PR:             ports/147434
  
  Revision  Changes    Path
  1.8       +33 -7     ports/devel/clang/Makefile
  1.5       +9 -1      ports/devel/clang/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Matthias Andree freebsd_committer freebsd_triage 2010-08-18 01:59:55 UTC
State Changed
From-To: analyzed->closed

Fixed in 2.7_2.