(for PR #29110)

2025-12-30 15:25.25: New job: build llvm.21-static, using opam dev
                              from https://github.com/ocaml/opam-repository.git#refs/pull/29110/head (a16fbbbc4ad239dba151649395b1e98d3d337d30)
                              on alpine-3.22-ocaml-5.4/amd64

To reproduce locally:

cd $(mktemp -d)
git clone --recursive "https://github.com/ocaml/opam-repository.git" && cd "opam-repository" && git fetch origin "refs/pull/29110/head" && git reset --hard a16fbbbc
git fetch origin master
git merge --no-edit f2d102f951a5dc2af6db218c6aef53c80186295a
cat > ../Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:alpine-3.22-ocaml-5.4@sha256:5122db4b870413cb902d3ebf511b7151563795e0db377625bf3bda7287004761
USER 1000:1000
WORKDIR /home/opam
RUN sudo ln -f /usr/bin/opam-dev /usr/bin/opam
RUN opam init --reinit -ni
RUN opam option solver=builtin-0install && opam config report
ENV OPAMDOWNLOADJOBS="1"
ENV OPAMERRLOGLEN="0"
ENV OPAMPRECISETRACKING="1"
ENV CI="true"
ENV OPAM_REPO_CI="true"
RUN rm -rf opam-repository/
COPY --chown=1000:1000 . opam-repository/
RUN opam repository set-url --strict default opam-repository/
RUN opam update --depexts || true
RUN opam pin add -k version -yn llvm.21-static 21-static
RUN opam reinstall llvm.21-static; \
    res=$?; \
    test "$res" != 31 && exit "$res"; \
    export OPAMCLI=2.0; \
    build_dir=$(opam var prefix)/.opam-switch/build; \
    failed=$(ls "$build_dir"); \
    partial_fails=""; \
    for pkg in $failed; do \
    if opam show -f x-ci-accept-failures: "$pkg" | grep -qF "\"alpine-3.22\""; then \
    echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field."; \
    fi; \
    test "$pkg" != 'llvm.21-static' && partial_fails="$partial_fails $pkg"; \
    done; \
    test "${partial_fails}" != "" && echo "opam-repo-ci detected dependencies failing: ${partial_fails}"; \
    exit 1

END-OF-DOCKERFILE
docker build -f ../Dockerfile .

2025-12-30 15:25.25: Using cache hint "ocaml/opam:alpine-3.22-ocaml-5.4@sha256:5122db4b870413cb902d3ebf511b7151563795e0db377625bf3bda7287004761-llvm.21-static-a16fbbbc4ad239dba151649395b1e98d3d337d30"
2025-12-30 15:25.25: Using OBuilder spec:
((from ocaml/opam:alpine-3.22-ocaml-5.4@sha256:5122db4b870413cb902d3ebf511b7151563795e0db377625bf3bda7287004761)
 (user (uid 1000) (gid 1000))
 (workdir /home/opam)
 (run (shell "sudo ln -f /usr/bin/opam-dev /usr/bin/opam"))
 (run (network host)
      (shell "opam init --reinit --config .opamrc-sandbox -ni"))
 (run (shell "opam option solver=builtin-0install && opam config report"))
 (env OPAMDOWNLOADJOBS 1)
 (env OPAMERRLOGLEN 0)
 (env OPAMPRECISETRACKING 1)
 (env CI true)
 (env OPAM_REPO_CI true)
 (run (shell "rm -rf opam-repository/"))
 (copy (src .) (dst opam-repository/))
 (run (shell "opam repository set-url --strict default opam-repository/"))
 (run (network host)
      (shell "opam update --depexts || true"))
 (run (shell "opam pin add -k version -yn llvm.21-static 21-static"))
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
      (network host)
      (shell  "opam reinstall llvm.21-static;\
             \n        res=$?;\
             \n        test \"$res\" != 31 && exit \"$res\";\
             \n        export OPAMCLI=2.0;\
             \n        build_dir=$(opam var prefix)/.opam-switch/build;\
             \n        failed=$(ls \"$build_dir\");\
             \n        partial_fails=\"\";\
             \n        for pkg in $failed; do\
             \n          if opam show -f x-ci-accept-failures: \"$pkg\" | grep -qF \"\\\"alpine-3.22\\\"\"; then\
             \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
             \n          fi;\
             \n          test \"$pkg\" != 'llvm.21-static' && partial_fails=\"$partial_fails $pkg\";\
             \n        done;\
             \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
             \n        exit 1"))
)

2025-12-30 15:25.25: Waiting for resource in pool OCluster
2025-12-30 15:25.25: Waiting for worker…
2025-12-30 15:27.44: Got resource from pool OCluster
Building on clete
All commits already cached
HEAD is now at f2d102f951 Merge pull request #29150 from raphael-proust/llvm-20-21-only-cosmetics
Merge made by the 'ort' strategy.
 packages/conf-llvm-shared/conf-llvm-shared.20/opam | 34 +++++++++++
 packages/conf-llvm-shared/conf-llvm-shared.21/opam | 34 +++++++++++
 packages/conf-llvm-static/conf-llvm-static.20/opam | 34 +++++++++++
 packages/conf-llvm-static/conf-llvm-static.21/opam | 34 +++++++++++
 packages/llvm/llvm.20-shared/opam                  | 67 ++++++++++++++++++++++
 packages/llvm/llvm.20-static/opam                  | 67 ++++++++++++++++++++++
 packages/llvm/llvm.21-shared/opam                  | 67 ++++++++++++++++++++++
 packages/llvm/llvm.21-static/opam                  | 67 ++++++++++++++++++++++
 8 files changed, 404 insertions(+)
 create mode 100644 packages/conf-llvm-shared/conf-llvm-shared.20/opam
 create mode 100644 packages/conf-llvm-shared/conf-llvm-shared.21/opam
 create mode 100644 packages/conf-llvm-static/conf-llvm-static.20/opam
 create mode 100644 packages/conf-llvm-static/conf-llvm-static.21/opam
 create mode 100644 packages/llvm/llvm.20-shared/opam
 create mode 100644 packages/llvm/llvm.20-static/opam
 create mode 100644 packages/llvm/llvm.21-shared/opam
 create mode 100644 packages/llvm/llvm.21-static/opam

(from ocaml/opam:alpine-3.22-ocaml-5.4@sha256:5122db4b870413cb902d3ebf511b7151563795e0db377625bf3bda7287004761)
Unable to find image 'ocaml/opam:alpine-3.22-ocaml-5.4@sha256:5122db4b870413cb902d3ebf511b7151563795e0db377625bf3bda7287004761' locally
docker.io/ocaml/opam@sha256:5122db4b870413cb902d3ebf511b7151563795e0db377625bf3bda7287004761: Pulling from ocaml/opam
2d35ebdb57d9: Already exists
f63fa0955e1c: Already exists
d1aff334d2ef: Already exists
dd7ef0713d60: Already exists
1cb85b1771c1: Already exists
b3e3cbca8fe5: Already exists
e20f2edd147c: Already exists
2a81809d2792: Already exists
44d45904e0bf: Already exists
e4766861c56b: Already exists
781637641c53: Already exists
7a3635ad3eff: Already exists
a17b51910e9e: Already exists
ebefb05f3452: Already exists
7516504988c4: Already exists
6de436e58aaa: Already exists
6de436e58aaa: Already exists
c95d51a1d4cc: Already exists
4f4fb700ef54: Already exists
958c68e99d31: Already exists
3276c8259ea4: Already exists
dc258c8006b5: Already exists
762484f20604: Already exists
e420826a58be: Already exists
21ebbf1cf394: Already exists
fcab148fc6b3: Already exists
0a5763305413: Already exists
0bb0efb41734: Already exists
99400a979ef1: Already exists
57e03fc374af: Already exists
e6ea8c92b8c1: Already exists
9f382f7bc8ee: Already exists
b0d06a6c6175: Already exists
4d2a1c175ac8: Already exists
8304e3cd4887: Already exists
0fc2673dbd75: Already exists
7fc8a2a61f7b: Already exists
deb94476d1ac: Pulling fs layer
92acfd196618: Pulling fs layer
4bd334c6db61: Pulling fs layer
aa88082ae8a5: Pulling fs layer
c08280a270d1: Pulling fs layer
668723861353: Pulling fs layer
aa88082ae8a5: Waiting
c08280a270d1: Waiting
668723861353: Waiting
92acfd196618: Verifying Checksum
92acfd196618: Download complete
aa88082ae8a5: Verifying Checksum
aa88082ae8a5: Download complete
c08280a270d1: Verifying Checksum
c08280a270d1: Download complete
668723861353: Verifying Checksum
668723861353: Download complete
deb94476d1ac: Verifying Checksum
deb94476d1ac: Download complete
deb94476d1ac: Pull complete
92acfd196618: Pull complete
4bd334c6db61: Verifying Checksum
4bd334c6db61: Download complete
4bd334c6db61: Pull complete
aa88082ae8a5: Pull complete
c08280a270d1: Pull complete
668723861353: Pull complete
Digest: sha256:5122db4b870413cb902d3ebf511b7151563795e0db377625bf3bda7287004761
Status: Downloaded newer image for ocaml/opam@sha256:5122db4b870413cb902d3ebf511b7151563795e0db377625bf3bda7287004761
2025-12-30 15:28.57 ---> saved as "6311c9d9753a24bb17320a647aa83f4150d5f340f4c7839df474104a3b0f21e2"

/: (user (uid 1000) (gid 1000))

/: (workdir /home/opam)

/home/opam: (run (shell "sudo ln -f /usr/bin/opam-dev /usr/bin/opam"))
2025-12-30 15:28.58 ---> saved as "99e5c79609bb5a18620490422efc9479083864bfefc0b474b256e5d54c710aae"

/home/opam: (run (network host)
                 (shell "opam init --reinit --config .opamrc-sandbox -ni"))
Configuring from /home/opam/.opamrc-sandbox, then /home/opam/.opamrc, and finally from built-in defaults.
Checking for available remotes: rsync and local, git.
  - you won't be able to use mercurial repositories unless you install the hg command on your system.
  - you won't be able to use darcs repositories unless you install the darcs command on your system.

This version of opam requires an update to the layout of /home/opam/.opam from version 2.0 to version 2.2, which can't be reverted.
You may want to back it up before going further.

[NOTE] The 'jobs' option was reset, its value was 255 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using:
           opam option jobs=255 --global
Continue? [Y/n] y
Format upgrade done.

<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
2025-12-30 15:29.24 ---> saved as "1068c22130bec5fbad25faf129ee39de8787aa4f1e2057fcbbd6ac6d2d8695a0"

/home/opam: (run (shell "opam option solver=builtin-0install && opam config report"))
Set to 'builtin-0install' the field solver in global configuration
# opam config report
# opam-version         2.5.0
# self-upgrade         no
# system               arch=x86_64 os=linux os-distribution=alpine os-version=3.22.2
# solver               builtin-0install
# install-criteria     -changed,-count[avoid-version,solution]
# upgrade-criteria     -count[avoid-version,solution]
# jobs                 71
# repositories         1 (version-controlled)
# pinned               1 (version)
# current-switch       5.4
# invariant            ["ocaml-base-compiler" {>= "5.4.0"}]
# compiler-packages    ocaml-base-compiler.5.4.0, ocaml-compiler.5.4.0, ocaml-options-vanilla.1
# ocaml:native         true
# ocaml:native-tools   true
# ocaml:native-dynlink true
# ocaml:stubsdir       /home/opam/.opam/5.4/lib/ocaml/stublibs:/home/opam/.opam/5.4/lib/ocaml
# ocaml:preinstalled   false
# ocaml:compiler       5.4.0
2025-12-30 15:29.25 ---> saved as "8ee4327e22fa805fd72be48794e674474726816390cd5472cceed4a256fd93f7"

/home/opam: (env OPAMDOWNLOADJOBS 1)

/home/opam: (env OPAMERRLOGLEN 0)

/home/opam: (env OPAMPRECISETRACKING 1)

/home/opam: (env CI true)

/home/opam: (env OPAM_REPO_CI true)

/home/opam: (run (shell "rm -rf opam-repository/"))
2025-12-30 15:29.34 ---> saved as "7068f4ac37bce4e0736f2c0e6aa51e63b623054907a7dffd823d2603c75f5a2e"

/home/opam: (copy (src .) (dst opam-repository/))
2025-12-30 15:29.41 ---> saved as "dce22af56c7db0edb06c7b980ad8d5b61b6a2b5ba32e18f92e3507ed65658f19"

/home/opam: (run (shell "opam repository set-url --strict default opam-repository/"))
[default] Initialised
2025-12-30 15:30.02 ---> saved as "03f4af9be6cb2d1c1a734edb9becaee8c7d0bf62d94792845d3cce7999b04539"

/home/opam: (run (network host)
                 (shell "opam update --depexts || true"))
+ /usr/bin/sudo "apk" "update"
- fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz
- fetch https://dl-cdn.alpinelinux.org/alpine/v3.22/community/x86_64/APKINDEX.tar.gz
- fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
- fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
- fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
- v3.22.2-323-g6078141c2a5 [https://dl-cdn.alpinelinux.org/alpine/v3.22/main]
- v3.22.2-325-gffb20bd62d9 [https://dl-cdn.alpinelinux.org/alpine/v3.22/community]
- v20251224-185-g4b274c58ffb [https://dl-cdn.alpinelinux.org/alpine/edge/main]
- v20251224-206-g81f93cec053 [https://dl-cdn.alpinelinux.org/alpine/edge/community]
- v20251224-205-g0cd4d6caf1f [https://dl-cdn.alpinelinux.org/alpine/edge/testing]
- OK: 60604 distinct packages available
2025-12-30 15:30.04 ---> saved as "4ef698df42fe34631fd860bf1967fecd32eb95698d8e38e29a72870742ced2e5"

/home/opam: (run (shell "opam pin add -k version -yn llvm.21-static 21-static"))
llvm is now pinned to version 21-static
2025-12-30 15:30.05 ---> saved as "dbce6bfcaf739397b790c292e40de7a78f3caff09164c40a5fe68ed03e1fcb9c"

/home/opam: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
                 (network host)
                 (shell  "opam reinstall llvm.21-static;\
                        \n        res=$?;\
                        \n        test \"$res\" != 31 && exit \"$res\";\
                        \n        export OPAMCLI=2.0;\
                        \n        build_dir=$(opam var prefix)/.opam-switch/build;\
                        \n        failed=$(ls \"$build_dir\");\
                        \n        partial_fails=\"\";\
                        \n        for pkg in $failed; do\
                        \n          if opam show -f x-ci-accept-failures: \"$pkg\" | grep -qF \"\\\"alpine-3.22\\\"\"; then\
                        \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
                        \n          fi;\
                        \n          test \"$pkg\" != 'llvm.21-static' && partial_fails=\"$partial_fails $pkg\";\
                        \n        done;\
                        \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
                        \n        exit 1"))
llvm.21-static is not installed. Install it? [Y/n] y
The following actions will be performed:
=== install 11 packages
  - install conf-bash         1                  [required by conf-llvm-static]
  - install conf-cmake        1                  [required by llvm]
  - install conf-llvm-static  21                 [required by llvm]
  - install csexp             1.5.2              [required by dune-configurator]
  - install ctypes            0.24.0             [required by llvm]
  - install dune              3.20.2             [required by ctypes]
  - install dune-configurator 3.20.2             [required by ctypes]
  - install integers          0.7.0              [required by ctypes]
  - install llvm              21-static (pinned)
  - install ocamlfind         1.9.8              [required by llvm]
  - install stdlib-shims      0.3.0              [required by integers]

The following system packages will first need to be installed:
    cmake llvm21-dev

<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><><><>

opam believes some required external dependencies are missing. opam can:
> 1. Run apk to install them (may need root/sudo access)
  2. Display the recommended apk command and wait while you run it manually (e.g. in another terminal)
  3. Continue anyway, and, upon success, permanently register that this external dependency is present, but not detectable
  4. Abort the installation

[1/2/3/4] 1

+ /usr/bin/sudo "apk" "add" "cmake" "llvm21-dev"
- ERROR: unable to select packages:
-   llvm21-libs-21.1.8-r0:
-     masked in: @edge
-     satisfies: llvm21-dev-21.1.8-r0[llvm21-libs=21.1.8-r0]
-                llvm21-21.1.8-r0[so:libLLVM.so.21.1]
-                llvm21-linker-tools-21.1.8-r0[so:libLLVM.so.21.1]
-   llvm21-linker-tools-21.1.8-r0:
-     masked in: @edge
-     satisfies: llvm21-21.1.8-r0[llvm21-linker-tools=21.1.8-r0]
-   llvm21-21.1.8-r0:
-     masked in: @edge
-     satisfies: llvm21-dev-21.1.8-r0[llvm21=21.1.8-r0]
-   llvm21-test-utils-21.1.8-r0:
-     masked in: @edge
-     satisfies: llvm21-dev-21.1.8-r0[llvm21-test-utils=21.1.8-r0]
-   llvm21-dev-21.1.8-r0:
-     masked in: @edge
-     satisfies: world[llvm21-dev]
[ERROR] System package install failed with exit code 5 at command:
            sudo apk add cmake llvm21-dev
[ERROR] These packages are still missing: cmake llvm21-dev

[NOTE] You can retry with '--assume-depexts' to skip this check, or run 'opam option depext=false' to permanently disable handling of system packages.

"/usr/bin/env" "bash" "-c" "opam reinstall llvm.21-static;
        res=$?;
        test "$res" != 31 && exit "$res";
        export OPAMCLI=2.0;
        build_dir=$(opam var prefix)/.opam-switch/build;
        failed=$(ls "$build_dir");
        partial_fails="";
        for pkg in $failed; do
          if opam show -f x-ci-accept-failures: "$pkg" | grep -qF "\"alpine-3.22\""; then
            echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.";
          fi;
          test "$pkg" != 'llvm.21-static' && partial_fails="$partial_fails $pkg";
        done;
        test "${partial_fails}" != "" && echo "opam-repo-ci detected dependencies failing: ${partial_fails}";
        exit 1" failed with exit status 10
2025-12-30 15:30.26: Job failed: Failed: Build failed
2025-12-30 15:30.26: Log analysis:
2025-12-30 15:30.26: >>> 
[ERROR] System package install failed with exit code 5 at command:
 (score = 20)
2025-12-30 15:30.26: >>> 
[ERROR] These packages are still missing: cmake llvm21-dev
 (score = 20)
2025-12-30 15:30.26: System package install failed with exit code 5 at command: