Build of perl-async-interrupt with musl toolchain

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

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

SLOCLanguage
1,896 ansic
710 makefile
103 perl
2,709 total

The process tree of the build process is here.

Several sub-process invocations were improper; see the process tree for details. Summary:

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: perl-async-interrupt 1.21-3 (Wed Apr 5 01:42:59 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Installing missing dependencies...
# resolving dependencies...
# looking for conflicting packages...
#
# Packages (1) perl-common-sense-3.74-1
#
# Total Installed Size: 0.00 MiB
#
# :: Proceed with installation? [Y/n]
# checking keyring...
# checking package integrity...
# loading package files...
# checking for file conflicts...
# checking available disk space...
# :: Processing package changes...
# installing perl-common-sense...
# :: Running post-transaction hooks...
# (1/1) Updating manpage index...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# Checking if your kit is complete...
# Looks good
# Generating a Unix-style Makefile
# Writing Makefile for Async::Interrupt
# Writing MYMETA.yml and MYMETA.json
# Running Mkbootstrap for Async::Interrupt ()
# "/usr/bin/perl" "/usr/share/perl5/core_perl/ExtUtils/xsubpp" -typemap "/usr/share/perl5/core_perl/ExtUtils/typemap" -typemap "typemap" Interrupt.xs > Interrupt.xsc && mv Interrupt.xsc Interrupt.c
# chmod 644 "Interrupt.bs"
# cp Interrupt.pm blib/lib/Async/Interrupt.pm
# Warning: Aliases 'fileno_r' and 'fileno' have identical values in Interrupt.xs, line 515
# cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -DVERSION=\"1.21\" -DXS_VERSION=\"1.21\" -fPIC "-I/usr/lib/perl5/core_perl/CORE" Interrupt.c
# In file included from Interrupt.xs:8:
# ./schmorp.h:350:10: warning: implicit declaration of function 'fcntl' is invalid in C99 [-Wimplicit-function-declaration]
# return fcntl (fd, F_SETFL, blocking ? 0 : O_NONBLOCK);
# ^
# ./schmorp.h:350:45: error: use of undeclared identifier 'O_NONBLOCK'
# return fcntl (fd, F_SETFL, blocking ? 0 : O_NONBLOCK);
# ^
# ./schmorp.h:350:21: error: use of undeclared identifier 'F_SETFL'
# return fcntl (fd, F_SETFL, blocking ? 0 : O_NONBLOCK);
# ^
# ./schmorp.h:357:24: error: use of undeclared identifier 'F_SETFD'
# || fcntl (fd, F_SETFD, FD_CLOEXEC);
# ^
# ./schmorp.h:357:33: error: use of undeclared identifier 'FD_CLOEXEC'
# || fcntl (fd, F_SETFD, FD_CLOEXEC);
# ^
# 1 warning and 4 errors generated.
# make: *** [Makefile:330: Interrupt.o] Error 1
# ==> ERROR: A failure occurred in build().
# Aborting...