Opened 19 years ago

Closed 19 years ago

Last modified 8 years ago

#3010 closed defect (fixed)

BUG: Nethack fails to compile on Tiger

Reported by: bahamat@… Owned by: kvv@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port:

Description

Output follows:

$ port install nethack ---> Fetching nethack ---> Verifying checksum(s) for nethack ---> Extracting nethack ---> Applying patches to nethack ---> Configuring nethack ---> Building nethack with target all Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_games_nethack/ work/nethack-3.4.1" && make all" returned error 2 Command output: cc -O -I../include -c -o trap.o trap.c cc -O -I../include -c -o u_init.o u_init.c cc -O -I../include -c -o uhitm.o uhitm.c cc -O -I../include -c -o vault.o vault.c ./makedefs -z cc -O -I../include -c -o vision.o vision.c cc -O -I../include -c -o vis_tab.o vis_tab.c cc -O -I../include -c -o weapon.o weapon.c cc -O -I../include -c -o were.o were.c cc -O -I../include -c -o wield.o wield.c cc -O -I../include -c -o windows.o windows.c cc -O -I../include -c -o wizard.o wizard.c cc -O -I../include -c -o worm.o worm.c cc -O -I../include -c -o worn.o worn.c cc -O -I../include -c -o write.o write.c cc -O -I../include -c -o zap.o zap.c zap.c: In function 'poly_obj': zap.c:1280: warning: the address of 'is_rottable', will always evaluate as 'true' cc -O -I../include -c ../sys/share/ioctl.c cc -O -I../include -c ../sys/unix/unixmain.c cc -O -I../include -c ../sys/share/unixtty.c cc -O -I../include -c ../sys/unix/unixunix.c cc -O -I../include -c ../sys/unix/unixres.c cc -O -I../include -c ../win/tty/getline.c cc -O -I../include -c ../win/tty/termcap.c ../win/tty/termcap.c:839: error: conflicting types for 'tparm' ../win/tty/termcap.c:839: note: a parameter list with an ellipsis can't match an empty parameter name list declaration /usr/include/curses.h:710: error: previous declaration of 'tparm' was here make[1]: * [termcap.o] Error 1 make: * [nethack] Error 2

Change History (6)

comment:1 Changed 19 years ago by mww@…

Owner: changed from darwinports-bugs@… to kevin@…
Summary: Nethack fails to compile on TigerBUG: Nethack fails to compile on Tiger

comment:2 Changed 19 years ago by eichin@…

I'm not sure NCURSES_EXPORT is the right thing to conditionalize it on, I've only tested it on tiger (but it might make a fair replacement for the original ifdef-linux, one would have to look at the history of tparm in ncurses to really decide.) Note that this only makes it build, which is what this bug is about; it looks like the packaging itself is stil botched wrt. HACKDIR being left pointed back at the build-root, but that's for another bug report...

cvs server: Diffing .
Index: Portfile
===================================================================
RCS file: /Volumes/src/cvs/od/proj/darwinports/dports/games/nethack/Portfile,v
retrieving revision 1.20
diff -u -r1.20 Portfile
--- Portfile	27 Apr 2004 18:35:58 -0000	1.20
+++ Portfile	11 Jun 2005 19:44:33 -0000
@@ -12,7 +12,7 @@
 distname	${portname}-341
 extract.suffix	.tgz
 checksums	md5 aefcbeb20210b2d64511c84bd03c3e4e
-patchfiles	patch-Makefile.top patch-Makefile.src
+patchfiles	patch-Makefile.top patch-Makefile.src patch-win-tty-termcap.c
 worksrcdir	${portname}-${portversion}
 destroot.target	manpages install
 destroot.args    PREFIX=${destroot}${prefix} MANDIR=${destroot}${prefix}/share/man/man6
cvs server: Diffing files

$ diff -wurp -N /dev/null files/patch-win-tty-termcap.c 
--- /dev/null	2005-06-11 15:44:13.000000000 -0400
+++ files/patch-win-tty-termcap.c	2005-06-11 15:42:30.000000000 -0400
@@ -0,0 +1,12 @@
+--- win/tty/termcap.c~	2003-02-23 09:43:46.000000000 -0500
++++ win/tty/termcap.c	2005-06-11 15:41:03.000000000 -0400
+@@ -836,7 +836,9 @@ cl_eos()			/* free after Robert Viduya *
+ #include <curses.h>
+ 
+ #ifndef LINUX
++#ifndef NCURSES_EXPORT
+ extern char *tparm();
++#endif /* NCURSES_EXPORT probably means a modern enough ncurses to have a tparm decl */
+ #endif
+ 
+ #  ifdef COLOR_BLACK	/* trust include file */
Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 19 years ago by bahamat@…

Do these patches work? If so, how do I apply them? When will they be merged in?

comment:4 Changed 19 years ago by sigint@…

(In reply to comment #2)

Do these patches work? If so, how do I apply them? When will they be merged in?

I patched it by hand -- :S -- and it compiled and installed fine. I had to do some other manual hacking to get it working, which I just reported as Bug #4136.

The manual fix was to edit /opt/local/var/db/dports/build/file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_games_nethack/work/nethack-3.4.1/win/tty/termcap.c, and change the line:

 extern char *tparm();

At about line 836 to instead read:

#ifndef NCURSES_EXPORT
 extern char *tparm();
#endif

HTH,
-s

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 19 years ago by yeled@…

Status: newassigned

This was fixed today by Toby.

Can you please verify that it works for you now?

comment:6 Changed 19 years ago by toby@…

Resolution: fixed
Status: assignedclosed

closing

Note: See TracTickets for help on using tickets.