-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Cargo build failed with spurious network error on docker hub auto builder and AWS T2 instance #7451
Comments
I'm not sure exactly what's wrong, but this seems to be an issue with the qemu environment and maybe its interaction with docker. The Inside the qemu environment, create a file, a.c: #include <dirent.h>
#include <stdio.h>
#include <sys/errno.h>
int main() {
DIR *dirp;
struct dirent *dp;
dirp = opendir(".");
if (dirp == NULL) {
perror("opendir failed");
return 1;
}
while ((dp = readdir(dirp)) != NULL) {
printf("%s\n", dp->d_name);
}
if (errno) {
perror("readdir failed");
return 1;
}
closedir(dirp);
} The run:
should result in:
Something is maybe wrong with the qemu environment? My suspicion is that it could be related to large file support. However, |
Run your sample on my PC (where initial case work ok):
Result:
|
Command inside container from previous test:
|
Now run same on docker hub. (https://github.com/iav/test1)
|
I too am getting this issue. Anyone got a workaround? QEMU emulating Arm here. |
This thread is for the underlying bug: https://lkml.org/lkml/2018/12/28/461 |
I'm going to close this, as it seems unrelated to Cargo. |
Cargo could provide more descriptive diagnostic messages. |
I have this same issue. I asked in qemu IRC and there is already a bug report here https://bugs.launchpad.net/qemu/+bug/1805913. |
I experienced this issue today on macOS when using buildx to build for linux/arm/v7. |
For those searching for this issue and might stumble across this in the future: discussion moved over here, and the workaround found was to mount a tmpfs on |
I also tried to crosscompile some rust project for the raspberry pi and came across this issue when using qemu to run an arm docker image. In my case the workaround was something like this:
|
Have similar error trying to do a cross-compilation in docker.
I got it in automatic builder on a Docker Hub, then on a wps in Amazon S3.
This dockerfile (scenario) works on my x64 pc.
before run cross-platform image, qemu need to be added to host system.
Fast and easy for container runner
docker run --rm --privileged multiarch/qemu-user-static:register --reset
It's not a "simple" network error, like dns not work, site unreachable, proxy should be used, proxy auth etc. Problem occurs on machine free internet access, and target sites reachable from same sessions with wget
error:
(in docker container)
Start of Dockerfile to reproduce inside AWS t2.medium instance, image id
ubuntu/images/hvm-ssd/ubuntu-disco-19.04-amd64-server-20190819 (ami-00290d66f0da25f73)
The text was updated successfully, but these errors were encountered: