Build of android-tools with musl toolchain

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

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

SLOCLanguage
81,973 cpp
67,939 ansic
3,547 python
3,452 asm
2,243 sh
1,068 java
131 ada
160,353 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: android-tools 6.0.1_r46-1 (Wed Apr 5 00:47:22 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# core/adb/usb_linux.cpp:25:10: fatal error: 'linux/usbdevice_fs.h' file not found
# #include
# ^
# 1 error generated.
# core/adb/adb_auth_host.cpp:49:10: fatal error: 'openssl/evp.h' file not found
# #include
# ^
# 1 error generated.
# core/base/file.cpp:113:12: error: use of undeclared identifier 'DEFFILEMODE'
# DEFFILEMODE));
# ^
# core/base/file.cpp:113:12: error: use of undeclared identifier 'DEFFILEMODE'
# core/base/file.cpp:111:7: error: cannot initialize a variable of type 'int' with an rvalue of type 'void'
# int fd = TEMP_FAILURE_RETRY(
# ^ ~~~~~~~~~~~~~~~~~~~
# 3 errors generated.
# In file included from core/liblog/logd_write.c:45:
# core/include/private/android_filesystem_config.h:25:10: fatal error: 'sys/cdefs.h' file not found
# #include
# ^
# 1 error generated.
# clang-3.8: error: no such file or directory: 'core/base/file.cpp.o'
# clang-3.8: error: no such file or directory: 'core/liblog/logd_write.c.o'
# clang-3.8: error: no such file or directory: 'core/adb/usb_linux.cpp.o'
# clang-3.8: error: no such file or directory: 'core/adb/adb_auth_host.cpp.o'
# In file included from core/fastboot/fastboot.cpp:48:
# core/include/ziparchive/zip_archive.h:28:1: error: unknown type name '__BEGIN_DECLS'
# __BEGIN_DECLS
# ^
# core/include/ziparchive/zip_archive.h:31:1: error: expected unqualified-id
# enum {
# ^
# core/include/ziparchive/zip_archive.h:199:1: error: unknown type name '__END_DECLS'
# __END_DECLS
# ^
# In file included from core/fastboot/fastboot.cpp:50:
# In file included from core/fastboot/bootimg_utils.h:32:
# core/mkbootimg/bootimg.h:23:1: error: expected unqualified-id
# typedef struct boot_img_hdr boot_img_hdr;
# ^
# 4 errors generated.
# core/fastboot/usb_linux.c:43:10: fatal error: 'linux/usbdevice_fs.h' file not found
# #include
# ^
# 1 error generated.
# core/libsparse/output_file.c:30:10: fatal error: 'zlib.h' file not found
# #include
# ^
# 1 error generated.
# core/libziparchive/zip_archive.cc:39:10: fatal error: 'zlib.h' file not found
# #include "zlib.h"
# ^
# 1 error generated.
# In file included from extras/ext4_utils/ext4_utils.c:21:
# extras/ext4_utils/sha1.h:24:10: fatal error: 'sys/cdefs.h' file not found
# #include
# ^
# 1 error generated.
# extras/ext4_utils/sha1.c:21:10: fatal error: 'sys/cdefs.h' file not found
# #include
# ^
# 1 error generated.
# extras/ext4_utils/wipe.c:24:10: fatal error: 'linux/fs.h' file not found
# #include
# ^
# 1 error generated.
# libselinux/src/label_file.c:19:10: fatal error: 'pcre.h' file not found
# #include
# ^
# 1 error generated.
# clang-3.8: error: no such file or directory: 'core/libsparse/output_file.c.o'
# clang-3.8: error: no such file or directory: 'core/libziparchive/zip_archive.cc.o'
# clang-3.8: error: no such file or directory: 'core/liblog/logd_write.c.o'
# clang-3.8: error: no such file or directory: 'core/base/file.cpp.o'
# clang-3.8: error: no such file or directory: 'extras/ext4_utils/ext4_utils.c.o'
# clang-3.8: error: no such file or directory: 'extras/ext4_utils/sha1.c.o'
# clang-3.8: error: no such file or directory: 'extras/ext4_utils/wipe.c.o'
# clang-3.8: error: no such file or directory: 'libselinux/src/label_file.c.o'
# clang-3.8: error: no such file or directory: 'core/fastboot/fastboot.cpp.o'
# clang-3.8: error: no such file or directory: 'core/fastboot/usb_linux.c.o'
# ==> ERROR: A failure occurred in build().
# Aborting...