Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 206863 - net-analyzer/nmap-4.68 fails to compile on uclibc/uclibc++
Summary: net-analyzer/nmap-4.68 fails to compile on uclibc/uclibc++
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on: 213804
Blocks:
  Show dependency tree
 
Reported: 2008-01-21 12:31 UTC by Natanael Copa
Modified: 2009-10-13 11:16 UTC (History)
0 users

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


Attachments
nmap-4.53-uclibc++-output.cc.patch (nmap-4.53-uclibc++-output.cc.patch,424 bytes, patch)
2008-03-18 08:56 UTC, Natanael Copa
Details | Diff
nmap-4.53-uclibc++-ctime.patch (nmap-4.53-uclibc++-ctime.patch,211 bytes, patch)
2008-03-18 08:57 UTC, Natanael Copa
Details | Diff
nmap-4.53-libm.patch (nmap-4.53-libm.patch,1.15 KB, patch)
2008-03-18 13:10 UTC, Natanael Copa
Details | Diff
nmap-4.53.ebuild.patch (nmap-4.53.ebuild.patch,772 bytes, patch)
2008-03-18 13:40 UTC, Natanael Copa
Details | Diff
Adds libm checks for Linux system (nmap-4.53-libm-linux.patch,391 bytes, patch)
2008-05-18 21:17 UTC, Sergey Dryabzhinsky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2008-01-21 12:31:59 UTC
g++-uc -c  -Ilibdnet-stripped/include -Os -pipe -Wall  -fno-strict-aliasing -Inbase -Insock/include   -DHAVE_CONFIG_H -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://insecure.org\" -DNMAP_PLATFORM=\"i386-gentoo-linux-uclibc\" -DNMAPDATADIR=\"/usr/share/nmap\" -DNMAPLIBEXECDIR=\"/usr/libexec/nmap\" output.cc -o output.o
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/functional: In member function `bool std::less<T>::operator()(const T&, const T&) const [with T = data_file_record]':
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/list:768:   instantiated from `void std::list<T, Allocator>::sort(Compare) [with Compare = std::less<data_file_record>, T = data_file_record, Allocator = std::allocator<data_file_record>]'
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/list:747:   instantiated from `void std::list<T, Allocator>::sort() [with T = data_file_record, Allocator = std::allocator<data_file_record>]'
output.cc:1880:   instantiated from here
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/functional:147: error: passing `const data_file_record' as `this' argument of `bool data_file_record::operator<(const data_file_record&)' discards qualifiers
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/string: At global scope:
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/string:104: warning: inline function `std::basic_string<Ch, Tr, A>::~basic_string() [with Ch = char, Tr = std::char_traits<char>, A = std::allocator<char>]' used but never defined
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/string:75: warning: inline function `std::basic_string<Ch, Tr, A>::basic_string(const A&) [with Ch = char, Tr = std::char_traits<char>, A = std::allocator<char>]' used but never defined
make[1]: *** [output.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-analyzer/nmap-4.50/work/nmap-4.50'
make: *** [all] Error 2

To reproduce: CXX=g++-uc emerge nmap
Comment 1 Natanael Copa 2008-01-21 12:32:40 UTC
Portage 2.1.3.19 (uclibc/x86/hardened, gcc-3.4.6, uclibc-0.9.28.3-r2, 2.6.22-vsgrsec-r2 i686)
=================================================================
System uname: 2.6.22-vsgrsec-r2 i686 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz
Timestamp of tree: Mon, 21 Jan 2008 08:02:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0_rc6-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.6.3, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i386-gentoo-linux-uclibc"
CFLAGS="-march=i386 -Os -pipe -fomit-frame-pointer"
CHOST="i386-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -pipe"
DISTDIR="/var/cache/distfiles"
FEATURES="autoconfig buildpkg distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/var/cache/packages/default"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/alpine-portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X509 bitmap-fonts bri bzip2 cli cracklib dri encode expat extensions hardened iproute2 ipv6 jpeg lua mad midi mmap mudflap ncurses netboot nonfsv4 ntfs ogg openmp oss pci pcmcia pic png pppd pri readline reflection rrdtool sensord session snmp speex spl ssl tdb truetype truetype-fonts type1-fonts uclibc uclibc++ udev usb userlocales wifi wordexp x86 xorg zaptel zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" MISDN_CARDS="avmfritz hfcmulti hfcpci hfcsmini hfcsusb netjetpci sedlfax w6692pci xhfc" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l apm ark chips cirrus cyrix epson glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng vesa vga via voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 2 Natanael Copa 2008-01-21 12:37:40 UTC
this is what i get on amd64 glibc/uclibc++:

g++-uc -c  -DNOLUA -Ilibdnet-stripped/include -march=nocona -O2 -pipe -Wall  -fno-strict-aliasing -Inbase -Insock/include   -DHAVE_CONFIG_H -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://insecure.org\" -DNMAP_PLATFORM=\"x86_64-pc-linux-gnu\" -DNMAPDATADIR=\"/usr/share/nmap\" -DNMAPLIBEXECDIR=\"/usr/libexec/nmap\" nmap.cc -o nmap.o
nmap.cc: In function ‘int nmap_main(int, char**)’:
nmap.cc:652: error: ‘time’ was not declared in this scope
nmap.cc:653: error: ‘localtime’ was not declared in this scope
nmap.cc:822: warning: deprecated conversion from string constant to ‘char*’
nmap.cc:1038: warning: deprecated conversion from string constant to ‘char*’
nmap.cc:1053: warning: deprecated conversion from string constant to ‘char*’
nmap.cc:1066: warning: deprecated conversion from string constant to ‘char*’
nmap.cc:1079: warning: deprecated conversion from string constant to ‘char*’
nmap.cc:1091: warning: deprecated conversion from string constant to ‘char*’
nmap.cc:1225: warning: deprecated conversion from string constant to ‘char*’
nmap.cc:1253: error: ‘strftime’ was not declared in this scope
nmap.cc:1256: error: invalid use of incomplete type ‘struct tm’
output.h:141: error: forward declaration of ‘struct tm’
nmap.cc:1256: error: invalid use of incomplete type ‘struct tm’
output.h:141: error: forward declaration of ‘struct tm’
nmap.cc:1257: error: invalid use of incomplete type ‘struct tm’
output.h:141: error: forward declaration of ‘struct tm’
nmap.cc:1257: error: invalid use of incomplete type ‘struct tm’
output.h:141: error: forward declaration of ‘struct tm’
nmap.cc:1415: error: ‘ctime’ was not declared in this scope
nmap.cc: In function ‘void getpts_aux(char*, int, u8*, int, int*, bool)’:
nmap.cc:2166: warning: deprecated conversion from string constant to ‘char*’
Comment 3 Natanael Copa 2008-03-18 08:56:39 UTC
Created attachment 146456 [details, diff]
nmap-4.53-uclibc++-output.cc.patch

This is needed for 4.50 and above.

from http://trac.nslu2-linux.org/optware/browser/trunk/sources/nmap
Comment 4 Natanael Copa 2008-03-18 08:57:13 UTC
Created attachment 146457 [details, diff]
nmap-4.53-uclibc++-ctime.patch

this too
Comment 5 Natanael Copa 2008-03-18 10:12:42 UTC
after the patches are applied I hit a bug in uclibc++

traceroute.cc: In member function `void Traceroute::outputTarget(Target*)':
/usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/../../../../i386-gentoo-linux-uclibc/include/associative_base:448: error: `void std::__base_associative<Key, ValueType, Compare, Allocator>::swap(std::__base_associative<Key, ValueType, Compare, Allocator>&) [with Key = u16, ValueType = std::pair<u16, TraceProbe*>, Compare = std::less<u16>, Allocator = std::allocator<TraceProbe*>]' is protected
traceroute.cc:995: error: within this context

this problem does not appear with uclibc++-0.2.1. Its a bug in uclibc++.
Comment 6 Natanael Copa 2008-03-18 12:10:32 UTC
To be able to compile with USE=lua an -lm link flag is needed as well.
Comment 7 Natanael Copa 2008-03-18 13:10:32 UTC
Created attachment 146479 [details, diff]
nmap-4.53-libm.patch

needed for USE=lua with uclibc/uclibc++
Comment 8 Natanael Copa 2008-03-18 13:40:36 UTC
Created attachment 146484 [details, diff]
nmap-4.53.ebuild.patch

for your convenience
Comment 9 Sergey Dryabzhinsky 2008-05-18 21:17:46 UTC
Created attachment 153619 [details, diff]
Adds libm checks for Linux system

Nmap needs more widly check for libm.

And it can build only with uclibc++-0.2.1
Comment 10 Natanael Copa 2008-07-28 07:38:49 UTC
latest stable net-analyzer/nmap-4.62 still dont compile
Comment 11 Natanael Copa 2008-07-28 07:56:11 UTC
seems like 4.62  works with the nmap-4.53-uclibc++-output.cc.patch alone.

--- /usr/portage/net-analyzer/nmap/nmap-4.62.ebuild	2008-07-05 19:41:31 +0000
+++ nmap-4.62.ebuild	2008-07-28 07:49:59 +0000
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nmap/nmap-4.62.ebuild,v 1.2 2008/07/05 19:08:21 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nmap/nmap-4.53.ebuild,v 1.9 2008/03/09 15:53:49 nixnut Exp $
 
 inherit eutils flag-o-matic
 
@@ -32,6 +32,12 @@
 	fi
 }
 
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+	epatch "${FILESDIR}/nmap-4.53-uclibc++-output.cc.patch"
+}
+
 src_compile() {
 	local myconf=""
 
Comment 12 Natanael Copa 2008-08-06 12:25:14 UTC
the nmap-4.53-uclibc++-output.cc.patch is still needed for nmap-4.68 to be able to compile with uclibc++.

--- /usr/portage/net-analyzer/nmap/nmap-4.68.ebuild	2008-08-04 20:08:17 +0000
+++ nmap-4.68.ebuild	2008-08-06 12:20:08 +0000
@@ -25,6 +25,7 @@
 src_unpack() {
 	unpack ${A}
 	cd "${S}"
+	epatch "${FILESDIR}/nmap-4.53-uclibc++-output.cc.patch"
 	epatch "${FILESDIR}/${P}-nolua.patch"
 	AT_NO_RECURSIVE=1 eautoreconf
 }
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2009-10-13 11:16:23 UTC
uclibc++ was removed from tree (see bug 276246).