Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 561718 - net-analyzer/bwm-ng: ncurses no longer is used due to faulty patch
Summary: net-analyzer/bwm-ng: ncurses no longer is used due to faulty patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: David Seifert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-09-28 10:50 UTC by Manfred Knick
Modified: 2016-02-24 08:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/net-analyzer/bwm-ng-0.6-r1/temp/build.log (build.log,13.28 KB, text/x-log)
2015-09-28 10:51 UTC, Manfred Knick
Details
emerge --info '=net-analyzer/bwm-ng-0.6-r1::gentoo' (ei0,5.69 KB, text/plain)
2015-09-28 10:53 UTC, Manfred Knick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manfred Knick 2015-09-28 10:50:31 UTC
net-analyzer/bwm-ng-0.6-r1 
builds with sys-devel/gcc-4.9.3:4.9,
but fails with sys-devel/gcc-5.2.0.

Reproducible: Always
Comment 1 Manfred Knick 2015-09-28 10:51:55 UTC
Created attachment 413138 [details]
/var/tmp/portage/net-analyzer/bwm-ng-0.6-r1/temp/build.log
Comment 2 Manfred Knick 2015-09-28 10:53:13 UTC
Created attachment 413140 [details]
emerge --info '=net-analyzer/bwm-ng-0.6-r1::gentoo'
Comment 3 Manfred Knick 2015-09-28 10:53:43 UTC
 emerge -pqv '=net-analyzer/bwm-ng-0.6-r1::gentoo'

[ebuild   R   ] net-analyzer/bwm-ng-0.6-r1  USE="-csv -html"
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2015-09-30 00:34:54 UTC
input/retrieve.h:64:13: warning: inline function 'get_iface_stats' declared but never defined
 inline void get_iface_stats(char _n);
             ^
x86_64-pc-linux-gnu-gcc  -O2 -march=native -pipe -Wno-long-double -Wno-long-long  -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -o bwm-ng  bwm-ng.o process.o output.o options.o help.o curses_tools.o retrieve.o proc_net_dev.o proc_diskstats.o -lncurses 
bwm-ng.o: In function `main':
bwm-ng.c:(.text.startup+0x1d3): undefined reference to `get_iface_stats'
bwm-ng.c:(.text.startup+0x239): undefined reference to `get_iface_stats'
curses_tools.o: In function `handle_gui_input':
curses_tools.c:(.text+0x191): undefined reference to `get_iface_stats'
collect2: error: ld returned 1 exit status
Makefile:213: recipe for target 'bwm-ng' failed
make[2]: *** [bwm-ng] Error 1

c99 inline
Comment 5 Felix Janda 2015-11-19 07:47:30 UTC
Fixed with commit 1ed8f75a0539827732f639e5d52148f30fc032a0 in bwm-ng-0.6.1.
Comment 6 David Seifert gentoo-dev 2016-01-24 14:35:09 UTC
I've bumped nwm-ng to 0.6.1 which fixes the GCC 5 issues, but still had lingering ncurses issues due to the awful way of finding ncurses.

commit 721662200e8bdb383ef845e5496dd941ebd6b2bb
Author: David Seifert <soap@gentoo.org>
Date:   Sun Jan 24 15:31:50 2016 +0100

    net-analyzer/bwm-ng: Version bump to 0.6.1
    
    Gentoo-Bug: 561718
    * EAPI=6
    * Fix ncurses underlinking issue
Comment 7 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2016-02-22 16:27:28 UTC
I don't think this fixed the problem, so reopening.

This patch results in ncurses not even being linked at all, since it seems like there are no symbols from the library being used. I suspect the patch added fails to add HAVE_NCURSES to the configure file.

This disables the keyboard interactive features, which is quite unfortunate.
Comment 8 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2016-02-22 16:32:26 UTC
Indeed, this is the case. Adding this horrible change to the ebuild fixes the problem:

diff --git a/net-analyzer/bwm-ng/bwm-ng-0.6.1.ebuild b/net-analyzer/bwm-ng/bwm-ng-0.6.1.ebuild
index ae30fbd..6ed8168 100644
--- a/net-analyzer/bwm-ng/bwm-ng-0.6.1.ebuild
+++ b/net-analyzer/bwm-ng/bwm-ng-0.6.1.ebuild
@@ -35,4 +35,5 @@ src_configure() {
 		--with-procnetdev \
 		$(use_enable html) \
 		$(use_enable csv)
+	echo '#define HAVE_LIBNCURSES 1' >> ./config.h
 }


This is pretty ugly though, and I'd suggest doing it the correct way instead.
Comment 9 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2016-02-22 16:34:49 UTC
Assigning David, since his patch caused this issue.
Comment 10 David Seifert gentoo-dev 2016-02-23 18:53:06 UTC
Yes, my patch was incomplete, I was indeed missing an AC_DEFINE. I've amended the patch and revbumped bwm-ng. ldd now gives me:

soap@thinkpad ~ $ ldd /usr/bin/bwm-ng 
	linux-vdso.so.1 (0x00007fff131c7000)
	libncurses.so.6 => /lib64/libncurses.so.6 (0x00007f912e6cc000)
	libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f912e493000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f912e0f7000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f912def3000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f912e8f4000)

and testing the program seems to work for me. Please give it another shot.

commit dcd30cf750b6cc2207a98baff90e15ce8f305c79
Author: David Seifert <soap@gentoo.org>
Date:   Tue Feb 23 19:50:07 2016 +0100

    net-analyzer/bwm-ng: Amend patch to include missing AC_DEFINE
    
    Gentoo-Bug: 561718