Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 335951

Summary: net-analyzer/nsat does not respect LDFLAGS
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Netmon Herd <netmon>
Severity: QA CC: esigra, gaurdro, jer
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 331933    
Attachments: Build log
respects LDFLAGS, some cleanups to ebuild, added sedd die statements

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-04 16:46:12 UTC
See attached build log.

(Please do not complain about the need for looking at the build log until you can provide an easy way to open bugs with the correct data picked out of a tinderbox log. Thanks.)
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-04 16:46:30 UTC
Created attachment 245971 [details]
Build log
Comment 2 Ross Smith 2010-09-04 18:03:14 UTC
Created attachment 246020 [details, diff]
respects LDFLAGS, some cleanups to ebuild, added sedd die statements
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-06 21:59:42 UTC
(In reply to comment #2)
> Created an attachment (id=246020) [details]
> respects LDFLAGS, some cleanups to ebuild, added sedd die statements

-KEYWORDS="~ppc sparc x86"
+KEYWORDS="~ppc sparc x86 amd64"

You're leaving stable keywords and adding a stable keyword - they should all be ~arch in the revision bump.

 src_unpack() {
 	unpack ${A}
 	cd "${S}"
-	cp -va{,.orig}

Removing the (useless, granted) cp, that leaves src_unpack() redundant as well, so that should be removed entirely.

-	make|| die "compile problem"
+	emake|| die "compile problem"

This is good, but creates another problem, namely:

 * QA Notice: make jobserver unavailable:
 *      make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

Oh, and all the patching should go into src_prepare(), not src_configure().

And after all that, it still doesn't respect LDFLAGS:

 * QA Notice: Files built without respecting LDFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/bin/nsat
 * /usr/bin/smb-ns

And it calls cc instead of the canonical toolchain quadruplet:
make -j2
make[1]: Entering directory `/var/tmp/portage/net-analyzer/nsat-1.5/work/nsat/src'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
make[2]: Entering directory `/var/tmp/portage/net-analyzer/nsat-1.5/work/nsat/src/smb'
compiling ADM smb scanner... !!! JeR-QA: /keeps/gentoo/cc-qa-check/cc was called
In file included from ./client.c:73:
./ADMsmb.c: In function ‘ADMsmb’:
./ADMsmb.c:126: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in sign
/usr/include/bits/socket2.h:65: note: expected ‘socklen_t * __restrict__’ but argument is of type ‘int *’
!!! JeR-QA: /keeps/gentoo/cc-qa-check/cc was called
!!! JeR-QA: /keeps/gentoo/cc-qa-check/cc was called

And later on, it disrespects CFLAGS again:
i686-pc-linux-gnu-g++ -Wall -O6 -funroll-loops -ansi -fPIC -DLINUX -DWITH_XPROBE -c progress.cpp
i686-pc-linux-gnu-g++ -Wall -O6 -funroll-loops -ansi -fPIC -DLINUX -DWITH_XPROBE -c AuditSet.cpp
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-06 22:02:09 UTC
Oh, all the disrespect problems seem to arise from the fact that all the actual changes were in src_configure(), run after src_prepare().
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-06 22:32:53 UTC
I have to say the entire build system (, in most subdirectories) is really horrible.

Lines like this:

    @$(CC) $(CFLAGS) -c $(srcdir)$*.c -o $(srcdir)$*.o

really make my stomach churn. And the way our CFLAGS get mangled a couple of times over is really horrible. Why does src/smb/Makefile end up adding

FLAGS1 = -O3

to CFLAGS? It doesn't end up getting used because we override it, but just, why?

And this:

wtf? I am nearly ready to give up. :)
Comment 6 Sergey Popov gentoo-dev 2012-09-26 07:30:02 UTC
net-analyzer/nsat-1.5-r1 now has some portion of fixes, introduced here, except fixes for LDFLAGS
Comment 7 Sergey Popov gentoo-dev 2012-10-06 19:00:56 UTC
+  06 Oct 2012; Sergey Popov <> nsat-1.5-r1.ebuild:
+  Respect LDFLAGS wrt bug #335951

I close this bug as FIXED, but there is some more things that need to do with this nsat's ugly build system :-/