[Whonix-devel] Bug#926116: cross build failing - update-binfmts: warning: qemu-i386 not in database of installed binary formats.

Patrick Schleizer adrelanos at riseup.net
Sun Mar 31 18:57:00 CEST 2019


Package: mmdebstrap
Severity: normal
X-Debbugs-CC: whonix-devel at whonix.org

Dear maintainer,

# How to reproduce:

sudo /home/user/whonix_dot/Whonix/help-steps/mmdebstrap --verbose
--architectures=i386 stretch /var/cache/pbuilder/base.cow_i386
/home/user/whonix_dot/Whonix/build_sources/debian_stable_current_clearnet.list

(Could probably simplified but I hope you can reproduce this easily /
hope you also have usr/bin/mkdir.)

# Expected result:

No error.

# Actual result:

> I: automatically chosen mode: root
> I: i386 cannot be executed, falling back to qemu-user
> update-binfmts: warning: qemu-i386 not in database of installed binary formats.
> update-binfmts: exiting due to previous errors
> qemu-i386 is not a supported binfmt name at /home/user/whonix_dot/Whonix/help-steps/mmdebstrap line 1838.

# Misc:

/usr/sbin/update-binfmts --display qemu-i386

> update-binfmts: warning: qemu-i386 not in database of installed binary formats.
> update-binfmts: exiting due to previous errors

I guess the issue is somewhere here:

		    open my $fh, '-|', '/usr/sbin/update-binfmts', '--display',
"qemu-$options->{qemu}" // die "failed to fork(): $!";
		    chomp (my $binfmts = do { local $/; <$fh> });
		    close $fh;
		    if ($binfmts eq '') {
			die "qemu-$options->{qemu} is not a supported binfmt name";
		    }

Removing
die "qemu-$options->{qemu} is not a supported binfmt name";
helps as a workaround. I can now build i386 on amd64.

Building armhf or arm64 fails.

I: installing packages...
/usr/sbin/chroot: failed to run command ‘dpkg’: Permission denied
env --unset=APT_CONFIG /usr/sbin/chroot
/var/cache/pbuilder/base.cow_arm64 dpkg --install --force-depends
/var/cache/apt/archives//sysvinit-utils_2.88dsf-59.9_arm64.deb ...
/home/user/whonix_dot/Whonix/help-steps/mmdebstrap line 551.

This might be more a user support question than actual bug. I hope you
don't mind me asking here. Please kindly let me know if I should take
this elsewhere please.

> dpkg -l | grep qemu
> ii  ipxe-qemu                                     1.0.0+git-20161027.b991c67-1               all          PXE boot firmware - ROM images for qemu
> ii  qemu                                          1:2.8+dfsg-6+deb9u5                        amd64        fast processor emulator
> ii  qemu-slof                                     20161019+dfsg-1                            all          Slimline Open Firmware -- QEMU PowerPC version
> ii  qemu-system                                   1:2.8+dfsg-6+deb9u5                        amd64        QEMU full system emulation binaries
> ii  qemu-system-arm                               1:2.8+dfsg-6+deb9u5                        amd64        QEMU full system emulation binaries (arm)
> ii  qemu-system-common                            1:2.8+dfsg-6+deb9u5                        amd64        QEMU full system emulation binaries (common files)
> ii  qemu-system-mips                              1:2.8+dfsg-6+deb9u5                        amd64        QEMU full system emulation binaries (mips)
> ii  qemu-system-misc                              1:2.8+dfsg-6+deb9u5                        amd64        QEMU full system emulation binaries (miscellaneous)
> ii  qemu-system-ppc                               1:2.8+dfsg-6+deb9u5                        amd64        QEMU full system emulation binaries (ppc)
> ii  qemu-system-sparc                             1:2.8+dfsg-6+deb9u5                        amd64        QEMU full system emulation binaries (sparc)
> ii  qemu-system-x86                               1:2.8+dfsg-6+deb9u5                        amd64        QEMU full system emulation binaries (x86)
> ii  qemu-user                                     1:2.8+dfsg-6+deb9u5                        amd64        QEMU user mode emulation binaries
> ii  qemu-user-static                              1:2.8+dfsg-6+deb9u5                        amd64        QEMU user mode emulation binaries (static version)
> ii  qemu-utils                                    1:2.8+dfsg-6+deb9u5                        amd64        QEMU utilitie

I am using mmdebstrap (git version) and I am still on Debian stretch.
Perhaps stretch is unsupported and all of this works in buster?

Kind regards,
Patrick


More information about the Whonix-devel mailing list