compare: http://bugs.gentoo.org/show_bug.cgi?id=16436 http://bugs.gentoo.org/show_bug.cgi?id=16472 http://bugs.gentoo.org/show_bug.cgi?id=16402 gcc -march=athlon-tbird -O2 -pipe -fomit-frame-pointer -I../include -c ../sys/unix/unixres.c ../sys/unix/unixres.c: In function `real_getresuid': ../sys/unix/unixres.c:35: `RTLD_NEXT' undeclared (first use in this function) ../sys/unix/unixres.c:35: (Each undeclared identifier is reported only once ../sys/unix/unixres.c:35: for each function it appears in.) ../sys/unix/unixres.c: In function `real_getresgid': ../sys/unix/unixres.c:47: `RTLD_NEXT' undeclared (first use in this function) make: *** [unixres.o] Error 1 Portage 2.0.47-r8 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r3) ================================================================= System uname: 2.4.20 i686 AMD Athlon(tm) Processor GENTOO_MIRRORS="ftp://ftp.sunet.se/pub/Linux/distributions/gentoo/ http://gentoo.oregonstate.edu/" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/mnt/build/distfiles" PKGDIR="/mnt/build/packages" PORTAGE_TMPDIR="/mnt/build" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 apm avi encode libg++ libwww mikmod mpeg ncurses nls pdflib qtmt quicktime spell xml2 zlib gdbm berkdb slang readline aalib svga tcltk java guile X sdl gpm tcpd pam perl python esd imlib gtk motif mozilla gphoto2 ldap cdr crypt alsa oggvorbis -arts -qt -kde -cups gnome gpg gpgme bonobo oss ssl xmms 3dnow mmx -sse -tetex -doc opengl tiff png jpeg smooth truetype gif ggi -gtk2 samba xv gtkhtml" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O2 -pipe" CXXFLAGS="-march=athlon-tbird -O2 -pipe" ACCEPT_KEYWORDS="x86 ~x86" MAKEOPTS="-j3" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache"
Just a note on this, I am also getting this error. I found in the /usr/include/dlfcn.h __USE_GNU must be defined (line 29) to define RTLD_NEXT. For kicks when it was compiling I threw a #define __USE_GNU into the sys/unix/unixrexs.c file while it was compiling and it made it much further than that... Below is where the build falls over after I've added the #define __USE_GNU. I'm not too sure if this might be a side effect of my previous fiddling, but hey, thought I'd add this to the bug report someone else has here incase it helps. gcc -O3 -march=athlon-xp -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fomit-frame-pointer -I../include -c -o version.o version.c Loading ... tile.o(.data+0x0): multiple definition of `glyph2tile' tile.o(.data+0x0): first defined here tile.o(.data+0x2ba0): multiple definition of `std_tiles0' tile.o(.data+0x2ba0): first defined here tile.o(.text+0x0): In function `substitute_tiles': : multiple definition of `substitute_tiles' tile.o(.text+0x0): first defined here tile.o(.data+0x2bb8): multiple definition of `total_tiles_used' tile.o(.data+0x2bb8): first defined here collect2: ld returned 1 exit status make: *** [Sysunix] Error 1 !!! ERROR: app-games/nethack-3.4.1 failed. !!! Function src_compile, Line 144, Exitcode 2 !!! (no error message)
Created attachment 9021 [details, diff] nethack-3.4.1-gnome.patch This patch fixes the various errors about RTLD_NEXT being undefined. It turns out that the developers check for Linux too late in the include process, and it ends up screwing them over.
Created attachment 9022 [details, diff] nethack-3.4.1.ebuild.diff This is a diff against the nethack-3.4.1.ebuild file. It adds a line to incorporate the prior gnome patch, and it modifies the sed expression to remove the extra tile.o link.
*** Bug 16964 has been marked as a duplicate of this bug. ***
*** Bug 20215 has been marked as a duplicate of this bug. ***
ok, i added your patches, greatly appreciated :) http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-x86/app-games/nethack/nethack-3.4.1.ebuild.diff?r1=1.4&r2=1.5 http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-x86/app-games/nethack/files/3.4.1-GNOME-RTLD_NEXT.patch?rev=1.1&content-type=text/vnd.viewcvs-markup
*** Bug 23366 has been marked as a duplicate of this bug. ***