bazelbuild/bazel

Bootstrapping Bazel in Alpine+ARM hangs forever

Open

#17.220 aperta il 15 gen 2023

Vedi su GitHub
 (13 commenti) (0 reazioni) (0 assegnatari)Java (4465 fork)batch import
P3help wantedteam-OSStype: bug

Metriche repository

Star
 (25.384 star)
Metriche merge PR
 (Merge medio 22g 20h) (77 PR mergiate in 30 g)

Descrizione

Description of the bug:

Hi there, awhile ago I opened: https://github.com/bazelbuild/bazel/issues/16484

I was able to get around the issue by running the container on an x86 Linux machine. I am now trying to do the same thing with aarch64. I assumed the issue was exclusive to Docker just being bad on Mac; however, I am running into the same issue on EC2. I've tried various versions of Alpine and Bazel (5.3, 6.0) with no success. This is what I run to bootstrap:

I've tried this on these EC2 AMIs, as well as on a Raspberry Pi with Alpine 3.16 installed:

  • alpine-ami-3.14.2-aarch64-r0 ami-00604621aea32b1f5
  • alpine-3.16.0-x86_64-bios-cloudinit-r0 ami-0c9f21a3f1772d2d8

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

This is what I've been using to bootstrap:

export BAZEL_VERSION="5.3.0" \
    BAZEL_SHA256SUM="ee801491ff0ec3a562422322a033c9afe8809b64199e4a94c7433d4e14e6b921  bazel-5.3.0-dist.zip" \
    JAVA_HOME="/usr/lib/jvm/default-jvm"

apk update && apk upgrade && \
    apk add --no-cache python3 py3-pip python3-dev && \
    apk add --no-cache libstdc++ openjdk11 && \
    apk add --no-cache bash curl git wget && \
    apk add --no-cache musl-dev make libexecinfo libexecinfo-dev && \
    apk add --no-cache coreutils gcc g++ linux-headers unzip zip && \
    apk add --no-cache automake gcc subversion && \
    DIR=$(mktemp -d) && cd ${DIR} && \
    curl -sLO https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip && \
    echo ${BAZEL_SHA256SUM} | sha256sum --check && \
    unzip bazel-${BAZEL_VERSION}-dist.zip && \
    EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" bash ./compile.sh && \
    cp ${DIR}/output/bazel /usr/local/bin/ && \
    rm -rf ${DIR}

Which operating system are you running Bazel on?

Alpine

What is the output of bazel info release?

n/a

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

See above

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

Most of the time is just hangs at:

🍃  Building Bazel from scratch......
🍃  Building Bazel with Bazel.
.

Or something like patching repository for one of the first few packages

Guida contributor