Hi Nilesh, TLDR: sudo apt remove qemu-user qemu-user-static Quoting Nilesh Patra (2021-03-16 22:20:45) > However, there are several of: ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. > > Not sure if it is okay, probably it is not. It is not. What you are seeing is the combination of using LD_PRELOAD via fakeroot with qemu-user via binfmt-misc. The error happens because when you run a foreign architecture binary on a system that can emulate that foreign architecture with qemu-user transparently with binfmt-misc under fakeroot, then foreign architecture shared libraries like libfakeroot-sysv.so will likely not be available. Foreign architecture LD_PRELOAD with fakeroot or fakechroot is possible but requires a number of hacks: https://sources.debian.org/src/mmdebstrap/0.7.5-2/mmdebstrap/#L2549 But when cross building you do not want to run foreign architecture binaries. It just happens to work on systems that use qemu-user and binfmt-misc and will of course only work for architectures with qemu support. The easiest way to find these problems is to build on a system that doesn't have qemu-user installed, hence my TLDR suggestion from above. If you remove them, then the build will fail very early: make[4]: Entering directory '/<<PKGBUILDDIR>>/util' ./makedefs -m ./makedefs: 1: Syntax error: word unexpected (expecting ")") make[4]: *** [Makefile:199: ../src/monstr.c] Error 2 make[4]: Leaving directory '/<<PKGBUILDDIR>>/util' make[3]: *** [Makefile:658: monstr.c] Error 2 make[3]: Leaving directory '/<<PKGBUILDDIR>>/src' make[2]: *** [Makefile:212: ../include/date.h] Error 2 make[2]: Leaving directory '/<<PKGBUILDDIR>>/util' dh_auto_build: error: cd util && make -j1 "INSTALL=install --strip-program=true" PKG_CONFIG=aarch64-linux- gnu-pkg-config CXX=aarch64-linux-gnu-g\+\+ CC=aarch64-linux-gnu-gcc recover returned exit code 2 make[1]: *** [debian/rules:26: override_dh_auto_build] Error 25 make[1]: Leaving directory '/<<PKGBUILDDIR>>' make: *** [debian/rules:6: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 This will be tricky to fix, because essentially you have to to adapt the upstream build system such that all utilities that are not installed but run during the build are compiled for the build architecture and not for the host architecture. If there are utilities that are not only used during the build but also installed, then they need to be compiled twice: once native and once cross. Thanks! cheers, josch
Attachment:
signature.asc
Description: signature