Hai, Im setting up a new Sbuild system and i cant get my cross-builds running.
Im maintaining Samba and its depends some years now, the old setup uses pbuilder and cowbuilder, not for official debian (yet), thats why im attempting sbuild now. I used :sbuild-debian-developer-setup to configure most. I followed : https://wiki.debian.org/sbuild I have my environments ready : ---- schroot -l chroot:bullseye-amd64-sbuild chroot:buster-amd64-sbuild chroot:focal-amd64-sbuild source:bullseye-amd64-sbuild source:buster-amd64-sbuild source:focal-amd64-sbuild So for test i took : talloc to rebuild, no change just a 1 on 1 rebuild. So i do simply, apt source talloc cd talloc-2.3.1\ ---- sbuild -d bullseye (snap) Version: 2.3.1-2 Source Version: 2.3.1-2 Distribution: bullseye Machine Architecture: amd64 Host Architecture: amd64 Build Architecture: amd64 Build Type: full Defaults to amd64 and this builds fine. So now i want to build also for i386 and armhf sbuild -d bullseye --host=i386 Checking for 'gcc' (C compiler) : 13:51:16 runner ['/usr/bin/gcc', '-dM', '-E', '-'] /usr/bin/gcc Checking for program 'git' : not found Checking for c flags '-MMD' : 13:51:16 runner ['/usr/bin/gcc', '-g', '-O2', '-ffile-prefix-map=/<<PKGBUILDDIR>>=.', '-fstack-protector-strong', '-Wformat', '-Werror=format-security', '-g', '-Wall', '-MMD', '../../test.c', '-c', '-o/<<PKGBUILDDIR>>/bin/.conf_check_0af4100b5fe46e1d39544ff43f971742/testbuild/default/test.c.1.o', '-Wdate-time', '-D_FORTIFY_SOURCE=2'] yes ERROR: Mismatch between --build and --host. Please use --cross-compile instead make[1]: *** [debian/rules:26: override_dh_auto_configure] Error 1 make[1]: Leaving directory '/<<PKGBUILDDIR>>' make: *** [debian/rules:23: binary] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 2021-07-22T13:51:16Z ---- And when im trying armhf.. sbuild -d bullseye --host=armhf (snap) Package: talloc Version: 2.3.1-2 Source Version: 2.3.1-2 Distribution: bullseye Machine Architecture: amd64 Host Architecture: armhf Build Architecture: amd64 Build Profiles: cross nocheck Build Type: full Im keep getting these.. Setting up python3.9-minimal:armhf (3.9.2-1) ... /var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/bin/python3.9: Exec format error dpkg: error processing package python3.9-minimal:armhf (--configure): installed python3.9-minimal:armhf package post-installation script subprocess returned error exit status 126 Setting up liblocale-gettext-perl (1.07-4+b1) ... Setting up sbuild-build-depends-dose3-dummy:armhf (0.invalid.0) ... Setting up groff-base (1.22.4-6) ... Setting up man-db (2.9.4-2) ... Not building database; man-db/auto-update is not 'true'. Processing triggers for libc-bin (2.31-12) ... Errors were encountered while processing: python3.9-minimal:armhf E: Sub-process /usr/bin/dpkg returned an error code (1) apt-get failed. E: Package installation failed Not removing build depends: cloned chroot in use E: Failed to explain bd-uninstallable +------------------------------------------------------------------------------+ | Summary | +------------------------------------------------------------------------------+ Build Architecture: amd64 Build Profiles: cross nocheck Build Type: full Build-Space: n/a Build-Time: 0 Distribution: bullseye Fail-Stage: explain-bd-uninstallable Foreign Architectures: armhf Host Architecture: armhf Install-Time: 0 Job: /home/thcnbl/build/1/talloc_2.3.1-2.dsc Machine Architecture: amd64 Package: talloc Package-Time: 0 Source-Version: 2.3.1-2 Space: n/a Status: given-back Version: 2.3.1-2 ---- Since its a new setup on bullseye, it might be anyting i missed but i dont see it.. Anyone suggestions tip, or burn me when im doing things wrong but please point me to a the solution. ;-( Ps. And the problem Geert Stappers had (posted on 1 juli), i seen that also. I just install dh-python to get passed that. Best regards, Louis