On Wed, Sep 16, 2015 at 3:15 AM, Debian Bug Tracking System
<ow...@bugs.debian.org> wrote:
> This is an automatic notification regarding your Bug report
> which was filed against the qemu-system package:
>
> #799120: cc1/cc1plus fails with "execv: exec format error” under QEMU s390x, 
> can't compile C++ program
>
> It has been closed by Michael Tokarev <m...@tls.msk.ru>.
>

I wanted to report back.... I entered the s390x chroot today. Once I
performed an update, it worked like a charm.

Thanks again for the help.

Jeff

> ---------- Forwarded message ----------
> From: Michael Tokarev <m...@tls.msk.ru>
> To: noloa...@gmail.com, 799120-d...@bugs.debian.org
> Cc:
> Date: Wed, 16 Sep 2015 10:04:11 +0300
> Subject: Re: Bug#799120: cc1/cc1plus fails with "execv: exec format error” 
> under QEMU s390x, can't compile C++ program
> Control: reassign -1 qemu-user
> Version: 1:2.4+dfsg-3
>
> 16.09.2015 02:47, Jeffrey Walton wrote:
>> Package: qemu-system
>> Version: 1:2.4+dfsg-3
>> Severity: important
>
> This has nothing to do with qemu-system.  It is the user-mode emulation
> (run single executable on a foreign system), as opposed to emulating
> whole system hardware.
>
>> # chroot debian-s390x
>> # make
>> g++ -DNDEBUG -g2 -O2 -pipe -c osrng.cpp
>> g++: error trying to exec '/usr/lib/gcc/s390x-linux-gnu/5/cc1plus':
>> execv: Exec format error
>
> This is because the binfmt recognision expects traditional format of
> the executables, where the OSABI field in the ELF header is set to
> OSABI_SYSV.  But recent GNU toolchain produces slightly different
> header, where this field is set to OSABI_GNU ("object uses GNU ELF
> extensions").  OSABI_GNU value was not covered by the binfmt registration
> of qemu-user[-static], only OSABI_SYSV.  So in practice, all executables
> where this field is set to OSABI_GNU, were not registered as handled by
> qemu, so kernel just didn't know how to run these, hence the error it
> throws at you.
>
> This has been fixed in the version which you reported this prob against,
> 1:2.4+dfsg-3, where I updated the binfmt masks to include OSABI_GNU too.
> This was #784605.
>
> However, it looks like we've a problem with updating binfmt registrations.
> If you had qemu-user-static package previously installed (which registers
> only OSABI_SYSV variant) and update it to current version (which should
> register both SYSV and GNU variants), the in-kernel registration isn't
> updated.  It will be updated at reboot, or you can remove and reinstall
> qemu-user-static package, after which it'll work.
>
> Closing this bug because of this, I'll try to see why the registration
> isn't updated at package upgrade.
>

Reply via email to