-
Notifications
You must be signed in to change notification settings - Fork 481
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
Value too large for defined data type #395
Comments
Same here. I ran your example repo according to the instructions and it fails for me with the exact same error. I figured out that it seems to be a problem with 32bit systems on a 64bit host whilst doing research. Something about larger inodes so I guess cargo's first file system operation just blows up. |
I have the same issue. Attaching my
|
You can take a look here. I do a fetch using the build platform arch and then copy it in the target platform. |
I've the exact same error but in my builder image : I've tried rust:buster, debian:latest, python:3, ubuntu... to no avail... Any idea I'm blocked ? (Or is there a catch in @jdrouet 's solution that I've missed? ) I cannot use a JFS volume as shown in the following link because the error happens at build time : |
@jdrouet yes I'm using multistage like in your Dockerfile but the problem happens in the build stage so I don't even reach the step where I could I'm not using |
if you don't use |
@jdrouet Thanks for the example Dockerfile - worked like a charm! Not really related to But with the I already tried: It's not a big deal for me, as I can use edit: I figured it out. |
* building libzkgroup.so every time when building the docker image takes really long and is quite hacky (due to a bug in docker/buildx: see docker/buildx#395).
Right, I managed to build it thanks to your example ! As I understand it now (if useful to anyone) :
I have "vendor" files that look like architecture-specific (e.g. My process is a little bit different since I first clone the code of an existing project from github, so I don't need to do Thanks @jdrouet ! |
@nicobo That's basically what I am doing now. Always building the Rust dependencies when building my docker image took too long, so precompiled them with cross and injected the right shared object into my docker build. see https://github.com/bbernhard/signal-cli-rest-api/tree/master/ext/libraries/zkgroup and https://github.com/bbernhard/signal-cli-rest-api/blob/master/Dockerfile#L18 |
@bbernhard awesome this is libzkgroup I needed to build ! I noticed your image on Docker Hub but I've missed the cross-compiled binaries... from now on I can directly use yours ! |
what a coincidence 😀 - glad it's helpful to you! :) |
Hello. I am now reaching another level since this error arises when building a Python program, which depends on cryptography, a library which in turn builds with Rust... See : pyca/cryptography#5771 Let me explain the Python way : on some architectures (here linux/arm/v7) there is no "Python Wheel" package for this dependency so the The problem is that I don't think I can alter the way this dependency builds when triggered by a pip install (the cargo build command is out of hand), and anyway I'm getting tired to implement patches making my Dockerfiles hard to maintain... Any news ? Is there any link to an original issue on qemu or anything ? I've disabled rust in the cryptography build for now but this trick will be removed from their next release... |
You can test with QEMU from https://github.com/tonistiigi/binfmt that is made for running containers:
Let us know if it still happens |
I've tried using Java and JLink and it occurred the same error:
https://github.com/MarcelCoding/luna/blob/0b567aa6e1e7889bfe8ad3295dbf9dac1a855cf3/docker/Dockerfile.github-actions#L17-L23 |
@MarcelCoding were you able to fix or workaround the issue ? |
unfortunately not, I just removed armhf support. (arm64 also wan't working, for that I removed the stip-debug option) |
I was able to use armv6 and aarch64 just fine, its just arm7 causing this weird issue. Looks like manually building is the way to go for now |
Somewhere I read that this is an Issue with qemu emulating an 32bit system on an 64bit host. |
I see, thanks for the info :D
Get Outlook for Android<https://aka.ms/AAb9ysg> प्राप्त करें
…________________________________
From: Marcel ***@***.***>
Sent: Sunday, November 21, 2021 10:10:28 PM
To: docker/buildx ***@***.***>
Cc: Debayan Sutradhar ***@***.***>; Comment ***@***.***>
Subject: Re: [docker/buildx] Value too large for defined data type (#395)
Somewhere I read that this is an Issue with qemu emulating an 32bit system on an 64bit host.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#395 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGERF5LMF6LEGDKVOHYPZ23UNEOHXANCNFSM4RQIMLBA>.
|
@MarcelCoding, you are right. If you follow ehuss' comment you end up at the QEMU bugtracker which goes into more detail for those interested. Unfortunately the fix seems very far away, if there even will be a fix. Over in the cargo repo we got around the issue by mounting a tmpfs on the |
When doing `docker buildx bake -f docker-bake.hcl debian_jdk17` we get ```bash [linux/arm/v7 jre-build 2/2] RUN jlink --add-modules ALL-MODULE-PATH --strip-java-debug-attributes --no-man-pages --no-header-files --compress=2 --output /javaruntime: #0 4.256 Error: java.nio.file.FileSystemException: /opt/java/openjdk/jmods: Value too large for defined data type ``` I found this [reference](docker/buildx#395 (comment)) which indicates we could use `--platform=$BUILDPLATFORM` to avoid this error.
* Build does not work for linux/arm/v7 When doing `docker buildx bake -f docker-bake.hcl debian_jdk17` we get ```bash [linux/arm/v7 jre-build 2/2] RUN jlink --add-modules ALL-MODULE-PATH --strip-java-debug-attributes --no-man-pages --no-header-files --compress=2 --output /javaruntime: #0 4.256 Error: java.nio.file.FileSystemException: /opt/java/openjdk/jmods: Value too large for defined data type ``` I found this [reference](docker/buildx#395 (comment)) which indicates we could use `--platform=$BUILDPLATFORM` to avoid this error. * Adding arm32 to Debian JDK11 and Debian JDK17. * Create linux-arm32 group.
* docker: Don't build docker images for branches unless PR Give up on ARMv7 builds for now Fix typo Try again to workaround docker/buildx#395 Fails with --ofline Fix typo in Dockerfile Try to workaround docker/buildx#395 Improve build caching Build docker images
* building libzkgroup.so every time when building the docker image takes really long and is quite hacky (due to a bug in docker/buildx: see docker/buildx#395).
Breaking; Delete ARM32 builds due to the impossibility to build 32 bits binary on a 64 bits host with Cargo on QEMU. See: docker/buildx#395 (comment).
I'm trying to build a Rust project for amd64, armv7 and armv8 locally, but when I do, I get the following error:
I put a repository here for you to reproduce it.
I don't really know if it's buildx related or buildkit related (most probably buildkit). The image builds well for armv7 on an raspberry pi, but not from my linux machine.
The text was updated successfully, but these errors were encountered: