In file included from /usr/include/bits/socket.h:8, from /usr/include/gentoo-multilib/amd64/sys/socket.h:35, from /usr/include/sys/socket.h:8, from conftest.c:40: /usr/include/gentoo-multilib/amd64/bits/socket.h:36: error: two or more data types in declaration specifiers The above error is from ./configure logs when trying to emerge netperf-2.4.0. Portage 2.0.54 (default-linux/amd64/2006.0, gcc-4.1.0, glibc-2.4-r0, 2.6.15-gentoo-r5 x86_64) ================================================================= System uname: 2.6.15-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Gentoo Base System version 1.6.14 dev-lang/python: 2.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -mtune=athlon64 -O2 -msse3 -m3dnow -pipe -fomit-frame-pointer -frename-registers -funit-at-a-time -fgcse-after-reload --param salias-max-implicit-fields=20 --param max-cse-path-length=40 --param max-delay-slot-insn-search=300 --param max-delay-slot-live-search=1000 --param max-pending-list-length=128 --param max-gcse-passes=4 --param max-gcse-memory=209715200 --param max-crossjump-edges=400 -fweb -fprefetch-loop-arrays" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -mtune=athlon64 -O2 -msse3 -m3dnow -pipe -fomit-frame-pointer -frename-registers -funit-at-a-time -fgcse-after-reload --param salias-max-implicit-fields=20 --param max-cse-path-length=40 --param max-delay-slot-insn-search=300 --param max-delay-slot-live-search=1000 --param max-pending-list-length=128 --param max-gcse-passes=4 --param max-gcse-memory=209715200 --param max-crossjump-edges=400 -fweb -fprefetch-loop-arrays -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://trumpetti.atm.tut.fi/gentoo/" LINGUAS="C en_US fi_FI" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="amd64 X a52 aac alsa async audiofile avi bash-completion berkdb bitmap-fonts bluetooth bonobo browserplugin bzip2 cairo cdda cddb cdr cli crypt ctype cups curl dba dbus doc dri dts dvd dvdr dvdread eds emboss encode ethereal evo exif expat fam fastbuild ffmpeg flac foomaticdb force-cgi-redirect freetype ftp gd gdbm gif glut gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal idn imagemagick imlib java jpeg jpeg2k junit lcms lzo lzw lzw-tiff mad matroska memlimit mjpeg mmap mng mozilla moznoirc moznomail mozsvg mp3 mpeg mplayer ncurses network nls nptl nptlonly ntfs nvidia ogg oggvorbis openal opengl pam pcre pdflib perl png posix ppds python quicktime readline real rtc sdl session shout simplexml soap sockets speex spell spl ssl stream subtitles svg tcpd theora threads tiff tokenizer truetype truetype-fonts type1-fonts udev unicode usb v4l2 vorbis xml xml2 xmms xpm xprint xrandr xsl xv xvid xvmc yv12 zeroconf zlib linguas_C linguas_en_US linguas_fi_FI userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
please drop the last 90% of flags from your CFLAGS, emerge -e world, and try again. http://gentoo-wiki.com/Safe_Cflags
Created attachment 82577 [details] failing configure of netperf Unfortunately the problem is not in the CFLAGS. After anlysing it further it seems that the configure script is to blame (or whatever was used to create it). The failure that aborts the configure is compiling the following code: #define socklen_t unsigned #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> int main() { struct sockaddr_in addr; return (sizeof(addr.sin_port) == sizeof(long)) ? 0 : 1; } If the socken_t define is removed the code compiles without error. Going backwards in the log it seems that the configure script misdetects the socklen_t type to unsigned, because it does not know about the declaration of getpeername in glibc headers. The configure tries the following variants: | int getpeername (int, struct sockaddr *, int *); | int getpeername (int, struct sockaddr *, size_t *); | int getpeername (int, void *, int *); | int getpeername (int, void *, size_t *); | int getpeername (int, void *, unsigned *); | int getpeername (int, void *, long *); | int getpeername (int, void *, unsigned long *); | int getpeername (int, void *, socklen_t *); Whereas the correct declaration in glibc 2.4 seems to be: int getpeername(int s, struct sockaddr *name, socklen_t *namelen);
Created attachment 82578 [details, diff] Patch to netperf aclocal.m4 Analysing further.... With the attached patch + running autoconf the configure will finish correctly: checking for socklen_t equivalent... socklen_t checking for in_port_t... yes ... Whereas when it failed it reported: checking for socklen_t equivalent... unsigned checking for in_port_t... no configure: error: Failed to get size of sin_port in struct sockaddr_in.
Fixed in cvs, thanks for testing and providing required patch