llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.01k stars 11.06k forks source link

Error while building docker image for llvm #52737

Open byteshiva opened 2 years ago

byteshiva commented 2 years ago

I'm getting the error Username/Password Authentication Failed. while executing the docker build image shell script.

   ./llvm/utils/docker/build_docker_image.sh \ 
    --source debian8 \
    --docker-repository clang-debian8 --docker-tag "staging" \
    -p clang -i stage2-install-clang -i stage2-install-clang-resource-headers \
    -- \
    -DLLVM_TARGETS_TO_BUILD=Native -DCMAKE_BUILD_TYPE=Release \
    -DBOOTSTRAP_CMAKE_BUILD_TYPE=Release \
    -DCLANG_ENABLE_BOOTSTRAP=ON -DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-resource-headers"
Username/Password Authentication Failed.
--2021-12-16 03:30:10--  https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
Connecting to github.com (github.com)|13.234.210.38|:443... connected.
HTTP request sent, awaiting response... 302 Found

Detail log available at:

https://gist.github.com/byteshiva/c04b036e3ffd1af15493cfbd43228f0e

nathanchance commented 2 years ago

This is reproducible in a plain Debian Jessie image:

$ podman run --rm -ti docker.io/debian:8
# apt update && apt install -y --no-install-recommends ca-certificates wget
...

# wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
...
--2021-12-16 16:25:21--  https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
...

It works with Stretch so perhaps it is due to an outdated ca-certificates?

It seems like the Docker images have bitrotted as the version of cmake that is downloaded (3.7.2) is older than the current minimum (3.13.4). The Dockerfile should probably be upgraded to something more modern like Buster or Bullseye (or removed entirely, if they are not being actively maintained)?