Closed mmitche closed 4 years ago
The failing command is something like this
/usr/bin/clang-3.9 -Wall -std=c11 -target aarch64-linux-gnu -B /crossrootfs/arm64/usr/lib/gcc/aarch64-linux-gnu -L/crossrootfs/arm64/lib/aarch64-linux-gnu --sysroot=/crossrootfs/arm64 hw.c -o hw.arm64 -rdynamic
I get similar errors when the rootfs is not present at /crossrootfs/arm64
/usr/bin/aarch64-linux-gnu-ld: cannot find crt1.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crti.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crtbegin.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc_s
/usr/bin/aarch64-linux-gnu-ld: cannot find -lc
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc
/usr/bin/aarch64-linux-gnu-ld: cannot find -lgcc_s
/usr/bin/aarch64-linux-gnu-ld: cannot find crtend.o: No such file or directory
/usr/bin/aarch64-linux-gnu-ld: cannot find crtn.o: No such file or directory
I'll try to figure out how to load the docker tag and see if I can see what is going on
From the docker build logs https://ci.dot.net/job/dotnet_dotnet-buildtools-prereqs-docker/view/Official%20Builds/job/master/job/ubuntu_16_prtest/11/console
18:06:46 I: Extracting zlib1g...
18:06:46 I: Running command: chroot /rootfs/arm64 /debootstrap/debootstrap --second-stage
18:06:46 chroot: failed to run command '/debootstrap/debootstrap': Exec format error
18:06:46 /scripts/cross/build-rootfs.sh: line 138: install_Failed: command not found
18:06:46 chroot: failed to run command 'apt-get': No such file or directory
18:06:46 /scripts/cross/build-rootfs.sh: line 146: install_Failed: command not found
18:06:46 chroot: failed to run command 'apt-get': No such file or directory
18:06:46 /scripts/cross/build-rootfs.sh: line 150: install_Failed: command not found
18:06:46 chroot: failed to run command 'apt-get': No such file or directory
18:06:46 /scripts/cross/build-rootfs.sh: line 154: install_Failed: command not found
18:06:46 chroot: failed to run command 'symlinks': No such file or directory
18:06:46 /scripts/cross/build-rootfs.sh: line 158: install_Failed: command not found
18:06:47 -- EXECUTING: docker build -t microsoft/dotnet-buildtools-prereqs:ubuntu-16.04-cross-arm64-2dd1363-20180312004842 -f src/ubuntu/16.04/cross/arm64/Dockerfile src/ubuntu/16.04/cross/arm64
The rootfs build failed.
Looks like "arm" and "arm64" rootfs images are failed to build in every log.
I can see many failures to mount binfmt_misc filesystem in the log. I wonder if that's related to the issue.
18:03:27 mount: permission denied
18:03:27 update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.
@sdmaclea Do you know what dotnet-buildtools-prereqs-docker sha generated a correct image? We may be able to rerun and diff the logs.
The current arm pipeline build is using ubuntu-14.04-cross-0cd4667-20170319080304. That should correspond to a sha of 0cd4667. Unfortunately it is 10 months before the initial commit in the public repository.
The earliest logs are from build 5 which failed on both "arm" and "arm64" on Unbuntu 16.04. I'll take a look at the 14.04 builds.
The earliest 14.04 log has the same issue. https://ci.dot.net/job/dotnet_dotnet-buildtools-prereqs-docker/view/Official%20Builds/job/master/job/ubuntu_14_prtest/5/console
15:59:10 I: Extracting zlib1g...
15:59:10 I: Running command: chroot /rootfs/arm /debootstrap/debootstrap --second-stage
15:59:10 chroot: failed to run command '/debootstrap/debootstrap': Exec format error
15:59:10 /scripts/cross/build-rootfs.sh: line 138: install_Failed: command not found
15:59:10 chroot: failed to run command 'apt-get': No such file or directory
15:59:10 /scripts/cross/build-rootfs.sh: line 146: install_Failed: command not found
15:59:10 chroot: failed to run command 'apt-get': No such file or directory
15:59:10 /scripts/cross/build-rootfs.sh: line 150: install_Failed: command not found
15:59:10 chroot: failed to run command 'apt-get': No such file or directory
15:59:10 /scripts/cross/build-rootfs.sh: line 154: install_Failed: command not found
15:59:10 chroot: failed to run command 'symlinks': No such file or directory
15:59:10 /scripts/cross/build-rootfs.sh: line 158: install_Failed: command not found
15:59:10 /rootfs/arm /
15:59:10 can't find file to patch at input line 4
15:59:10 Perhaps you used the wrong -p or --strip option?
15:59:10 The text leading up to this was:
Looks like @janvorli is right those binfmt errors are problematic.
http://neophob.com/2014/10/run-arm-binaries-in-your-docker-container-using-boot2docker/
There was also hint elsewhere that configuring the host to mount binfmt may also fix the issue
@RussKeldorph changing the milestone to release/2.1 because this will affect arm build as well.
@janvorli @sdmaclea The arm64 builds appear to still be broken, though the errors is different than before. Can you take a look?
https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_build?_a=summary&buildId=1468025