Build of keyutils with android toolchain

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

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

SLOCLanguage
3,044 sh
2,946 ansic
209 makefile
6,199 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...

Copied permanent toolchain into container-local sysroot
# /toolchain_root/arm-linux-androideabi --> /sysroot/arm-linux-androideabi
# /toolchain_root/COPYING3.LIB --> /sysroot/COPYING3.LIB
# /toolchain_root/sysroot --> /sysroot/sysroot
# /toolchain_root/COPYING.RUNTIME --> /sysroot/COPYING.RUNTIME
# /toolchain_root/lib --> /sysroot/lib
# /toolchain_root/SOURCES --> /sysroot/SOURCES
# /toolchain_root/lib64 --> /sysroot/lib64
# /toolchain_root/share --> /sysroot/share
# /toolchain_root/bin --> /sysroot/bin
# /toolchain_root/COPYING --> /sysroot/COPYING
# /toolchain_root/COPYING3 --> /sysroot/COPYING3
# /toolchain_root/COPYING.LIB --> /sysroot/COPYING.LIB
# /toolchain_root/include --> /sysroot/include
# /toolchain_root/libexec --> /sysroot/libexec

CMD: sudo -u tuscan PATH=/sysroot/bin:/sysroot/libexec/gcc/arm-linux-androideabi/4.8:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ red makepkg --noextract --syncdeps --skipinteg --skippgpcheck --skipchecksums --noconfirm --nocolor --log --noprogressbar --nocheck
# ==> Making package: keyutils 1.5.9-1 (Tue Apr 4 21:24:31 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# grep: /etc/rpm/macros.dist: No such file or directory
# arm-linux-androideabi-gcc -I. -DPKGBUILD="\"2017-04-04\"" -DPKGVERSION="\"keyutils-1.5.9\"" -DAPIVERSION="\"libkeyutils-1.5\"" -fPIC -o keyutils.os -c keyutils.c
# arm-linux-androideabi-gcc -I. -o keyctl.o -c keyctl.c
# arm-linux-androideabi-gcc -I. -o request-key.o -c request-key.c
# arm-linux-androideabi-gcc -I. -o key.dns_resolver.o -c key.dns_resolver.c
# key.dns_resolver.c: In function 'main':
# key.dns_resolver.c:703:11: warning: incompatible implicit declaration of built-in function 'rindex' [enabled by default]
# keyend = rindex(keyend, ';');
# ^
# key.dns_resolver.c:708:9: warning: incompatible implicit declaration of built-in function 'index' [enabled by default]
# name = index(keyend, ':');
# ^
# arm-linux-androideabi-gcc -I. -DPKGBUILD="\"2017-04-04\"" -DPKGVERSION="\"keyutils-1.5.9\"" -DAPIVERSION="\"libkeyutils-1.5\"" -UNO_GLIBC_KEYERR -o keyutils.o -c keyutils.c
# arm-linux-androideabi-gcc -fPIC -shared -Wl,-soname,libkeyutils.so.1 -Wl,--version-script,version.lds -o libkeyutils.so.1.5 keyutils.os
# ln -sf libkeyutils.so.1.5 libkeyutils.so.1
# ln -sf libkeyutils.so.1 libkeyutils.so
# arm-linux-androideabi-gcc -L. -o request-key request-key.o -lkeyutils
# arm-linux-androideabi-gcc -L. -o key.dns_resolver key.dns_resolver.o -lkeyutils -lresolv
# /sysroot/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lresolv
# key.dns_resolver.o:key.dns_resolver.c:function afsdb_hosts_to_addrs: error: undefined reference to '__ns_parserr'
# key.dns_resolver.o:key.dns_resolver.c:function afsdb_hosts_to_addrs: error: undefined reference to '__ns_get16'
# key.dns_resolver.o:key.dns_resolver.c:function afsdb_hosts_to_addrs: error: undefined reference to '__ns_name_uncompress'
# key.dns_resolver.o:key.dns_resolver.c:function dns_query_afsdb: error: undefined reference to '__ns_initparse'
# key.dns_resolver.o:key.dns_resolver.c:function main: error: undefined reference to 'rindex'
# collect2: error: ld returned 1 exit status
# make: *** [Makefile:150: key.dns_resolver] Error 1
# make: *** Waiting for unfinished jobs....
# ==> ERROR: A failure occurred in build().
# Aborting...