Build of nethack with musl toolchain

The build took 00h 01m 08s and was NOT successful.

The program in this build is written in the following languages, according to sloccount:

SLOCLanguage
233,396 ansic
7,250 cpp
2,846 yacc
1,161 perl
1,132 makefile
579 lex
210 sh
90 awk
11 sed
246,675 total

The process tree of the build process is here.

List of Errors

Log

To avoid scrolling, you may jump to the last line of the invocation of makepkg that was used to build this package.

Removed vanilla repositories from pacman.conf and added:
# [tuscan]
# Server = file:///var/cache/pacman/pkg/

CMD: pacman -Syy --noconfirm
# :: Synchronizing package databases...
# downloading tuscan.db...

There were existing files in /sysroot, using those
# /sysroot/lib
# /sysroot/share
# /sysroot/bin
# /sysroot/include
# /sysroot/libexec

CMD: sudo -u tuscan PATH=/sysroot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CC=clang CXX=clang++ red makepkg --noextract --syncdeps --skipinteg --skippgpcheck --skipchecksums --noconfirm --nocolor --log --noprogressbar --nocheck
# ==> Making package: nethack 3.6.0-1 (Wed Apr 5 00:28:34 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# ( cd src ; make )
# make[1]: Entering directory '/tmp/nethack/src/nethack-3.6.0/src'
# touch ../src/config.h-t
# clang -g -O -I../include -DNOTPARMDECL -DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" -DDLB -DSYSCF -DSYSCF_FILE=\"/home/tuscan/nh/install/games/lib/nethackdir/sysconf\" -DSECURE -DHACKDIR=\"/home/tuscan/nh/install/games/lib/nethackdir\" -c monst.c
# clang -g -O -I../include -DNOTPARMDECL -DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" -DDLB -DSYSCF -DSYSCF_FILE=\"/home/tuscan/nh/install/games/lib/nethackdir/sysconf\" -DSECURE -DHACKDIR=\"/home/tuscan/nh/install/games/lib/nethackdir\" -c objects.c
# clang -g -O -I../include -DNOTPARMDECL -DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" -DDLB -DSYSCF -DSYSCF_FILE=\"/home/tuscan/nh/install/games/lib/nethackdir/sysconf\" -DSECURE -DHACKDIR=\"/home/tuscan/nh/install/games/lib/nethackdir\" -c -o alloc.o alloc.c
# make[2]: Entering directory '/tmp/nethack/src/nethack-3.6.0/util'
# clang -g -O -I../include -DNOTPARMDECL -DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" -DDLB -DSYSCF -DSYSCF_FILE=\"/home/tuscan/nh/install/games/lib/dir/sysconf\" -DSECURE -DHACKDIR=\"/home/tuscan/nh/install/games/lib/dir\" -c -o makedefs.o makedefs.c
# clang -g -O -I../include -DNOTPARMDECL -DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" -DDLB -DSYSCF -DSYSCF_FILE=\"/home/tuscan/nh/install/games/lib/nethackdir/sysconf\" -DSECURE -DHACKDIR=\"/home/tuscan/nh/install/games/lib/nethackdir\" -c -o dlb.o dlb.c
# clang -g -O -I../include -DNOTPARMDECL -DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" -DDLB -DSYSCF -DSYSCF_FILE=\"/home/tuscan/nh/install/games/lib/dir/sysconf\" -DSECURE -DHACKDIR=\"/home/tuscan/nh/install/games/lib/dir\" -c ../src/monst.c -o ../src/monst.o
# clang -g -O -I../include -DNOTPARMDECL -DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" -DDLB -DSYSCF -DSYSCF_FILE=\"/home/tuscan/nh/install/games/lib/nethackdir/sysconf\" -DSECURE -DHACKDIR=\"/home/tuscan/nh/install/games/lib/nethackdir\" -c ../sys/unix/unixres.c
# clang -rdynamic -o makedefs makedefs.o ../src/monst.o ../src/objects.o
# make[2]: Leaving directory '/tmp/nethack/src/nethack-3.6.0/util'
# make[2]: Entering directory '/tmp/nethack/src/nethack-3.6.0/util'
# ./makedefs -z
# make[2]: Entering directory '/tmp/nethack/src/nethack-3.6.0/util'
# ./makedefs -p
# make[2]: Entering directory '/tmp/nethack/src/nethack-3.6.0/util'
# ./makedefs -o
# ./makedefs: error while loading shared libraries: /usr/lib/libc.so: invalid ELF header
# make[2]: *** [Makefile:252: ../include/vis_tab.h] Error 127
# make[2]: Leaving directory '/tmp/nethack/src/nethack-3.6.0/util'
# ./makedefs: error while loading shared libraries: /usr/lib/libc.so: invalid ELF header
# make[2]: *** [Makefile:248: ../include/pm.h] Error 127
# make[2]: Leaving directory '/tmp/nethack/src/nethack-3.6.0/util'
# ./makedefs: error while loading shared libraries: /usr/lib/libc.so: invalid ELF header
# make[2]: *** [Makefile:246: ../include/onames.h] Error 127
# make[2]: Leaving directory '/tmp/nethack/src/nethack-3.6.0/util'
# make[1]: *** [Makefile:559: ../include/vis_tab.h] Error 2
# make[1]: *** Waiting for unfinished jobs....
# make[1]: *** [Makefile:555: ../include/pm.h] Error 2
# make[1]: *** [Makefile:553: ../include/onames.h] Error 2
# make[2]: Entering directory '/tmp/nethack/src/nethack-3.6.0/util'
# ./makedefs -m
# ./makedefs: error while loading shared libraries: /usr/lib/libc.so: invalid ELF header
# make[2]: *** [Makefile:250: ../src/monstr.c] Error 127
# make[2]: Leaving directory '/tmp/nethack/src/nethack-3.6.0/util'
# make[1]: *** [Makefile:557: monstr.c] Error 2
# make[1]: Leaving directory '/tmp/nethack/src/nethack-3.6.0/src'
# make: *** [Makefile:145: nethack] Error 2
# ==> ERROR: A failure occurred in build().
# Aborting...