While trying to emerge nagios-core 1.1 on a server with multi-threaded Perl, nptl libc and 2.6.5-r1 kernel, the final link stage fails. This appears to be a Perl issue - if I put -perl in my USE flags the linking works just fine. Reproducible: Always Steps to Reproduce: 1. emerge -av nagios Actual Results: gcc -march=pentium3 -O3 -pipe -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl5/5.8.2/i686-linux-thread-multi/CORE -DHAVE_CONFIG_H -DNSCORE -lmysqlclient nagios.c checks.o config.o commands.o flapping.o logging.o notifications.o sehandlers.o utils.o sretention.o ../xdata/xrddb.c ../common/comments.c ../xdata/xcddb.c ../common/objects.c ../xdata/xodtemplate.c ../common/statusdata.c ../xdata/xsddb.c perfdata.o ../xdata/xpddefault.c ../common/downtime.c ../xdata/xdddb.c -rdynamic -L/usr/local/lib /usr/lib/perl5/5.8.2/i686-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.8.2/i686-linux-thread-multi/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc -lm -o nagios nagios.c: In function `xs_init': nagios.c:103: warning: passing arg 3 of `Perl_newXS' from incompatible pointer type nagios.c: In function `main': nagios.c:634: warning: passing arg 2 of `perl_parse' from incompatible pointer type /var/tmp/portage/nagios-core-1.1-r4/temp/ccozyHEl.o(.text+0x1dd8): In function `xs_init': : undefined reference to `PL_thr_key' checks.o(.text+0x35): In function `run_service_check': : undefined reference to `PL_thr_key' utils.o(.text+0x172d): In function `my_system': : undefined reference to `PL_thr_key' collect2: ld returned 1 exit status make[1]: *** [nagios] Error 1 make[1]: Leaving directory `/var/tmp/portage/nagios-core-1.1-r4/work/nagios-1.1/base' make: *** [all] Error 2 !!! ERROR: net-analyzer/nagios-core-1.1-r4 failed. !!! Function src_compile, Line 73, Exitcode 2 !!! make failed Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 Pentium III (Katmai) Gentoo Base System version 1.4.10 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium3 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://212.219.247.11/sites/www.ibiblio.org/gentoo/ ftp://mirrors.tds.net/gentoo http://212.219.247.10/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gtk2 imlib jpeg libg++ libwww mad mikmod motif mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl slang spell ssl svga tcpd threads truetype x86 xml2 xmms xv zlib"
Have you tried nagios-1.2? Does it work? I didn't have a problem at all with perl and ntpl in USE on both x86 and amd64 when merging 1.2
Please reopen the bug after trying 1.2 (and having the same issue)