Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#14876 closed defect (fixed)

nethack build failure

Reported by: tietze@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: nethack build error Cc: yeled@…, blb@…, ryandesign (Ryan Carsten Schmidt), dhelder@…
Port: nethack

Description

I tried to do a port install nethack and it came up with the below errors. It works nicely in the shell when trying the variant +x11 (port install nethack +x11).

Regards, Jørgen.

sudo 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 org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_games_nethack/work/nethack-3.4.3" && make all " returned error 2
Command output: make[1]: [objects.o] Error 127 (ignored)
O -I../include   -c -o makedefs.o makedefs.c
make[2]: O: Command not found
make[2]: [makedefs.o] Error 127 (ignored)
O -I../include -c ../src/monst.c -o ../src/monst.o
make[2]: O: Command not found
make[2]: [../src/monst.o] Error 127 (ignored)
O -I../include -c ../src/objects.c -o ../src/objects.o
make[2]: O: Command not found
make[2]: [../src/objects.o] Error 127 (ignored)
o makedefs makedefs.o ../src/monst.o ../src/objects.o
make[2]: o: Command not found
make[2]: [makedefs] Error 127 (ignored)
O -I../include   -c -o makedefs.o makedefs.c
make[2]: O: Command not found
make[2]: [makedefs.o] Error 127 (ignored)
O -I../include -c ../src/monst.c -o ../src/monst.o
make[2]: O: Command not found
make[2]: [../src/monst.o] Error 127 (ignored)
O -I../include -c ../src/objects.c -o ../src/objects.o
make[2]: O: Command not found
make[2]: [../src/objects.o] Error 127 (ignored)
o makedefs makedefs.o ../src/monst.o ../src/objects.o
make[2]: o: Command not found
make[2]: [makedefs] Error 127 (ignored)
./makedefs -p
make[2]: ./makedefs: Command not found
make[2]: *** [../include/pm.h] Error 127
make[1]: *** [../include/pm.h] Error 2
make: *** [nethack] Error 2

Error: Status 1 encountered during processing.

Change History (10)

comment:1 Changed 17 years ago by jmroot (Joshua Root)

Cc: yeled@… added
Milestone: Port Bugs

Cc maintainer.

comment:2 Changed 17 years ago by yeled@…

well fuck me. when i am not so sick ill have a look at it.

comment:3 Changed 16 years ago by kballard (Lily Ballard)

When I try and build it today, I get the following rather confusing error:

kevin@Erebor:~> sudo port install nethack
Password:
--->  Fetching nethack
--->  Attempting to fetch nethack-343-src.tgz from http://distfiles.macports.org/nethack
--->  Verifying checksum(s) for nethack
--->  Extracting nethack
--->  Applying patches to nethack
--->  Configuring nethack
--->  Building nethack with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_kevin_Dev_macports_dports_games_nethack/work/nethack-3.4.3" && make all " returned error 2
Command output: cc -O -I../include   -c -o engrave.o engrave.c
cc -O -I../include   -c -o exper.o exper.c
cc -O -I../include   -c -o explode.o explode.c
cc -O -I../include   -c -o extralev.o extralev.c
cc -O -I../include   -c -o files.o files.c
cc -O -I../include   -c -o fountain.o fountain.c
cc -O -I../include   -c -o hack.o hack.c
cc -O -I../include   -c -o hacklib.o hacklib.c
cc -O -I../include   -c -o invent.o invent.c
cc -O -I../include   -c -o light.o light.c
cc -O -I../include   -c -o lock.o lock.c
cc -O -I../include   -c -o mail.o mail.c
cc -O -I../include   -c -o makemon.o makemon.c
cc -O -I../include   -c -o mapglyph.o mapglyph.c
cc -O -I../include   -c -o mcastu.o mcastu.c
cc -O -I../include   -c -o mhitm.o mhitm.c
cc -O -I../include   -c -o mhitu.o mhitu.c
cc -O -I../include   -c -o minion.o minion.c
cc -O -I../include   -c -o mklev.o mklev.c
cc -O -I../include   -c -o mkmap.o mkmap.c
cc -O -I../include   -c -o mkmaze.o mkmaze.c
mkmaze.c: In function 'place_lregion':
mkmaze.c:281: error: unable to find a register to spill in class 'Q_REGS'
mkmaze.c:281: error: this is the insn:
(insn 147 146 148 11 (set (reg:SI 0 ax [ x ])
        (sign_extend:SI (reg/v:QI 5 di [orig:65 x ] [65]))) 122 {extendqisi2} (nil)
    (nil))
mkmaze.c:281: confused by earlier errors, bailing out
make[1]: *** [mkmaze.o] Error 1
make: *** [nethack] Error 2

Error: Status 1 encountered during processing.
kevin@Erebor:~> 

comment:4 Changed 16 years ago by blb@…

Cc: blb@… added

The original report appears to be some variant on the Tcl env bug (#13930); if you cd into work/nethack-3.4.3 and run env CC= make all you should see the same errors. Also, if you simply try running port again, it seems to build fine.

The second issue reported by Eridius can be fixed by using -O2 instead of -O, the following Portfile diff does this:

Index: Portfile
===================================================================
--- Portfile	(revision 38611)
+++ Portfile	(working copy)
@@ -41,6 +41,10 @@
 configure.cmd	/bin/sh
 configure.pre_args	setup.sh
 
+## build ##
+
+build.args-append	CFLAGS="-O2 -I../include"
+
 ## destroot ##
 
 pre-destroot {

comment:5 Changed 16 years ago by tietze@…

Very cool after editing the Portfile the directory reported by "port dir nethack" and installing two times it build without problems :-) Great!

comment:6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Port: nethack added
Resolution: worksforme
Status: newclosed

I am unable to reproduce the issue with nethack 3.4.3_2 as it exists in the repository today, with Mac OS X 10.4.11 and Xcode 2.5 on Intel. If you still experience the problem, please provide more details about your setup.

comment:7 Changed 16 years ago by blb@…

Resolution: worksforme
Status: closedreopened

The issue Eridius reported still exists on 10.5.4/Xcode 3.1/Intel:

cc -O -I../include   -c -o mkmaze.o mkmaze.c
mkmaze.c: In function 'place_lregion':
mkmaze.c:281: error: unable to find a register to spill in class 'Q_REGS'
mkmaze.c:281: error: this is the insn:
(insn 147 146 148 11 (set (reg:SI 0 ax [ x ])
        (sign_extend:SI (reg/v:QI 5 di [orig:65 x ] [65]))) 122 {extendqisi2} (nil)
    (nil))
mkmaze.c:281: confused by earlier errors, bailing out
make[1]: *** [mkmaze.o] Error 1
make: *** [nethack] Error 2

comment:8 Changed 16 years ago by dhelder@…

Cc: dhelder@… added

Cc Me!

comment:9 Changed 16 years ago by blb@…

Resolution: fixed
Status: reopenedclosed

The initial issue (make[2]: O: Command not found) is the Tcl env bug, tracked in #13930. The fix to the "unable to find a register" issue was committed in r41601 (maintainer timeout).

comment:10 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.