-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this a cmake issue or QEMU issue? Broken compile on armhf, works on Aarch64 under Buildx/QEMU #107
Comments
Are you sure? This repository is for "multiarch/qemu-user-static" container image.
In my memory docker buildx has using the forked version of qemu internally. This qemu. Not original one.
The used "qemu-user-static" is not this repository's one.
But for example if you are running Ubuntu as host bionic, here is the "qemu-user-static" deb package. If you have a question related to buildx, the place to ask is here. |
Yes... definitely using "multiarch/qemu-user-static" container image Search inside the article (https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408) for "Docker Image Based Installation" - You'll see the references to multiarch/qemu-user-static. I'm using this approach, however it is confusing as several approaches are described. |
I think I've found the culprit... Building using bionic means a glibc version < 2.28, Focal is >2.28 - It appears the READDIR is returning NULL https://bugs.launchpad.net/qemu/+bug/1805913 Is there any easy way round this bug/issue? |
I still do not understand your steps. For
And I can not access to your log files. I do not know why.
Could you upload the log to your https://gist.github.com ? |
And it's good if you share your the minimal |
https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408
If you faced the error as a result of If you executed the https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
Please do it on your responsibility. |
Junaruga, Gist is here: https://gist.github.com/rhastie/04e5af6fa4f61e8e278a1a5ee27484f2 It is quite an involved Dockerfile inside a private repo which is using cmake to run a compile - If you share your GitHub ID I can add you to the repo - Focal version which is erroring is on the focal branch. Currently master is Bionic - I'm having to revert to Bionic. All I am changing between the two Dockerfile versions is the base-image |
Now I can see I do not want to see your private repository. It's okay not to share it. This CI service can offer ARM 32 bit native host environment. It's free for public repository. It might not free for the private repository. But it's worth to try. |
Yes - This is part of the docker buildx output for just ARMv7 build Thanks for the help - I'll look at https://drone.io |
Just wanted to comment that I have encountered this same problem and it seems to be tied to cmake version. 3.13.4 works fine, but cmake 3.18.1 fails to exact same error in the same container. |
This is reported on CMake's GitLab here: https://gitlab.kitware.com/cmake/cmake/-/issues/20568 |
See https://github.com/dbhi/docker#building-docker-images-foron-arm-targets:
|
Is this a bug report, feature (enhancement) request or question? (leave only one on its own line)
/kind question
Possible issue or bug with QEMU - need help identifying where issue is
Description:
I'm using latest multiarch/qemu-user-static installed via Docker container.
I run some builds using QEMUs via Docker buildx. Docker builds work fine for AArch64, but I consistently get a failure like below when attempting to build for 32-bit ARM (hard-float).
The containers are successfully built for AMD64 (ie. with no emulation) and Aarch64 (using QEMU emulation), but, fail for the ARMHF (ARMv7 32-bit) build again using QEMU emulation. I am using Focal 20.04 as the host and also building a Focal 20.04 container.
I have specifically used cmake 3.16.3 (from Focal 20.04 repo) and also compiled and used cmake 3.17.1
For reference, I am also using Conan as the C++ package manager - Version 1.24.1 / Docker 19.03.8 with the very latest buildx / Moby-Buildkit v0.7.1... All I believe are current
Please find attached the output of my failure
buildx_armhf_failure.txt
Finally, I have done my best to enable the
--trace-expand
option on cmake and redirect stdout and stderr - As you can see its not perfect but I'm hoping it will give you something to go on..stdout.out.txt
stderr.out (1).txt
Steps to reproduce the issue:
Generally following this guide using multiarch/qemu-user-static - https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408
I can provide access to a Git containing the build Dockerfile - Please let me know the required Git account
Typically setting buildx to support linux ARM/v7, Aarch64 and amd64
Run using: docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t rhastie/container .
Describe the results you received:
Container is successfully built for amd64 (ie. x86_64) no QEMU emulation
Container is successfully built for Aarch64 via QEMU emulation
Container build errors and terminates for Arm/v7 via QEMU emulation
Describe the results you expected:
I would expect the container to be built for both architectures - This may be either cmake issue or a QEMU issue. Unusual that it works for Aarch64 and not armhf under QEMU.
Environment:
x86-64 Running Ubuntu Focal 20.04
Docker 19.03.8
Moby-Buildkit v0.7.1
cmake 3.16.3 and cmake 3.17.1 tested
latest buildx CLI from - https://github.com/docker/buildx
latest QEMU-user-static from - https://github.com/multiarch/qemu-user-static
Container being built using Focal 20.04
Output of
docker version
,podman version
orsingularity version
Additional information optionally:
I also have an issue raised here: https://gitlab.kitware.com/cmake/cmake/-/issues/20568
The text was updated successfully, but these errors were encountered: