Build of exim with musl toolchain

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

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

SLOCLanguage
97,845 ansic
1,499 sh
964 makefile
480 perl
100,788 total

The process tree of the build process is here.

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

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: exim 4.87-1 (Wed Apr 5 02:14:07 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# /bin/sh scripts/source_checks
#
# >>> Creating links to source files...
# >>> Creating lookups/Makefile for building dynamic modules
# >>> New Makefile & lookups/Makefile installed
# >>> Use "make makefile" if you need to force rebuilding of the makefile
#
# make[1]: Entering directory '/tmp/exim/src/exim-4.87/build-Linux-x86_64'
# /bin/sh ../scripts/Configure-os.c
# gcc buildconfig.c
# /sysroot/bin/ld: error: cannot find -lnsl
# clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
# make[1]: *** [Makefile:245: buildconfig] Error 1
# make[1]: Leaving directory '/tmp/exim/src/exim-4.87/build-Linux-x86_64'
# make: *** [Makefile:29: all] Error 2
# ==> ERROR: A failure occurred in build().
# Aborting...