Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529244 - net-analyzer/nmap - nping/configure automagically pulls in libnl when it should not
Summary: net-analyzer/nmap - nping/configure automagically pulls in libnl when it shou...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CVE-2013-4885
  Show dependency tree
 
Reported: 2014-11-14 14:46 UTC by Jeroen Roovers (RETIRED)
Modified: 2014-11-18 16:10 UTC (History)
1 user (show)

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


Attachments
net-analyzer:nmap-6.25-r1:20141114-131752.log (20141114-131752.log,131.30 KB, text/plain)
2014-11-14 14:46 UTC, Jeroen Roovers (RETIRED)
Details
nping/config.log (529244-nping-config.log,52.15 KB, text/plain)
2014-11-17 12:03 UTC, Jeroen Roovers (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2014-11-14 14:46:20 UTC
Created attachment 389300 [details]
net-analyzer:nmap-6.25-r1:20141114-131752.log

[ebuild     U ] net-analyzer/nmap-6.25-r1 [6.25] USE="gtk ipv6 lua ncat ndiff nls nmap-update nping ssl" LINGUAS="-de -es -fr -hr -h
u -id -it -ja -pl -pt_BR -pt_PT -ro -ru -sk -zh" PYTHON_TARGETS="python2_7%*" 

Fri 14 Nov 15:45:22 CET 2014
emerge --info net-analyzer/nmap
Portage 2.2.8-r2 (default/linux/hppa/13.0, gcc-4.8.3, glibc-2.19-r1, 3.17.0-gentoo-JeR parisc64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.17.0-gentoo-JeR-parisc64-PA8800_-Mako-with-gentoo-2.2
KiB Mem:     8231704 total,   4857616 free
KiB Swap:    2101676 total,   2101676 free
Timestamp of tree: Fri, 14 Nov 2014 04:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 hppa2.0-unknown-linux-gnu [enabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p53
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.2.5-r6, 3.3.5-r1, 3.4.1
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.22-r1, 2.23.1, 2.23.2, 2.24-r3
sys-devel/gcc:            4.6.3, 4.6.4, 4.7.2-r1, 4.7.3-r1, 4.8.1-r1, 4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo JeR
ACCEPT_KEYWORDS="hppa"
ACCEPT_LICENSE="*"
CBUILD="hppa2.0-unknown-linux-gnu"
CFLAGS="-mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe -Wno-comment"
CHOST="hppa2.0-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/distcc/bin /usr/lib/python2.7/site-packages/buildbot/status/web /usr/share/gnupg/qualified.txt /var/bind /var/spool/torque /var/www/localhost/htdocs/wordpress/wp-config.php"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe"
DISTDIR="/world/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs buildpkg cgroup compressdebug config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news notitles parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict test test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ http://gentoo.mneisen.org/ http://mirror.netcologne.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirror.leaseweb.com/gentoo/ http://gentoo.tiscali.nl/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/keeps/gentoo/packages/karsten"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/dev/shm"
PORTDIR="/world/gentoo/portage"
PORTDIR_OVERLAY="/keeps/gentoo/local"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="256-color X acl alsa amr anacron apng audit bash-completion beautifulsoup3 berkdb bfio bittorrent bzip2 cairo canberra cli consolekit coverage cracklib crossdev crypt cups custom-cflags cxx dane dbus declarative dirac directfb distinct-l dlz doc dot dri emacs exceptions exif expat fbcon filecaps firefox firmware foomaticdb fortran frontend-optional g-sorcery gbm gdbm geoip geoloc glep gles1 gles2 gost gpm graphite gsm gstreamer gtk gudev guile hddtemp hppa hwdb iconv idn imlib inotify ipv6 jadetex javascript jingle jit jpeg jpeg2k json kdrive kmod ladspa lasi launch-frontend libcaca libcanberra libevent libopts libsoxr libusb libwww lua lzma lzo mad mng mod modplug modules mp3 multislot multitarget munge nagios ncurses netlink nfs nls nptl objc objc++ objc-gc offensive openexr opengl openmp openrc openvg opus osmesa oss pam pcre php pic pkcs11 png pnm policykit python qt qt3support qt4 readline realtime regression-test rtmp samba schroedinger session smi socks5 speex spell spidermonkey sqlite ssl tcl tcpd test tga theora threads tiff tk tokyocabinet truetype unicode unwind v4l vim-syntax vorbis vpx wayland wcwidth x264 xa xattr xcb xft xhtml xkb xml2 xvfb xvid zlib" ALSA_CARDS="ad1889 usb-audio" APACHE2_MODULES="authz_host dir mime alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" DRACUT_MODULES="nfs syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev joystick keyboard mouse acecad aiptek calcomp citron digitaledge dmc dynapro elo2300 elographics fpit hyperpen jamstudio magellan microtouch mutouch palmax penmount spaceorb summa tek4957 tslib ur98 void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en nl he" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="stifb dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-analyzer/nmap-6.25 was built with the following:
USE="gtk ipv6 lua ncat ndiff nls nmap-update nping ssl test" LINGUAS="-de -es -fr -hr -hu -id -it -ja -pl -pt_BR -pt_PT -ro -ru -sk -zh"
Comment 1 Mike Gilbert gentoo-dev 2014-11-14 16:49:58 UTC
Looks like a failure to detect libpcap when cross-compiling.

Is this a regression from net-analyzer/nmap-6.25? I don't see how any of the changes I made in 6.25-r1 would cause this.
Comment 2 Mike Gilbert gentoo-dev 2014-11-14 16:51:32 UTC
Sorry, nevermind the cross-compiling part; the weird looking CHOST on hppa confused me for a moment.
Comment 3 Mike Gilbert gentoo-dev 2014-11-14 16:55:11 UTC
Also, I cannot reproduce this on my ~amd64 system.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-14 22:31:44 UTC
-r0 fails the same way.
Comment 5 Mike Gilbert gentoo-dev 2014-11-14 23:14:51 UTC
> === configuring in nping (/dev/shm/portage/net-analyzer/nmap-6.25-r1/work/nmap-6.25/nping)
> configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr'  '--build=hppa2.0-unknown-linux-gnu' '--host=hppa2.0-unknown-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib' '--enable-ipv6' '--enable-nls' '--with-zenmap' '--with-liblua' '--with-ncat' '--with-ndiff' '--with-nmap-update' '--with-nping' '--with-openssl' '--with-libdnet=included' 'build_alias=hppa2.0-unknown-linux-gnu' 'host_alias=hppa2.0-unknown-linux-gnu' 'CFLAGS=-mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe -Wno-comment' 'LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed' 'CXXFLAGS=-mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe' 'PYTHON=/usr/bin/python2.7' --cache-file=/dev/null --srcdir=.
> ...
> checking if libpcap is suitable... no

Should have a look at nping/config.log.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-17 12:03:58 UTC
Created attachment 389572 [details]
nping/config.log
Comment 7 Mike Gilbert gentoo-dev 2014-11-17 23:30:06 UTC
configure:5256: hppa2.0-unknown-linux-gnu-gcc -o conftest -mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe -Wno-comment  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c -lnl -ldl  -lpcap >&5
configure:5256: $? = 0
configure:5256: ./conftest
./configure: line 1644:  4217 Segmentation fault      ./conftest$ac_exeext
configure:5256: $? = 139
configure: program exited with status 139

I'm not sure what would cause that segfault... maybe a bad symbol table in libpcap?
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-18 00:26:53 UTC
I see the same problem with 6.47 now. I'm beginning to think it's a local thing.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-18 11:56:35 UTC
gdb> bt full
#0  genl_unregister (ops=0xf9b211ac <genl_ctrl_ops>) at genl/mngt.c:217
No locals.
#1  0xfac0b05c in _dl_fini () at dl-fini.c:252
        array = <optimized out>
        i = 0x0
        nmaps = 0xa
        nloaded = <optimized out>
        i = 0x3
        l = 0xfaeffd60
        ns = 0x0
        maps = 0xfaf034d0
        maps_size = <optimized out>
        do_audit = 0x0
        __PRETTY_FUNCTION__ = "_dl_fini"
#2  0xfa4373d8 in __run_exit_handlers (status=0x0, listp=0xfa5661a8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=0x1) at exit.c:82
        atfct = <optimized out>
        onfct = <optimized out>
        cxafct = <optimized out>
        f = <optimized out>
#3  0xfa437410 in __GI_exit (status=<optimized out>) at exit.c:104
No locals.
#4  0xfa41c9a0 in __libc_start_main (main=<error reading variable: can't compute CFA for this frame>, argc=<error reading variable: can't compute CFA for this frame>, argv=<error reading variable: can't compute CFA for this frame>, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at libc-start.c:319
        result = <optimized out>
        unwind_buf = <error reading variable unwind_buf (can't compute CFA for this frame)>
        not_first_call = <optimized out>
#5  0x000105e8 in _start ()
No symbol table info available.

I think this is an old problem with libdl on HPPA. I'm sure I had a bug report about this.
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-18 12:52:05 UTC
(In reply to Jeroen Roovers from comment #9)
> gdb> bt full
> #0  genl_unregister (ops=0xf9b211ac <genl_ctrl_ops>) at genl/mngt.c:217

Oh wait. That's dev-libs/libnl:1.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-18 13:06:01 UTC
In nping/configure.ac:

# libpcap can require libnl
AC_SEARCH_LIBS(nl_handle_alloc, nl)

That's naughty because we don't cover that and it randomly chooses libnl:1 over libnl:3.
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-18 13:12:54 UTC
That's libnl:1.1 actually.

What happens is that libpcap links against libnl-3 and then nping/configure.ac mixes in libnl.a. See also bug #469176.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-18 14:19:08 UTC
Fixed without revision bump.
Comment 14 Mike Gilbert gentoo-dev 2014-11-18 16:10:53 UTC
Nice find!