qemu-user-static icon indicating copy to clipboard operation
qemu-user-static copied to clipboard

Failing to run on arm64

Open b1nch0 opened this issue 5 years ago • 4 comments

ubuntu 20.04 / qemu-user-static ( version 1:2.11+dfsg-1ubuntu7.26 )

root@ubuntu:/tmp# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

    standard_init_linux.go:211: exec user process caused "exec format error"

root@ubuntu:/tmp# docker run --rm --privileged multiarch/qemu-user-static:x86_64 --reset -p yes

    docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"--reset\": executable file not found in $PATH": unknown.


There is a post promising you could build from arm64 to adm64 here : https://tech.smartling.com/building-multi-architecture-docker-images-on-arm-64-c3e6f8d78e1c

b1nch0 avatar Jun 17 '20 10:06 b1nch0

@b1nch0 I don't see anything at https://tech.smartling.com/building-multi-architecture-docker-images-on-arm-64-c3e6f8d78e1c stating that docker run --rm --privileged multiarch/qemu-user-static --reset -p yes could be executed on arm64.

I use it on x86_64 machine to build aarch64 binaries but it seems you need the opposite.

martin-g avatar Jun 18 '20 12:06 martin-g

Hi @b1nch0 ! This repository is for amd64/x86_64 hosts only (#77, #111). For other host archs, you can use dbhi/qus:

images are provided for each of seven host architectures officially supported by Docker, Inc. or built by official images: amd64, i386, arm64v8, arm32v7, arm32v6, s390x and ppc64le.


There is a post promising you could build from arm64 to adm64 here : https://tech.smartling.com/building-multi-architecture-docker-images-on-arm-64-c3e6f8d78e1c

In that post, qemu-user-static is installed on the host through the package manager (apt). It corresponds to cases r/R/s in https://github.com/dbhi/qus/blob/master/docs/tests.md. This repo and dbhi/qus are about supporting cases f/F/c/C (mostly).

umarcor avatar Jun 20 '20 16:06 umarcor

Thanks a lot @umarcor This is exactly what I needed now with the free Arm A1 4-core, 24GB that oracle cloud provides :-)

Matheus-Garbelini avatar Dec 13 '21 09:12 Matheus-Garbelini

I have blogged about QUS at https://martin-grigorov.medium.com/build-linux-software-for-foreign-cpu-architectures-on-arm64-463a95d15460

martin-g avatar Dec 13 '21 09:12 martin-g