This occurs attempting to run any gentoo-mips stage3 under amd64, but appears unrelated to amd64 arch. I have filed upstream bug and attempted to fix it, but it goes into areas beyond my understanding (of ELF headers and structure). https://bugs.launchpad.net/qemu/+bug/1825002 A partial work-around is to launch the foreign executable via the foreign ld loader, i.e. chroot gentoo-mips32r2el /lib/ld-2.19.so /bin/bash -l However, this does not recuse so anything bash attempts to execute without calling the loader will fail. This appears to have been introduced by a patch series starting at 3f8e8ac3314c0fcbd19983a81f676ac60d0ca5c8 which was released in 3.1.0. I *strongly* recommend and request re-adding 3.0.0 to the git repo and further suggest that at least one previous version be kept in the future to prevent people from becoming stranded with a new and broken version. See Also https://bugs.launchpad.net/qemu/+bug/1825002 https://stackoverflow.com/questions/55286909/qemu-fpu-mode-error-when-attempting-to-run-mips-binary
Created attachment 573170 [details, diff] fix Sanitizes struct image_info interp_info and initializes default value for FPU mode so that when the ELF program header doesn't specify, we don't end up with whatever was on the stack.
Created attachment 573172 [details, diff] Add 3.1.0-r5 with patch Here, this adds a new qemu revision with patch
(In reply to Daniel Santos from comment #2) > Created attachment 573172 [details, diff] [details, diff] > Add 3.1.0-r5 with patch > > Here, this adds a new qemu revision with patch Would you mind posting your patch on the qemu devel mailing list for some initial review?
(In reply to Matthias Maier from comment #3) > (In reply to Daniel Santos from comment #2) > > Created attachment 573172 [details, diff] [details, diff] [details, diff] > > Add 3.1.0-r5 with patch > > > > Here, this adds a new qemu revision with patch > > Would you mind posting your patch on the qemu devel mailing list for some > initial review? Thanks for your reply and done. https://lists.nongnu.org/archive/html/qemu-devel/2019-04/msg02999.html
(In reply to Matthias Maier from comment #3) > Would you mind posting your patch on the qemu devel mailing list for some > initial review? The patch is has been reviewed and allegedly committed upstream, although I don't know where they do staging. Also, qemu 4.0.0 is now released, which does not contain this patch.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83a1b469d6e8c77187bf69ad6b74509b3586de3 commit c83a1b469d6e8c77187bf69ad6b74509b3586de3 Author: Matthias Maier <tamiko@gentoo.org> AuthorDate: 2019-04-29 03:31:19 +0000 Commit: Matthias Maier <tamiko@gentoo.org> CommitDate: 2019-04-29 06:48:45 +0000 app-emulation/qemu: version bump to 4.0.0 - Version bump to 4.0.0 (bug #684274) - Apply mips fpu mode fix (bug #683640) - Bug #683458: Reenable stripping. Remove old CFLAGS workaround. Let's see how far this takes us. Bug: https://bugs.gentoo.org/683458 Closes: https://bugs.gentoo.org/683640 Closes: https://bugs.gentoo.org/684274 Closes: https://github.com/gentoo/gentoo/pull/11719 Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Matthias Maier <tamiko@gentoo.org> app-emulation/qemu/Manifest | 1 + .../files/qemu-4.0.0-sanitize-interp_info.patch | 32 + app-emulation/qemu/qemu-4.0.0.ebuild | 799 +++++++++++++++++++++ 3 files changed, 832 insertions(+)
Hi Matthias! I was doing my bug wrangling and was about to ping this, but I guess I'm not watching my inbox closely enough. Thanks!