compilation failed when emerge iperf. Reproducible: Always Steps to Reproduce: 1. with gcc-3.2.3-r2 2. emerge iperf (stable x86 versin, 1.6.3, but 1.7.0 also) Actual Results: g++ -I../lib -I../cfg -mcpu=i586 -O3 -pipe -Wall -O2 -pthread -DHAVE_CONFIG_H -c Settings.cpp Settings.cpp: In method `void Settings::ParseCommandLine(int, char **)': Settings.cpp:238: implicit declaration of function `int gnu_getopt_long(...)' Settings.cpp:239: `gnu_optarg' undeclared (first use this function) Settings.cpp:239: (Each undeclared identifier is reported only once Settings.cpp:239: for each function it appears in.) Settings.cpp:242: `gnu_optind' undeclared (first use this function) make: *** [Settings.o] Error 1 Portage 2.0.49-r15 (default-x86-1.4, gcc-2.95.3, glibc-2.3.2-r1, 2.4.22) ================================================================= System uname: 2.4.22 i686 Intel(R) Xeon(TM) CPU 2.40GHz Gentoo Base System version 1.4.3.10 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-mcpu=i586 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=i586 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://ftp.gentoo.or.kr " MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage" USE="x86 oss apm arts avi crypt cups encode foomaticdb gif imlib jpeg kde libg++ libwww mad mikmod mpeg ncurses nls oggvorbis pdflib png quicktime sdl spell svga truetype xml2 xmms xv zlib gdbm berkdb slang readline java tcpd pam ssl perl python qt opengl -X -gtk -gnome -alsa -gpm cscope -motif apache2"
however, in Settings.cpp . . #include "headers.h" #include "gnu_getopt.h" . . swapping these two including, like #include "gnu_getopt.h" #include "headers.h" , then compile ok. I dont know why this happen on gcc-3.2.3. however, it compiled on gcc-3.3.2
gcc-3.3.2 is stable now ... fixed becuase 3.2.3 is deprecated ;)