skeeto / w64devkit

Portable C and C++ Development Kit for x64 (and x86) Windows
The Unlicense
2.66k stars 183 forks source link

sha256sum: WARNING: 2 computed checksums did NOT match #144

Open Code-Horror opened 5 days ago

Code-Horror commented 5 days ago

Getting the following error when attempting to build on Windows 10 running from cmd.exe.

docker build -t w64devkit .
binutils-2.42.tar.xz: OK
busybox-w32-FRP-5301-gda71f7c57.tgz: OK
cppcheck-2.10.tar.gz: OK
ctags-6.0.0.tar.gz: OK
expat-2.6.2.tar.xz: OK
gcc-14.1.0.tar.xz: OK
gdb-14.2.tar.xz: FAILED
gmp-6.3.0.tar.xz: OK
libiconv-1.17.tar.gz: OK
make-4.4.1.tar.gz: OK
mingw-w64-v12.0.0.tar.bz2: FAILED
mpc-1.3.1.tar.gz: OK
mpfr-4.2.1.tar.xz: OK
nasm-2.15.05.tar.xz: OK
PDCurses-3.9.tar.gz: OK
vim-9.0.tar.bz2: OK
sha256sum: WARNING: 2 computed checksums did NOT match
skeeto commented 5 days ago

Looks like you either got especially unlucky and caught two unrelated hosts temporarily down at once, or you experienced a local network issue, hopefully just temporary. If you'd like to investigate further, start a Bash container on the failed stage. I don't know how to find the image ID with BuildKit — appears to be currently impossible due to BuildKit design flaws — but the "legacy" builder (set DOCKER_BUILDKIT=0) prints the image ID just before the failure. Start the container like so:

$ docker run --rm -it IMAGEID

Then examine the two bad files. They're probably HTML and contain an error message from the server, or perhaps a message from some meddling proxy. It might point you to the problem.

If you'd like to try your luck without investigating, delete the layer with the bad download or build with cache disabled (--no-cache). Then hopefully it works on a second attempt. When it's past the SHA-256 check you're in the clear, and internet access is no longer required.

Another option for investigating is to download the two bad files in your browser, on the same network, and see what happens. URLs are near the top of Dockerfile.

(Building via cmd.exe has no impact on this issue, so feel free to keep using it. I still appreciate that you've shared such details.)