Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #14876 (closed defect: fixed)

Opened 8 months ago

Last modified 2 weeks ago

nethack build failure

Reported by: tietze@… Owned by: macports-tickets@…
Priority: Normal Milestone: Port Bugs
Component: ports Version: 1.6.0
Keywords: nethack build error Cc: yeled@…, blb@…, ryandesign@…, 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

Changed 8 months ago by jmr@…

  • cc yeled@… added
  • milestone set to Port Bugs

Cc maintainer.

Changed 8 months ago by yeled@…

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

Changed 4 months ago by eridius@…

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:~> 

Changed 4 months 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 {

Changed 4 months 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!

Changed 2 months ago by ryandesign@…

  • cc ryandesign@… added
  • status changed from new to closed
  • resolution set to worksforme
  • port set to nethack

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.

Changed 2 months ago by blb@…

  • status changed from closed to reopened
  • resolution worksforme deleted

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

Changed 2 weeks ago by dhelder@…

  • cc dhelder@… added

Cc Me!

Changed 2 weeks ago by blb@…

  • status changed from reopened to closed
  • resolution set to fixed

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).

Note: See TracTickets for help on using tickets.