net-analyzer/nethogs-0.6.0 don't compile Reproducible: Always Steps to Reproduce: 1.emerge -v net-analyzer/nethogs Always reproducible Actual Results: methrilla ~ # emerge -v net-analyzer/nethogs These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] net-analyzer/nethogs-0.6.0 0 kB Total: 1 package (1 new), Size of downloads: 0 kB >>> Verifying ebuild Manifests... >>> Emerging (1 of 1) net-analyzer/nethogs-0.6.0 to / * nethogs-0.6.0.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * checking nethogs-0.6.0.tar.gz ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking nethogs-0.6.0.tar.gz to /var/tmp/portage/net-analyzer/nethogs-0.6.0/work * Applying nethogs-0.6.0-gcc34.diff ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/net-analyzer/nethogs-0.6.0/work/nethogs ... i686-pc-linux-gnu-g++ -march=athlon-xp -O3 -pipe -c structs.cpp i686-pc-linux-gnu-g++ -march=athlon-xp -O3 -pipe -c packet.cpp i686-pc-linux-gnu-g++ -march=athlon-xp -O3 -pipe -c connection.cpp i686-pc-linux-gnu-g++ -march=athlon-xp -O3 -pipe -c process.cpp i686-pc-linux-gnu-g++ -march=athlon-xp -O3 -pipe -c refresh.cpp i686-pc-linux-gnu-gcc -march=athlon-xp -O3 -pipe -c decpcap.c decpcap.c: In function ‘dp_pcap_callback’: decpcap.c:191: attention : incompatible implicit declaration of built-in function ‘memcpy’ i686-pc-linux-gnu-g++ -march=athlon-xp -O3 -pipe -c cui.cpp -DVERSION=\"0\" -DSUBVERSION=\"6\" -DMINORVERSION=\"0\" In file included from process.cpp:16: inodeproc.cpp: In function ‘void extract_type_1_socket_inode(const char*, long int*)’: inodeproc.cpp:106: erreur: ‘INT_MAX’ was not declared in this scope inodeproc.cpp: In function ‘void extract_type_2_socket_inode(const char*, long int*)’: inodeproc.cpp:122: erreur: ‘INT_MAX’ was not declared in this scope inodeproc.cpp: In function ‘void prg_cache_load()’: inodeproc.cpp:130: erreur: ‘LINE_MAX’ was not declared in this scope inodeproc.cpp:151: erreur: ‘line’ was not declared in this scope process.cpp: At global scope: process.cpp:29: attention : deprecated conversion from string constant to ‘char*’ process.cpp:29: attention : deprecated conversion from string constant to ‘char*’ make: *** [process.o] Erreur 1 make: *** Attente des tâches non terminées.... cui.cpp: In function ‘void do_refresh()’: cui.cpp:246: erreur: ‘qsort’ was not declared in this scope make: *** [cui.o] Erreur 1 * * ERROR: net-analyzer/nethogs-0.6.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2061: Called die * The specific snippet of code: * emake || die "emake failed" * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/net-analyzer/nethogs-0.6.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/nethogs-0.6.0/temp/environment'. * * Messages for package net-analyzer/nethogs-0.6.0: * * ERROR: net-analyzer/nethogs-0.6.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2061: Called die * The specific snippet of code: * emake || die "emake failed" * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/net-analyzer/nethogs-0.6.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/nethogs-0.6.0/temp/environment'. * I'm in ~x86 so I use gcc-4.3.1, maybe that's the problem methrilla ~ # emerge --info Portage 2.2_rc1 (default-linux/x86/2007.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.24-gentoo-r8-gov i686) ================================================================= System uname: Linux-2.6.24-gentoo-r8-gov-i686-AMD_Athlon-tm-_XP_2400+-with-glibc2.0 Timestamp of tree: Thu, 17 Jul 2008 15:33:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6-r1 dev-lang/python: 2.4.4-r13, 2.5.2-r5 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.13, 2.62-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.24 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://ftp.club-internet.fr/pub/mirrors/gentoo ftp://gentoo.imj.fr/pub/gentoo/ " LC_ALL="fr_FR.UTF-8" LDFLAGS="" LINGUAS="fr" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/gentoo-china" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac aalib acl alsa amd apache2 automount bash-completion beagle berkdb bootsplash buttons bzip2 cdda cddb cdr cdrom chm chroot cli colordiff cracklib crypt cups dri dts dv dvd dvdr dvdread encode exif fastcgi fbcon ffmpeg firefox fortran ftp fuse gcj gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtkspell hddtemp iconv ieee1394 imap ipv6 isdnlog jabber java javascript jpeg lm_sensors mad matroska midi mikmod mime mjpeg mmx mono mp3 mpeg msn mudflap ncurses nls nptl nptlonly nvidia ogg opengl openmp openssh opensslcrypt optimisememory pam pcre pdf perl php png pppd python readline reflection reiser4 reiserfs rtsp samba session sftplogging sockets sound spamassassin spl sse ssl startup-notification stream svg svga swat sybase tcpd theora thunderbird tiff truetype unicode usb v4l v4l2 videos vorbis win32codecs wxwindows x264 x86 xml xml2 xorg xosd xpm xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse kbd" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Looks like a glibc 2.8 issue. One of the easier to solve too, IIRC it just needs the correct #include.
Sorry, should be more awake while posting to bugzilla, it's a gcc 4.3.1 issue, but the other part is correct: #include <limits> is needed (#include <cstring> would be probably useful too).
(In reply to comment #2) > Sorry, should be more awake while posting to bugzilla, > it's a gcc 4.3.1 issue, > but the other part is correct: > #include <limits> is needed (#include <cstring> would be probably useful too). > Okay, thanks. I added #include <limits.h> to inodeproc.cpp and I haven't any more problems with inodeproc.cpp. I add #include <cstring.h> to cui.cpp but I still have a problem with qsort. So I look for qsort and I finally add cstdlib to cui.cpp and that's work. So : add #include <limits.h> to inodeproc.cpp add #include <cstdlib> to cui.cpp and it's good. I'll make the patch.
(In reply to comment #3) > (In reply to comment #2) > > Sorry, should be more awake while posting to bugzilla, > > it's a gcc 4.3.1 issue, > > but the other part is correct: > > #include <limits> is needed (#include <cstring> would be probably useful too). > > > > Okay, thanks. > > I added #include <limits.h> to inodeproc.cpp and I haven't any more problems > with inodeproc.cpp. > > I add #include <cstring.h> to cui.cpp but I still have a problem with qsort. Sorry, I tested with <cstring> and <string.h> and not <cstring.h> of course !
Created attachment 160998 [details, diff] patch for gcc-4.3.1
(In reply to comment #5) > Created an attachment (id=160998) [edit] > patch for gcc-4.3.1 > Get the patch nethogs-0.6.0-gcc43.diff Put it in /usr/portage/net-analyzer/nethogs/files Edit the ebuild and add epatch "${FILESDIR}"/${P}-gcc43.diff in src_unpack() fonction Then : ebuild /usr/portage/net-analyzer/nethogs/nethogs-0.6.0.ebuild digest And that's good.
(In reply to comment #6) Hi. I am getting essentially the same error. The fix mentioned in comment #6 works. I have recently synced, yet I fail to find the patch in portage. Thanks, Henry PS: Here is the ouput I get (running ~x86): bardot nethogs # emerge -v nethogs These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] net-analyzer/nethogs-0.6.0 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB >>> Verifying ebuild manifests >>> Emerging (1 of 1) net-analyzer/nethogs-0.6.0 * nethogs-0.6.0.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking nethogs-0.6.0.tar.gz to /var/tmp/portage/net-analyzer/nethogs-0.6.0/work * Applying nethogs-0.6.0-gcc34.diff ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/net-analyzer/nethogs-0.6.0/work/nethogs ... i686-pc-linux-gnu-g++ -O2 -march=pentium-m -pipe -c structs.cpp i686-pc-linux-gnu-g++ -O2 -march=pentium-m -pipe -c packet.cpp i686-pc-linux-gnu-g++ -O2 -march=pentium-m -pipe -c connection.cpp i686-pc-linux-gnu-g++ -O2 -march=pentium-m -pipe -c process.cpp In file included from process.cpp:15: inodeproc.cpp: In function ‘void extract_type_1_socket_inode(const char*, long int*)’: inodeproc.cpp:106: error: ‘INT_MAX’ was not declared in this scope inodeproc.cpp: In function ‘void extract_type_2_socket_inode(const char*, long int*)’: inodeproc.cpp:122: error: ‘INT_MAX’ was not declared in this scope inodeproc.cpp: In function ‘void prg_cache_load()’: inodeproc.cpp:130: error: ‘LINE_MAX’ was not declared in this scope inodeproc.cpp:151: error: ‘line’ was not declared in this scope process.cpp: At global scope: process.cpp:29: warning: deprecated conversion from string constant to ‘char*’ process.cpp:29: warning: deprecated conversion from string constant to ‘char*’ distcc[24777] ERROR: compile process.cpp on localhost failed make: *** [process.o] Error 1 make: *** Waiting for unfinished jobs.... * * ERROR: net-analyzer/nethogs-0.6.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2037: Called die * The specific snippet of code: * emake || die "emake failed" * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/net-analyzer/nethogs-0.6.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/nethogs-0.6.0/temp/environment'. * >>> Failed to emerge net-analyzer/nethogs-0.6.0, Log file: >>> '/var/tmp/portage/net-analyzer/nethogs-0.6.0/temp/build.log'
Created attachment 171382 [details] New ebuild containing patch ebuild with patch
For a proper patch, get files. Create the folder /usr/local/portage/net-analyser/nethogs and copy the ebuild into it. copy the folder /usr/portage/net-analyser/nethogs/files in /usr/local/portage/net-analyser/nethogs/ and copy the patch into it launch $ ebuild nethogs-0.6.0-r1.ebuild digest $ update-eix and that's it ! Don't forget to read : http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1
Why is this bug marked as resolved fixed, when the solution is not commited? I think the bug should be reopened!
pls, commit the patch
This bug is *NOT* resolved in the portage tree. Franck's patch works well for me.