2

I have been searching for a simple way to run x86_64 binaries on arm64 GNU/Linux.

I've tried qemu-user: qemu-x86-64 -L /usr/x86-64-linux-gnu /opt/x86_64program, but I'm getting /lib/libc.so.6: version 'GLIBC_2.32' not found, so I went ahead and tried compiling and installing it from source ... no success, still getting the error.

So I tried to build the binary from source (it's written in Rust) using Cargo with the target param set to aarch64-unknown-linux-gnu ... after compiling most of the components, it throws and error saying that it had to abort due to previous error, which seems to have something to do with wrong libs (in /usr/bin/ld).

At this point, I've given up hope on getting this to run.

How would you proceed with running x86_64 binaries on arm64?

Thanks

j3ff
  • 55
  • 1
    You seem to have already found the answer: use qemu-x86-64. Qemu only emulates the processor, and qemu-user reroutes system calls. You still need to install a suitable version of libraries. Presumably the glibc version under /usr/x86-64-linux-gnu is older than 2.32. – Gilles 'SO- stop being evil' Jul 16 '21 at 19:13
  • @Gilles'SO-stopbeingevil' apt says it's the latest version – j3ff Jul 16 '21 at 19:54
  • It's the version from your distribution. Apparently the binary you have was built against a more recent version. It's easy to install a more recent debian/ubuntu in a schroot, see https://unix.stackexchange.com/questions/12956/how-do-i-run-32-bit-programs-on-a-64-bit-debian-ubuntu/12957#12957 – Gilles 'SO- stop being evil' Jul 16 '21 at 20:01
  • @Gilles'SO-stopbeingevil' Ah, yeah, I was looking for something like schroot. I learned from my mistake which I just recovered from, where I stupidly downloaded a libc6 .deb right from Ubuntu repos and run dpkg -i on it. Biggest mistake ever XD. – j3ff Jul 16 '21 at 20:14

0 Answers0