multiarch / qemu-user-static

:earth_africa: `/usr/bin/qemu-*-static`
https://hub.docker.com/r/multiarch/qemu-user-static/
MIT License
2.4k stars 224 forks source link

Failing to run on arm64 #112

Open b1nch0 opened 4 years ago

b1nch0 commented 4 years ago

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

martin-g commented 4 years ago

@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.

umarcor commented 4 years ago

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).

Matheus-Garbelini commented 2 years ago

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

martin-g commented 2 years ago

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