(for PR #27768)

2025-04-16 21:23.01: New job: build bitwuzla-cxx.0.7.0, using opam 2.3
                              from https://github.com/ocaml/opam-repository.git#refs/pull/27768/head (55a47416d532dc829d9111297970934a21a1b1c4)
                              on alpine-3.21-ocaml-5.3/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/27768/head" && git reset --hard 55a47416
git fetch origin master
git merge --no-edit d1cbf81c2da41aacd8925bea031fdc109945f711
cat > ../Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:alpine-3.21-ocaml-5.3@sha256:9712446faad000d6728ff7ac0061680a5ba06e2c575346f3866e376d1e4e8cd9
USER 1000:1000
WORKDIR /home/opam
RUN sudo ln -f /usr/bin/opam-2.3 /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 bitwuzla-cxx.0.7.0 0.7.0
RUN opam reinstall bitwuzla-cxx.0.7.0; \
    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.21\""; then \
    echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field."; \
    fi; \
    test "$pkg" != 'bitwuzla-cxx.0.7.0' && 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-04-16 21:23.01: Using cache hint "ocaml/opam:alpine-3.21-ocaml-5.3@sha256:9712446faad000d6728ff7ac0061680a5ba06e2c575346f3866e376d1e4e8cd9-bitwuzla-cxx.0.7.0-55a47416d532dc829d9111297970934a21a1b1c4"
2025-04-16 21:23.01: Using OBuilder spec:
((from ocaml/opam:alpine-3.21-ocaml-5.3@sha256:9712446faad000d6728ff7ac0061680a5ba06e2c575346f3866e376d1e4e8cd9)
 (user (uid 1000) (gid 1000))
 (workdir /home/opam)
 (run (shell "sudo ln -f /usr/bin/opam-2.3 /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 bitwuzla-cxx.0.7.0 0.7.0"))
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
      (network host)
      (shell  "opam reinstall bitwuzla-cxx.0.7.0;\
             \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.21\\\"\"; then\
             \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
             \n          fi;\
             \n          test \"$pkg\" != 'bitwuzla-cxx.0.7.0' && partial_fails=\"$partial_fails $pkg\";\
             \n        done;\
             \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
             \n        exit 1"))
)

2025-04-16 21:23.01: Waiting for resource in pool OCluster
2025-04-16 21:23.01: Waiting for worker…
2025-04-16 21:23.02: Got resource from pool OCluster
Building on x86-bm-c2.sw.ocaml.org
All commits already cached
HEAD is now at d1cbf81c2d Merge pull request #27767 from toots/opam-publish-ffmpeg.1.2.4
Updating d1cbf81c2d..55a47416d5
Fast-forward
 packages/bitwuzla-cxx/bitwuzla-cxx.0.7.0/opam | 50 +++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 packages/bitwuzla-cxx/bitwuzla-cxx.0.7.0/opam

(from ocaml/opam:alpine-3.21-ocaml-5.3@sha256:9712446faad000d6728ff7ac0061680a5ba06e2c575346f3866e376d1e4e8cd9)
Unable to find image 'ocaml/opam:alpine-3.21-ocaml-5.3@sha256:9712446faad000d6728ff7ac0061680a5ba06e2c575346f3866e376d1e4e8cd9' locally
docker.io/ocaml/opam@sha256:9712446faad000d6728ff7ac0061680a5ba06e2c575346f3866e376d1e4e8cd9: Pulling from ocaml/opam
d963a7719668: Pulling fs layer
d963a7719668: Verifying Checksum
d963a7719668: Download complete
d963a7719668: Pull complete
Digest: sha256:9712446faad000d6728ff7ac0061680a5ba06e2c575346f3866e376d1e4e8cd9
Status: Downloaded newer image for ocaml/opam@sha256:9712446faad000d6728ff7ac0061680a5ba06e2c575346f3866e376d1e4e8cd9
2025-04-16 21:23.20 ---> using "6d1cfe79e2ed44c9e232a48b769e24b654ef4f3d50f0f626cb7a0cc14094a674" from cache

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

/: (workdir /home/opam)

/home/opam: (run (shell "sudo ln -f /usr/bin/opam-2.3 /usr/bin/opam"))
2025-04-16 21:23.20 ---> using "5ab2ac4f739c86e6ba738277863f0397e65c7b6fa1bffaca040aef2acb5bc109" from cache

/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 development 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.

Continue? [y/n] y
[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
Format upgrade done.

<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
2025-04-16 21:23.20 ---> using "f032e710ad092c70b012a89294eb72c842298520a929792bedf2d1c896c2a861" from cache

/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.3.0 (35acd0c5abc5e66cdbd5be16ba77aa6c33a4c724)
# self-upgrade         no
# system               arch=x86_64 os=linux os-distribution=alpine os-version=3.21.3
# solver               builtin-0install
# install-criteria     -changed,-count[avoid-version,solution]
# upgrade-criteria     -count[avoid-version,solution]
# jobs                 39
# repositories         1 (version-controlled)
# pinned               1 (version)
# current-switch       5.3
# invariant            ["ocaml-base-compiler" {>= "5.3.0"}]
# compiler-packages    ocaml-base-compiler.5.3.0, ocaml-compiler.5.3.0, ocaml-options-vanilla.1
# ocaml:native         true
# ocaml:native-tools   true
# ocaml:native-dynlink true
# ocaml:stubsdir       /home/opam/.opam/5.3/lib/ocaml/stublibs:/home/opam/.opam/5.3/lib/ocaml
# ocaml:preinstalled   false
# ocaml:compiler       5.3.0
2025-04-16 21:23.20 ---> using "0ab77c576140ce2314a6bae32be6737396bc8d8a82146ae3b1057c57cd8f0c14" from cache

/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-04-16 21:23.20 ---> using "5107c199a56f2e424500c2366fbfff64858b4d2afb64a1aab77bc8c287434b5f" from cache

/home/opam: (copy (src .) (dst opam-repository/))
2025-04-16 21:23.27 ---> saved as "bb270b311aae6f8bc112d7a9474a859b84cb1cdd57024462b250418ff7b1a6e2"

/home/opam: (run (shell "opam repository set-url --strict default opam-repository/"))
[default] Initialised
2025-04-16 21:23.51 ---> saved as "6e4147889e910bff6f5eb6985174486ec5fcfe4c3bacaf49ecfd0f14ef2d3c87"

/home/opam: (run (network host)
                 (shell "opam update --depexts || true"))
+ /usr/bin/sudo "apk" "update"
- fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz
- fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/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.21.3-336-g7bbc1e1ec7b [https://dl-cdn.alpinelinux.org/alpine/v3.21/main]
- v3.21.3-335-ga929ea208ed [https://dl-cdn.alpinelinux.org/alpine/v3.21/community]
- v20250108-5887-g66d7f292e11 [https://dl-cdn.alpinelinux.org/alpine/edge/main]
- v20250108-5886-g390bcbee208 [https://dl-cdn.alpinelinux.org/alpine/edge/community]
- v20250108-5883-g24fe768b569 [https://dl-cdn.alpinelinux.org/alpine/edge/testing]
- OK: 57732 distinct packages available
2025-04-16 21:23.53 ---> saved as "5b2de3c9501284e631cfd3e4ba7bf1a9e9ebe8489b50348ad8254a280e0e9d0a"

/home/opam: (run (shell "opam pin add -k version -yn bitwuzla-cxx.0.7.0 0.7.0"))
bitwuzla-cxx is now pinned to version 0.7.0
2025-04-16 21:23.53 ---> saved as "59763fc31b04f86d5e9ed38bbc4464cc68df29b2ed6041a6b203de45ab52824c"

/home/opam: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
                 (network host)
                 (shell  "opam reinstall bitwuzla-cxx.0.7.0;\
                        \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.21\\\"\"; then\
                        \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
                        \n          fi;\
                        \n          test \"$pkg\" != 'bitwuzla-cxx.0.7.0' && partial_fails=\"$partial_fails $pkg\";\
                        \n        done;\
                        \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
                        \n        exit 1"))
bitwuzla-cxx.0.7.0 is not installed. Install it? [y/n] y
The following actions will be performed:
=== install 9 packages
  - install bitwuzla-cxx    0.7.0 (pinned)
  - install conf-g++        1.0            [required by bitwuzla-cxx]
  - install conf-gcc        1.0            [required by bitwuzla-cxx]
  - install conf-git        1.1            [required by bitwuzla-cxx]
  - install conf-gmp        5              [required by zarith]
  - install conf-pkg-config 4              [required by zarith]
  - install dune            3.18.0         [required by bitwuzla-cxx]
  - install ocamlfind       1.9.8          [required by zarith]
  - install zarith          1.14           [required by bitwuzla-cxx]

The following system packages will first need to be installed:
    gmp-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" "gmp-dev"
- (1/2) Installing libgmpxx (6.3.0-r2)
- (2/2) Installing gmp-dev (6.3.0-r2)
- OK: 310 MiB in 104 packages

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved bitwuzla-cxx.0.7.0  (https://github.com/bitwuzla/ocaml-bitwuzla/releases/download/0.7.0/bitwuzla-cxx-0.7.0.tbz)
-> retrieved conf-gmp.5  (cached)
-> installed conf-gcc.1.0
-> installed conf-git.1.1
-> installed conf-g++.1.0
-> installed conf-gmp.5
-> installed conf-pkg-config.4
-> retrieved dune.3.18.0  (cached)
-> retrieved ocamlfind.1.9.8  (cached)
-> retrieved zarith.1.14  (cached)
-> installed ocamlfind.1.9.8
-> installed zarith.1.14
-> installed dune.3.18.0
-> installed bitwuzla-cxx.0.7.0
Done.
# To update the current shell environment, run: eval $(opam env)
2025-04-16 21:26.06 ---> saved as "ba4ef26dbea9409ef15aef74dc213a33b5c09744e9535a0db20e42a4da9c3846"
Job succeeded
2025-04-16 21:26.12: Job succeeded