On Wed, Mar 05, 2003 at 09:46:06PM +0000, MIKE MacMartin wrote: > I've attempted multiple times to get nethack-3.4.1 to build - it always fails. > According to emerge -vp nethack, the only USE flags it uses are +X +qt +gtk. > > Anyone have a fix?
Well, there are some problems, which I managed to fix, but it required some fiddling with the source code, and manually stepping through the ebuild stages. I'll mention what I did, and leave it to someone more knowledgeable about ebuilds to fix this. The first error is a compile error in ../sys/unix/unixres.c, where it can't find RTLD_NEXT. The problem is an incorrect #define before #including <dlfcn.h>. The context diff to patch this is: *** /var/tmp/portage/nethack-3.4.1/work/nethack-3.4.1/sys/unix/unixres.c.dist Sun Feb 23 09:43:39 2003 --- /var/tmp/portage/nethack-3.4.1/work/nethack-3.4.1/sys/unix/unixres.c Wed Mar 5 22:52:47 2003 *************** *** 20,25 **** --- 20,26 ---- # if defined(LINUX) #ifdef __GNUC__ + #define __USE_GNU #define _GNU_SOURCE #endif Actually, deleting the _GNU_SOURCE line will probably not affect things either; the problem is that the RTLD_* defines aren't done unless __USE_GNU is defined. I guess this is a glibc version-dependant problem. The second error is an error on linking, if you have Gnome enabled. The problem here is that the file tile.o is included for both the X11 port and the Gnome port of nethack; including a file twice confuses the linker. So, just remove the second copy of tile.o. (Removing the Gnome copy means that it will work for both with and without Gnome being enabled, unless you can find a reasonable setup with Gnome enabled but _not_ X.) *** /var/tmp/portage/nethack-3.4.1/work/nethack-3.4.1/src/Makefile.dist Wed Mar 5 22:50:04 2003 --- /var/tmp/portage/nethack-3.4.1/work/nethack-3.4.1/src/Makefile Wed Mar 5 22:56:46 2003 *************** *** 188,194 **** ../win/gnome/gnworn.c WINGNOMEOBJ = gnaskstr.o gnbind.o gnglyph.o gnmain.o gnmap.o gnmenu.o \ gnmesg.o gnopts.o gnplayer.o gnsignal.o gnstatus.o gntext.o \ ! gnyesno.o gnworn.o tile.o # # Files for a Gem port WINGEMSRC = ../win/gem/wingem.c ../win/gem/wingem1.c ../win/gem/load_img.c \ --- 188,194 ---- ../win/gnome/gnworn.c WINGNOMEOBJ = gnaskstr.o gnbind.o gnglyph.o gnmain.o gnmap.o gnmenu.o \ gnmesg.o gnopts.o gnplayer.o gnsignal.o gnstatus.o gntext.o \ ! gnyesno.o gnworn.o # # Files for a Gem port WINGEMSRC = ../win/gem/wingem.c ../win/gem/wingem1.c ../win/gem/load_img.c \ With both of those patches done, I managed to compile nethack with all the different ports enabled. ---------------------------+--------------------------------------------------- Bryan Feir VA3GBF|"The professor holds the keys to the gates of Home:[EMAIL PROTECTED] | knowledge; not to let the student in, but to let | him get out and on to better things." -- Leacock ---------------------------+--------------------------------------------------- -- [EMAIL PROTECTED] mailing list