I tried explicitly xdeb-ing libcap2, and got yet another failure:
xdeb-run --only-explicit -a armel --prefer-apt --apt-source --debug --force-rebuild libcap2
[...]
Building working tree cache ...
libcap2 -> attr (libattr1-dev)
libcap2 -> pam (libpam0g-dev)
Recursing: attr -> libcap2
Recursing: pam -> libcap2
Build sequence: attr* pam* libcap2*
[...]
===== Importing attr_1:2.4.46-3 =====
[...]
===== Importing pam_1.1.3-2ubuntu1 =====
[...]
===== Building libcap2_1:2.21-2 =====
[...]
dh_auto_build
make -j1
make[1]: Entering directory `/home/lool/xdeb-bash/libcap2'
make -C libcap all
make[2]: Entering directory `/home/lool/xdeb-bash/libcap2/libcap'
=> making cap_names.list.h from /home/lool/xdeb-bash/libcap2/libcap/../libcap/include/linux/capability.h
perl -e 'while ($l=<>) { if ($l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$/) { $tok=$1; $val=$2; $tok =~ tr/A-Z/a-z/; print "{\"$tok\",$val},\n"; } }' /home/lool/xdeb-bash/libcap2/libcap/../libcap/include/linux/capability.h | fgrep -v 0x > cap_names.list.h
gcc -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/home/lool/xdeb-bash/libcap2/libcap/../libcap/include -I/home/lool/xdeb-bash/libcap2/libcap/../libcap/include _makenames.c -o _makenames
[...]
dh_strip arm-linux-gnueabi-strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/libcap2-bin/lib/security/pam_cap.so
arm-linux-gnueabi-strip:debian/libcap2-bin/lib/security/pam_cap.so: File format not recognized
dh_strip: arm-linux-gnueabi-strip --remove-section=.comment --remove-section=.note --strip-unneeded debian/libcap2-bin/lib/security/pam_cap.so returned exit code 1
make: *** [binary] Error 29
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
which is because it's not using a cross compiler; after fixing debian/rules to set CC and BUILD_CC as in https://launchpadlibrarian.net/37542685/libcap2_1%3A2.16-5ubuntu1_1%3A2.16-5ubuntu2%7Ecross1.diff.gz but adapted for the new dh-based rules, it cross-built fine:
[...]
=> making cap_names.list.h from /home/lool/xdeb-bash/libcap2/libcap/../libcap/include/linux/capability.h
perl -e 'while ($l=<>) { if ($l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$/) { $tok=$1; $val=$2; $tok =~ tr/A-Z/a-z/; print "{\"$tok\",$val},\n"; } }' /home/lool/xdeb-bash/libcap2/libcap/../libcap/include/linux/capability.h | fgrep -v 0x > cap_names.list.h
gcc -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I/home/lool/xdeb-bash/libcap2/libcap/../libcap/include -I/home/lool/xdeb-bash/libcap2/libcap/../libcap/include _makenames.c -o _makenames
./_makenames > cap_names.h
arm-linux-gnueabi-gcc -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Dlinux -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -g -fPIC -I/home/lool/xdeb-bash/libcap2/libcap/../libcap/include -I/home/lool/xdeb-bash/libcap2/libcap/../libcap/include -c cap_alloc.c -o cap_alloc.o
[...]
dpkg-deb: building package `libcap2-armel-cross' in `./libcap2-armel-cross_2.21-2_all.deb'.
['libcap2-armel-cross_2.21-2_all.deb', 'libcap-dev-armel-cross_2.21-2_all.deb']
I tried explicitly xdeb-ing libcap2, and got yet another failure: lool/xdeb- bash/libcap2' lool/xdeb- bash/libcap2/ libcap' xdeb-bash/ libcap2/ libcap/ ../libcap/ include/ linux/capabilit y.h ",$val} ,\n"; } }' /home/lool/ xdeb-bash/ libcap2/ libcap/ ../libcap/ include/ linux/capabilit y.h | fgrep -v 0x > cap_names.list.h SOURCE -D_FILE_ OFFSET_ BITS=64 -fPIC -I/home/ lool/xdeb- bash/libcap2/ libcap/ ../libcap/ include -I/home/ lool/xdeb- bash/libcap2/ libcap/ ../libcap/ include _makenames.c -o _makenames
arm-linux- gnueabi- strip --remove- section= .comment --remove- section= .note --strip-unneeded debian/ libcap2- bin/lib/ security/ pam_cap. so gnueabi- strip:debian/ libcap2- bin/lib/ security/ pam_cap. so: File format not recognized gnueabi- strip --remove- section= .comment --remove- section= .note --strip-unneeded debian/ libcap2- bin/lib/ security/ pam_cap. so returned exit code 1
xdeb-run --only-explicit -a armel --prefer-apt --apt-source --debug --force-rebuild libcap2
[...]
Building working tree cache ...
libcap2 -> attr (libattr1-dev)
libcap2 -> pam (libpam0g-dev)
Recursing: attr -> libcap2
Recursing: pam -> libcap2
Build sequence: attr* pam* libcap2*
[...]
===== Importing attr_1:2.4.46-3 =====
[...]
===== Importing pam_1.1.3-2ubuntu1 =====
[...]
===== Building libcap2_1:2.21-2 =====
[...]
dh_auto_build
make -j1
make[1]: Entering directory `/home/
make -C libcap all
make[2]: Entering directory `/home/
=> making cap_names.list.h from /home/lool/
perl -e 'while ($l=<>) { if ($l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$/) { $tok=$1; $val=$2; $tok =~ tr/A-Z/a-z/; print "{\"$tok\
gcc -O2 -D_LARGEFILE64_
[...]
dh_strip
arm-linux-
dh_strip: arm-linux-
make: *** [binary] Error 29
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
which is because it's not using a cross compiler; after fixing debian/rules to set CC and BUILD_CC as in https:/ /launchpadlibra rian.net/ 37542685/ libcap2_ 1%3A2.16- 5ubuntu1_ 1%3A2.16- 5ubuntu2% 7Ecross1. diff.gz but adapted for the new dh-based rules, it cross-built fine: xdeb-bash/ libcap2/ libcap/ ../libcap/ include/ linux/capabilit y.h ",$val} ,\n"; } }' /home/lool/ xdeb-bash/ libcap2/ libcap/ ../libcap/ include/ linux/capabilit y.h | fgrep -v 0x > cap_names.list.h SOURCE -D_FILE_ OFFSET_ BITS=64 -fPIC -I/home/ lool/xdeb- bash/libcap2/ libcap/ ../libcap/ include -I/home/ lool/xdeb- bash/libcap2/ libcap/ ../libcap/ include _makenames.c -o _makenames gnueabi- gcc -O2 -D_LARGEFILE64_ SOURCE -D_FILE_ OFFSET_ BITS=64 -Dlinux -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing- prototypes -Wnested-externs -Winline -Wshadow -g -fPIC -I/home/ lool/xdeb- bash/libcap2/ libcap/ ../libcap/ include -I/home/ lool/xdeb- bash/libcap2/ libcap/ ../libcap/ include -c cap_alloc.c -o cap_alloc.o armel-cross' in `./libcap2- armel-cross_ 2.21-2_ all.deb' . armel-cross_ 2.21-2_ all.deb' , 'libcap- dev-armel- cross_2. 21-2_all. deb']
[...]
=> making cap_names.list.h from /home/lool/
perl -e 'while ($l=<>) { if ($l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$/) { $tok=$1; $val=$2; $tok =~ tr/A-Z/a-z/; print "{\"$tok\
gcc -O2 -D_LARGEFILE64_
./_makenames > cap_names.h
arm-linux-
[...]
dpkg-deb: building package `libcap2-
['libcap2-