emk / rust-musl-builder

Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Apache License 2.0
1.54k stars 193 forks source link

gzip: stdin: not in gzip format #91

Closed Ploppz closed 4 years ago

Ploppz commented 4 years ago

What did you try to do?

docker build . -t rust-musl-builder

What happened?

(just before this output, there was Building OpenSSL followed by a long list of .h files)

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   131  100   131    0     0    323      0 --:--:-- --:--:-- --:--:--   322
100    14  100    14    0     0     13      0  0:00:01  0:00:01 --:--:--    13

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
The command '/bin/sh -c echo "Building OpenSSL" &&     ls /usr/include/linux &&     sudo mkdir -p /usr/local/musl/include &&     sudo ln -s /usr/include/linux /usr/local/musl/include/linux &&     sudo ln -s /usr/include/x86_64-linux-gnu/asm /usr/local/musl/include/asm &&     sudo ln -s /usr/include/asm-generic /usr/local/musl/include/asm-generic &&     cd /tmp &&     curl -LO "https://github.com/openssl/openssl/archive/OpenSSL_$OPENSSL_VERSION.tar.gz" &&     tar xvzf "OpenSSL_$OPENSSL_VERSION.tar.gz" && cd "openssl-OpenSSL_$OPENSSL_VERSION" &&     env CC=musl-gcc ./Configure no-shared no-zlib -fPIC --prefix=/usr/local/musl -DOPENSSL_NO_SECURE_MEMORY linux-x86_64 &&     env C_INCLUDE_PATH=/usr/local/musl/include/ make depend &&     env C_INCLUDE_PATH=/usr/local/musl/include/ make &&     sudo make install &&     sudo rm /usr/local/musl/include/linux /usr/local/musl/include/asm /usr/local/musl/include/asm-generic &&     rm -r /tmp/*' returned a non-zero code: 2

Does ./test-image work?

Same error

Additional information Arch Linux, kernel 5.1.16.

Ploppz commented 4 years ago

Can I also request nightly-2020-04-06 to be built? (then I don't have to build it myself)

emk commented 4 years ago

Oh, that's not good.

I recently merged a patch to update OpenSSL source code URLs to the new hosting setup, and I guess it didn't work? We're going to need to fix the Dockerfile so that OpenSSL builds again.

Then it's easy for me to kick off new image builds.

Ploppz commented 4 years ago

I get the same error on 441e622 actually, so it seems like something outside this repo has changed.

Ploppz commented 4 years ago

It seems like the cause is 404 when downloading openssl. I can't find downloads in their github page anymore. Instead I guess we should use this https://www.openssl.org/source/old/ But I am unsure how to deal with OPENSSL_VERSION as the URL has e.g. both 1.0.2 and 1.0.2r: https://www.openssl.org/source/old/1.0.2/openssl-1.0.2r.tar.gz

emk commented 4 years ago

Thank you for finding the new location of the tarballs! I dug into this some more, and it seems that 1.0.2 will no longer be receiving security fixes.

So I'm going to build one last set of special 1.0.2 builds, and I'll make the default builds use 1.1.1. Thank you for reporting this!

emk commented 4 years ago

Also, I'm building a special nightly-2020-04-10. I hope this helps!