Your message dated Sun, 5 Dec 2021 16:34:16 +0300
with message-id <[email protected]>
and subject line Re: Bug#1001156: qemu-arm needs some help with finding libs
has caused the Debian Bug report #1001156,
regarding qemu-arm needs some help with finding libs
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1001156: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001156
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: qemu-user
Version: 1:6.1+dfsg-8+b1
It seems like one has to help qemu-arm a little in order to run ARM
executables. (This procedure does not seem to be necessary for other
targets - at least not for qemu-ppc64le where I tried.)
$ cat hello.c
#include <stdio.h>
int main()
{
printf("hello world!\n");
}
$ arm-linux-gnueabihf-gcc-11 hello.c
$ qemu-arm a.out
qemu-arm: Could not open '/lib/ld-linux-armhf.so.3': No such file or
directory
$ ln -s /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/
$ qemu-arm a.out
a.out: error while loading shared libraries: libc.so.6: cannot open
shared object file: No such file or directory
$ export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib
$ qemu-arm a.out
hello world!
Both seem to be necessary to run a binary: setting LD_LIBRARY_PATH and
providing ld-linux-armhf.so.3 in /lib/
. It should work without these steps.
-rbk.
--
.''`. Richard B. Kreckel
: :' : <[email protected]>
`. `' <[email protected]>
`- <http://in.terlu.de/~kreckel/>
--- End Message ---
--- Begin Message ---
05.12.2021 15:30, Richard B. Kreckel wrote:
Package: qemu-user
Version: 1:6.1+dfsg-8+b1
It seems like one has to help qemu-arm a little in order to run ARM
executables. (This procedure does not seem to be necessary for other
targets - at least not for qemu-ppc64le where I tried.)
...
qemu-arm: Could not open '/lib/ld-linux-armhf.so.3': No such file or
directory
$ ln -s /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/
$ qemu-arm a.out
a.out: error while loading shared libraries: libc.so.6: cannot open
shared object file: No such file or directory
No. Qemu does not need help in this context. It provides ability to
execute foreign binaries. It is up to you or to the system to provide
the necessary environment for these binaries. It is exactly the same
as if you try to run the same source but compiled for x86_64, without
qemu, on a system without /lib64/ld-linux-x86-64.so.2 - it will fail
exactly the same way.
If you want your foreign binary to run, enable this foreign architecture
in dpkg (--add-architecture), run apt update, and install the corresponding
libc - this one will install things into the right place.
I don't know details and reasons about the /usr/arb-linux/gnueabihf/ stuff
and why it is not in /lib. But it is definitely not qemu's way to change
the way regular linux system works.
Thanks,
/mjt
--- End Message ---