(for PR #19229)

2024-04-17 19:21.17: New job: build conf-llvm.3.8, using opam dev
                              from https://github.com/ocaml/opam-repository.git#refs/pull/19229/head (e200798bccb6e55ca7626dbc7b08164746413023)
                              on opensuse-tumbleweed-ocaml-4.14/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/19229/head" && git reset --hard e200798b
git fetch origin master
git merge --no-edit f089d8564db935c703bea70a4b3d8335ffa1bef3
cat > ../Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:opensuse-tumbleweed-ocaml-4.14@sha256:ebbbcd3f3ce8b102c5fdb7fb8b4b40c9b51fdf9d32e082cc1f0785d0d12bc9dd
USER 1000:1000
WORKDIR /home/opam
RUN sudo ln -f /usr/bin/opam-dev /usr/bin/opam
RUN opam init --reinit -ni
RUN uname -rs && opam exec -- ocaml -version && opam --version
ENV OPAMDOWNLOADJOBS="1"
ENV OPAMERRLOGLEN="0"
ENV OPAMSOLVERTIMEOUT="500"
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
ENV OPAMCRITERIA="-removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed"
ENV OPAMFIXUPCRITERIA="-removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed"
ENV OPAMUPGRADECRITERIA="-removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed"
RUN opam pin add -k version -yn conf-llvm.3.8 3.8
RUN opam reinstall conf-llvm.3.8; \
    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 "\"opensuse-tumbleweed\""; then \
    echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field."; \
    fi; \
    test "$pkg" != 'conf-llvm.3.8' && 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 .

2024-04-17 19:21.17: Using cache hint "ocaml/opam:opensuse-tumbleweed-ocaml-4.14@sha256:ebbbcd3f3ce8b102c5fdb7fb8b4b40c9b51fdf9d32e082cc1f0785d0d12bc9dd-conf-llvm.3.8-e200798bccb6e55ca7626dbc7b08164746413023"
2024-04-17 19:21.17: Using OBuilder spec:
((from ocaml/opam:opensuse-tumbleweed-ocaml-4.14@sha256:ebbbcd3f3ce8b102c5fdb7fb8b4b40c9b51fdf9d32e082cc1f0785d0d12bc9dd)
 (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 "uname -rs && opam exec -- ocaml -version && opam --version"))
 (env OPAMDOWNLOADJOBS 1)
 (env OPAMERRLOGLEN 0)
 (env OPAMSOLVERTIMEOUT 500)
 (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"))
 (env OPAMCRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)
 (env OPAMFIXUPCRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)
 (env OPAMUPGRADECRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)
 (run (shell "opam pin add -k version -yn conf-llvm.3.8 3.8"))
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
      (network host)
      (shell  "opam reinstall conf-llvm.3.8;\
             \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 \"\\\"opensuse-tumbleweed\\\"\"; then\
             \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
             \n          fi;\
             \n          test \"$pkg\" != 'conf-llvm.3.8' && partial_fails=\"$partial_fails $pkg\";\
             \n        done;\
             \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
             \n        exit 1"))
)

2024-04-17 19:21.17: Waiting for resource in pool OCluster
2024-04-17 19:31.58: Waiting for worker…
2024-04-17 19:34.37: Got resource from pool OCluster
Building on doris.caelum.ci.dev
All commits already cached
Updating files:  79% (26529/33522)
Updating files:  80% (26818/33522)
Updating files:  81% (27153/33522)
Updating files:  82% (27489/33522)
Updating files:  83% (27824/33522)
Updating files:  84% (28159/33522)
Updating files:  85% (28494/33522)
Updating files:  86% (28829/33522)
Updating files:  87% (29165/33522)
Updating files:  88% (29500/33522)
Updating files:  89% (29835/33522)
Updating files:  90% (30170/33522)
Updating files:  91% (30506/33522)
Updating files:  92% (30841/33522)
Updating files:  93% (31176/33522)
Updating files:  94% (31511/33522)
Updating files:  95% (31846/33522)
Updating files:  96% (32182/33522)
Updating files:  97% (32517/33522)
Updating files:  98% (32852/33522)
Updating files:  99% (33187/33522)
Updating files: 100% (33522/33522)
Updating files: 100% (33522/33522), done.
HEAD is now at f089d8564d Merge pull request #25672 from gborough/opam-publish-fred.0.1.0
Auto-merging packages/conf-llvm/conf-llvm.10.0.0/opam
Auto-merging packages/conf-llvm/conf-llvm.11.0.0/opam
Auto-merging packages/conf-llvm/conf-llvm.3.8/opam
Auto-merging packages/conf-llvm/conf-llvm.3.9/opam
Auto-merging packages/conf-llvm/conf-llvm.4.0.0/opam
Auto-merging packages/conf-llvm/conf-llvm.5.0.0/opam
Auto-merging packages/conf-llvm/conf-llvm.6.0.0/opam
Auto-merging packages/conf-llvm/conf-llvm.7.0.0/opam
Auto-merging packages/conf-llvm/conf-llvm.8.0.0/opam
Auto-merging packages/conf-llvm/conf-llvm.9.0.0/opam
Merge made by the 'ort' strategy.
 packages/conf-llvm/conf-llvm.10.0.0/files/configure.sh | 2 +-
 packages/conf-llvm/conf-llvm.10.0.0/opam               | 2 +-
 packages/conf-llvm/conf-llvm.11.0.0/files/configure.sh | 2 +-
 packages/conf-llvm/conf-llvm.11.0.0/opam               | 2 +-
 packages/conf-llvm/conf-llvm.3.4/files/configure       | 2 +-
 packages/conf-llvm/conf-llvm.3.4/opam                  | 2 +-
 packages/conf-llvm/conf-llvm.3.8/files/configure.sh    | 2 +-
 packages/conf-llvm/conf-llvm.3.8/opam                  | 2 +-
 packages/conf-llvm/conf-llvm.3.9/files/configure.sh    | 2 +-
 packages/conf-llvm/conf-llvm.3.9/opam                  | 2 +-
 packages/conf-llvm/conf-llvm.4.0.0/files/configure.sh  | 2 +-
 packages/conf-llvm/conf-llvm.4.0.0/opam                | 2 +-
 packages/conf-llvm/conf-llvm.5.0.0/files/configure.sh  | 2 +-
 packages/conf-llvm/conf-llvm.5.0.0/opam                | 2 +-
 packages/conf-llvm/conf-llvm.6.0.0/files/configure.sh  | 2 +-
 packages/conf-llvm/conf-llvm.6.0.0/opam                | 2 +-
 packages/conf-llvm/conf-llvm.7.0.0/files/configure.sh  | 2 +-
 packages/conf-llvm/conf-llvm.7.0.0/opam                | 2 +-
 packages/conf-llvm/conf-llvm.8.0.0/files/configure.sh  | 2 +-
 packages/conf-llvm/conf-llvm.8.0.0/opam                | 2 +-
 packages/conf-llvm/conf-llvm.9.0.0/files/configure.sh  | 2 +-
 packages/conf-llvm/conf-llvm.9.0.0/opam                | 2 +-
 22 files changed, 22 insertions(+), 22 deletions(-)

(from ocaml/opam:opensuse-tumbleweed-ocaml-4.14@sha256:ebbbcd3f3ce8b102c5fdb7fb8b4b40c9b51fdf9d32e082cc1f0785d0d12bc9dd)
Unable to find image 'ocaml/opam:opensuse-tumbleweed-ocaml-4.14@sha256:ebbbcd3f3ce8b102c5fdb7fb8b4b40c9b51fdf9d32e082cc1f0785d0d12bc9dd' locally
docker.io/ocaml/opam@sha256:ebbbcd3f3ce8b102c5fdb7fb8b4b40c9b51fdf9d32e082cc1f0785d0d12bc9dd: Pulling from ocaml/opam
d9c38327c87b: Pulling fs layer
d9c38327c87b: Verifying Checksum
d9c38327c87b: Download complete
d9c38327c87b: Pull complete
Digest: sha256:ebbbcd3f3ce8b102c5fdb7fb8b4b40c9b51fdf9d32e082cc1f0785d0d12bc9dd
Status: Downloaded newer image for ocaml/opam@sha256:ebbbcd3f3ce8b102c5fdb7fb8b4b40c9b51fdf9d32e082cc1f0785d0d12bc9dd
2024-04-17 19:36.14 ---> using "0623f1c2edae682fa6c31631555a9f57478ee2448e2abd8f5e15e29e3d1abd19" from cache

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

/: (workdir /home/opam)

/home/opam: (run (shell "sudo ln -f /usr/bin/opam-dev /usr/bin/opam"))
2024-04-17 19:36.14 ---> using "c99a375d3729f26bdb0f6e659dad06917b335fd9771356d997f4704ca2461b16" 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~alpha, 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 31 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=31 --global
Format upgrade done.

<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] synchronised from file:///home/opam/opam-repository
2024-04-17 19:36.14 ---> using "b577c76e4e4956886fbe38b4bfcd0ce0369b537960b61b53fc20039b27852e5b" from cache

/home/opam: (run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
Linux 5.15.0-101-generic
The OCaml toplevel, version 4.14.2
2.2.0~beta3~dev
2024-04-17 19:36.14 ---> using "19b7eaf49feb85f585ddaa97d3cfd905c04067ecab91fbf8454bb238e766a093" from cache

/home/opam: (env OPAMDOWNLOADJOBS 1)

/home/opam: (env OPAMERRLOGLEN 0)

/home/opam: (env OPAMSOLVERTIMEOUT 500)

/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/"))
2024-04-17 19:36.14 ---> using "5ce47966129c1d3f6a0b164a18fb356d71b580866fb234edde379d7fb9575859" from cache

/home/opam: (copy (src .) (dst opam-repository/))
2024-04-17 19:36.16 ---> using "2b5cf639529509eaae92be4222be59047e63438d29dd62edee83d41de09c59ba" from cache

/home/opam: (run (shell "opam repository set-url --strict default opam-repository/"))
[default] Initialised
2024-04-17 19:36.51 ---> saved as "e5cbe258fb2b18f74b36e80738a1c222baf89caeb026a5bf366f610a1948aedd"

/home/opam: (run (network host)
                 (shell "opam update --depexts || true"))
+ /usr/bin/sudo "zypper" "--non-interactive" "refresh"
- Retrieving repository 'openSUSE-Tumbleweed-Non-Oss' metadata [........
- ......done]
- Building repository 'openSUSE-Tumbleweed-Non-Oss' cache [...done]
- Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata [...
- .........
- .........
- ..........
- ...........
- .........
- .........
- .........
- done]
- Building repository 'openSUSE-Tumbleweed-Oss' cache [..
- ..done]
- Repository 'openSUSE-Tumbleweed-Update' is up to date.
- All repositories have been refreshed.
2024-04-17 19:37.05 ---> saved as "6854a373c6184304c27b4c00067430c31afe080337c377a41b358d5d7c909b5a"

/home/opam: (env OPAMCRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)

/home/opam: (env OPAMFIXUPCRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)

/home/opam: (env OPAMUPGRADECRITERIA -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed)

/home/opam: (run (shell "opam pin add -k version -yn conf-llvm.3.8 3.8"))
conf-llvm is now pinned to version 3.8
2024-04-17 19:37.06 ---> saved as "56ae9973fa7933e45749b47dd2e66915df4edc74b91de639574db18d661d2196"

/home/opam: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
                 (network host)
                 (shell  "opam reinstall conf-llvm.3.8;\
                        \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 \"\\\"opensuse-tumbleweed\\\"\"; then\
                        \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
                        \n          fi;\
                        \n          test \"$pkg\" != 'conf-llvm.3.8' && partial_fails=\"$partial_fails $pkg\";\
                        \n        done;\
                        \n        test \"${partial_fails}\" != \"\" && echo \"opam-repo-ci detected dependencies failing: ${partial_fails}\";\
                        \n        exit 1"))
conf-llvm.3.8 is not installed. Install it? [y/n] y
The following actions will be performed:
=== install 2 packages
  - install conf-bash 1            [required by conf-llvm]
  - install conf-llvm 3.8 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed conf-bash.1
[ERROR] The compilation of conf-llvm.3.8 failed at "bash -ex configure.sh 3.8".

#=== ERROR while compiling conf-llvm.3.8 ======================================#
# context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.4.14.2 | pinned
# path                 ~/.opam/4.14/.opam-switch/build/conf-llvm.3.8
# command              ~/.opam/opam-init/hooks/sandbox.sh build bash -ex configure.sh 3.8
# exit-code            1
# env-file             ~/.opam/log/conf-llvm-7-e67a39.env
# output-file          ~/.opam/log/conf-llvm-7-e67a39.out
### output ###
# + version=3.8
# + config=
# + hash brew
# + shopt -s nullglob
# + for llvm_config in $config llvm-config-$version llvm-config${version//./} llvm-config-mp-$version llvm${version}-config $brew_llvm_config llvm-config
# ++ llvm-config-3.8 --version
# configure.sh: line 13: llvm-config-3.8: command not found
# + llvm_version=
# + true
# + case $llvm_version in
# + echo 'Note: '\''llvm-config-3.8'\'' doesn'\''t match the required version. Got '\'''\'' but required '\''3.8'\''.'
# Note: 'llvm-config-3.8' doesn't match the required version. Got '' but required '3.8'.
# + continue
# + for llvm_config in $config llvm-config-$version llvm-config${version//./} llvm-config-mp-$version llvm${version}-config $brew_llvm_config llvm-config
# ++ llvm-config38 --version
# configure.sh: line 13: llvm-config38: command not found
# + llvm_version=
# + true
# + case $llvm_version in
# + echo 'Note: '\''llvm-config38'\'' doesn'\''t match the required version. Got '\'''\'' but required '\''3.8'\''.'
# Note: 'llvm-config38' doesn't match the required version. Got '' but required '3.8'.
# + continue
# + for llvm_config in $config llvm-config-$version llvm-config${version//./} llvm-config-mp-$version llvm${version}-config $brew_llvm_config llvm-config
# ++ llvm-config-mp-3.8 --version
# configure.sh: line 13: llvm-config-mp-3.8: command not found
# + llvm_version=
# + true
# + case $llvm_version in
# + echo 'Note: '\''llvm-config-mp-3.8'\'' doesn'\''t match the required version. Got '\'''\'' but required '\''3.8'\''.'
# Note: 'llvm-config-mp-3.8' doesn't match the required version. Got '' but required '3.8'.
# + continue
# + for llvm_config in $config llvm-config-$version llvm-config${version//./} llvm-config-mp-$version llvm${version}-config $brew_llvm_config llvm-config
# ++ llvm3.8-config --version
# configure.sh: line 13: llvm3.8-config: command not found
# + llvm_version=
# + true
# + case $llvm_version in
# + echo 'Note: '\''llvm3.8-config'\'' doesn'\''t match the required version. Got '\'''\'' but required '\''3.8'\''.'
# Note: 'llvm3.8-config' doesn't match the required version. Got '' but required '3.8'.
# + continue
# + for llvm_config in $config llvm-config-$version llvm-config${version//./} llvm-config-mp-$version llvm${version}-config $brew_llvm_config llvm-config
# ++ llvm-config --version
# configure.sh: line 13: llvm-config: command not found
# + llvm_version=
# + true
# + case $llvm_version in
# + echo 'Note: '\''llvm-config'\'' doesn'\''t match the required version. Got '\'''\'' but required '\''3.8'\''.'
# Note: 'llvm-config' doesn't match the required version. Got '' but required '3.8'.
# + continue
# + echo 'Error: LLVM 3.8 is not installed.'
# Error: LLVM 3.8 is not installed.
# + exit 1


The former state can be restored with:
    /usr/bin/opam switch import "/home/opam/.opam/4.14/.opam-switch/backup/state-20240417193706.export"


<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build conf-llvm 3.8
+- 
+- The following changes have been performed
| - install conf-bash 1
+- 
# Run eval $(opam env) to update the current shell environment
[WARNING] OPAMCONFIRMLEVEL was ignored because CLI 2.0 was requested and it was introduced in 2.1.
[WARNING] OPAMCONFIRMLEVEL was ignored because CLI 2.0 was requested and it was introduced in 2.1.
"/usr/bin/env" "bash" "-c" "opam reinstall conf-llvm.3.8;
        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 "\"opensuse-tumbleweed\""; then
            echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.";
          fi;
          test "$pkg" != 'conf-llvm.3.8' && partial_fails="$partial_fails $pkg";
        done;
        test "${partial_fails}" != "" && echo "opam-repo-ci detected dependencies failing: ${partial_fails}";
        exit 1" failed with exit status 1
2024-04-17 19:37.58: Job failed: Failed: Build failed
2024-04-17 19:37.58: Log analysis:
2024-04-17 19:37.58: >>> 
[ERROR] The compilation of conf-llvm.3.8 failed at "bash -ex configure.sh 3.8".
 (score = 20)
2024-04-17 19:37.58: >>> 
# Error: LLVM 3.8 is not installed.
 (score = 48)
2024-04-17 19:37.58: LLVM 3.8 is not installed.