skeeto / w64devkit

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

Error when trying to build containers #14

Closed Crogarox closed 2 years ago

Crogarox commented 2 years ago

doing this on a WSL linux distro in windows 10 podman build -t w64devkit . gets me this error. Error: error building at STEP "ARG VERSION=1.10.0 PREFIX=/w64devkit BINUTILS_VERSION=2.37 BUSYBOX_VERSION=FRP-4264-gc79f13025 CTAGS_VERSION=20200824 GCC_VERSION=11.2.0 GDB_VERSION=10.2 GMP_VERSION=6.2.1 MAKE_VERSION=4.2 MINGW_VERSION=8.0.2 MPC_VERSION=1.2.1 MPFR_VERSION=4.1.0 NASM_VERSION=2.15.05 VIM_VERSION=8.2": ARG requires exactly one argument definition

Doing it as docker docker build -t w64devkit . I get this error.

9 0.873 sha256sum: WARNING: 1 computed checksum did NOT match


executor failed running [/bin/sh -c sha256sum -c $PREFIX/src/SHA256SUMS && tar xJf binutils-$BINUTILS_VERSION.tar.xz && tar xzf busybox-w32-$BUSYBOX_VERSION.tgz && tar xzf universal-ctags_0+git$CTAGS_VERSION.orig.tar.gz && tar xJf gcc-$GCC_VERSION.tar.xz && tar xJf gdb-$GDB_VERSION.tar.xz && tar xJf gmp-$GMP_VERSION.tar.xz && tar xzf mpc-$MPC_VERSION.tar.gz && tar xJf mpfr-$MPFR_VERSION.tar.xz && tar xzf make-$MAKE_VERSION.tar.gz && tar xjf mingw-w64-v$MINGW_VERSION.tar.bz2 && tar xJf nasm-$NASM_VERSION.tar.xz && tar xjf vim-$VIM_VERSION.tar.bz2]: exit code: 1

Results, the containers aren't building.

Crogarox commented 2 years ago

I was able to fix it do docker by changing in line 32 of the Dockerfile. this http://ftp.vim.org/pub/vim/unix/vim-$VIM_VERSION.tar.bz2 \ to this http://ftp.vim.org/pub/vim/unix/vim-8.2.tar.bz2 \

Podman still does not work however.

skeeto commented 2 years ago

The Podman issue I first noticed myself just the other day. Now that I'm not the only one to run into it, I've fixed it in 06038d5. Unfortunately Podman is still not quite at feature parity with Docker in that it only allows setting one ARG at a time. I had changed this in order to speed up the build as each ARG instruction creates a new layer. This is fixed by breaking ARG block back up into individual ARG instructions. (It's kind of ironic that this would benefit Podman more than Docker since its layer handling is much slower… if only Podman supported it.)

Though beware, due to WSL overhead, Podman in WSL is about an order of magnitude slower than normal: w64devkit will take something like 8 hours to build instead of 30 minutes. My Raspberry Pi building on an SD card is faster than WSL. Fortunately Docker isn't so penalized in WSL, though I'm not sure why.

The Docker issue may be a checksum file corrupted by Git. This would be the case if you cloned the repository with the Windows version of Git before w64devkit commit 696d1fc. If so, you can fix it with "git reset" and "git checkout ." any time after that commit.

If that's not it, then maybe you just got a temporary, bad response from one of the servers hosting source tarballs. If that's the case, clear the Docker cache and try again. Unless it's something particular about your internet connection, they're all working fine as of this writing. I was able to build from scratch just now. These servers have all been quite reliable so far, and I've even specifically avoided GNU mirrors since they're mostly unreliable.

Crogarox commented 2 years ago

Thanks for the reply. I tried it again on my WSL Fedora Remix instance on my windows 10 Laptop. Since podman is actually included in the yum repository. It worked! It has a an intel i7 10th generation, 16 cores, running at 2.4ghz, 32gigs of ram and an 8gig video card. It only took about one hour to build on it.

When I ran it in docker inside of windows 10 itself it only took less then 10 minutes. Hope that information is useful.

I do have a raspberrypi 4 I could try podman on.