(for PR #28931)

2025-12-09 23:30.56: New job: build lmdb.1.0, using opam dev
                              from https://github.com/ocaml/opam-repository.git#refs/pull/28931/head (42abe0a86f7cded95c96cd2196636ef0bcc58ec7)
                              on centos-10-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/28931/head" && git reset --hard 42abe0a8
git fetch origin master
git merge --no-edit d684c896eb6f7e6030d6ee65338d9db22a612f01
cat > ../Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:centos-10-ocaml-4.14@sha256:726ec24ce3cd73a54f9945183ba18ed925ec0ed843ea90cd45634274bbf6e67c
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 lmdb.1.0 1.0
RUN opam reinstall lmdb.1.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 "\"centos-10\""; then \
    echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field."; \
    fi; \
    test "$pkg" != 'lmdb.1.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-12-09 23:30.56: Using cache hint "ocaml/opam:centos-10-ocaml-4.14@sha256:726ec24ce3cd73a54f9945183ba18ed925ec0ed843ea90cd45634274bbf6e67c-lmdb.1.0-42abe0a86f7cded95c96cd2196636ef0bcc58ec7"
2025-12-09 23:30.56: Using OBuilder spec:
((from ocaml/opam:centos-10-ocaml-4.14@sha256:726ec24ce3cd73a54f9945183ba18ed925ec0ed843ea90cd45634274bbf6e67c)
 (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 lmdb.1.0 1.0"))
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
      (network host)
      (shell  "opam reinstall lmdb.1.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 \"\\\"centos-10\\\"\"; then\
             \n            echo \"A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.\";\
             \n          fi;\
             \n          test \"$pkg\" != 'lmdb.1.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-12-09 23:30.56: Waiting for resource in pool OCluster
2025-12-09 23:35.42: Waiting for worker…
2025-12-09 23:39.11: Got resource from pool OCluster
Building on odawa.caelum.ci.dev
All commits already cached
HEAD is now at d684c896eb Merge pull request #29052 from balat/maintenance
Auto-merging packages/lmdb/lmdb.1.0/opam
Merge made by the 'ort' strategy.
 packages/lmdb/lmdb.1.0/opam | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(from ocaml/opam:centos-10-ocaml-4.14@sha256:726ec24ce3cd73a54f9945183ba18ed925ec0ed843ea90cd45634274bbf6e67c)
2025-12-09 23:46.13 ---> using "af5df9e4834830d391d310f1ad73cb3b374fad3e2b8574f9653548b8bcf421b3" from cache

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

/: (workdir /home/opam)

/home/opam: (run (shell "sudo ln -f /usr/bin/opam-dev /usr/bin/opam"))
2025-12-09 23:46.13 ---> using "c06bb258dbdfea143b8f1f88c291e105f778fdd7ce9635360f15ba04f8d14370" 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 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 71 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=71 --global
Format upgrade done.

<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
2025-12-09 23:46.13 ---> using "7b177e897b09b43133757096f6640f71201da9f64118283fb263c95b0308b76a" 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.5.0
# self-upgrade         no
# system               arch=x86_64 os=linux os-distribution=centos os-version=10
# solver               builtin-0install
# install-criteria     -changed,-count[avoid-version,solution]
# upgrade-criteria     -count[avoid-version,solution]
# jobs                 255
# repositories         1 (version-controlled)
# pinned               1 (version)
# current-switch       4.14
# invariant            ["ocaml-base-compiler" {= "4.14.2"}]
# compiler-packages    ocaml-base-compiler.4.14.2, ocaml-options-vanilla.1
# ocaml:native         true
# ocaml:native-tools   true
# ocaml:native-dynlink true
# ocaml:stubsdir       /home/opam/.opam/4.14/lib/ocaml/stublibs:/home/opam/.opam/4.14/lib/ocaml
# ocaml:preinstalled   false
# ocaml:compiler       4.14.2
2025-12-09 23:46.13 ---> using "9bd5ee6590ac70bb6918bc24e765a280ee20c9e0ad486affc9f75c3174076ffa" 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-12-09 23:46.13 ---> using "78752b6feabe2612f950b6ba117e458f4ad3718ea67ecdbb498dc43383b64ead" from cache

/home/opam: (copy (src .) (dst opam-repository/))
2025-12-09 23:46.14 ---> using "688636ba08ca7e1534ebf8306a45f0f43a6ac426ef16a603bc2c768780fc5ea7" from cache

/home/opam: (run (shell "opam repository set-url --strict default opam-repository/"))
[default] Initialised
2025-12-09 23:46.14 ---> using "6f8ca915c747188dbfcd2a8eb76e11cfd6a6418831ecf8096c8206bc2c1db9d5" from cache

/home/opam: (run (network host)
                 (shell "opam update --depexts || true"))
+ /usr/bin/sudo "yum" "makecache"
- CentOS Stream 10 - BaseOS                       183 kB/s |  15 kB     00:00    
- CentOS Stream 10 - BaseOS                       8.3 MB/s | 6.8 MB     00:00    
- CentOS Stream 10 - AppStream                     38 kB/s |  15 kB     00:00    
- CentOS Stream 10 - AppStream                    5.1 MB/s | 3.5 MB     00:00    
- CentOS Stream 10 - CRB                           41 kB/s |  14 kB     00:00    
- CentOS Stream 10 - CRB                          3.5 MB/s | 774 kB     00:00    
- CentOS Stream 10 - Extras packages               36 kB/s |  14 kB     00:00    
- CentOS Stream 10 - Extras packages               19 kB/s | 8.1 kB     00:00    
- Metadata cache created.
2025-12-09 23:46.14 ---> using "664cf1d531f6323b8e6233d1f7e30b53897562e1359a7408745be0a32a45efbd" from cache

/home/opam: (run (shell "opam pin add -k version -yn lmdb.1.0 1.0"))
lmdb is now pinned to version 1.0
2025-12-09 23:46.14 ---> using "b6696328907b2298582be4a31fc47cb49293493ee16c3d8bb7abda000fe4901a" from cache

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

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved bigstringaf.0.10.0  (cached)
-> retrieved csexp.1.5.2  (cached)
-> installed conf-pkg-config.4
-> retrieved dune.3.20.2, dune-configurator.3.20.2  (cached)
-> retrieved lmdb.1.0  (cached)
-> installed dune.3.20.2
-> installed csexp.1.5.2
-> installed dune-configurator.3.20.2
-> installed bigstringaf.0.10.0
[ERROR] The compilation of lmdb.1.0 failed at "dune build -p lmdb -j 255".

#=== ERROR while compiling lmdb.1.0 ===========================================#
# context              2.5.0 | linux/x86_64 | ocaml-base-compiler.4.14.2 | pinned(https://github.com/Drup/ocaml-lmdb/archive/1.0.tar.gz)
# path                 ~/.opam/4.14/.opam-switch/build/lmdb.1.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p lmdb -j 255
# exit-code            1
# env-file             ~/.opam/log/lmdb-7-8f214a.env
# output-file          ~/.opam/log/lmdb-7-8f214a.out
### output ###
# File "dune", lines 6-8, characters 0-70:
# 6 | (rule
# 7 |  (targets cflags.sexp clibs.sexp)
# 8 |  (action (run ./discover.bc)))
# (cd _build/default && ./discover.bc)
# which: pkgconf
# -> found: /usr/bin/pkgconf
# run: /usr/bin/pkgconf --personality x86_64-pc-linux-gnu --print-errors lmdb
# -> process exited with code 1
# -> stdout:
# -> stderr:
#  | Package lmdb was not found in the pkg-config search path.
#  | Perhaps you should add the directory containing `lmdb.pc'
#  | to the PKG_CONFIG_PATH environment variable
#  | Package 'lmdb', required by 'virtual:world', not found
# Fatal error: exception Failure("lmdb.h not found")



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build lmdb 1.0
+- 
+- The following changes have been performed
| - install bigstringaf       0.10.0
| - install conf-pkg-config   4
| - install csexp             1.5.2
| - install dune              3.20.2
| - install dune-configurator 3.20.2
+- 
# To update the current shell environment, run: eval $(opam env)

The former state can be restored with:
    /usr/bin/opam switch import "/home/opam/.opam/4.14/.opam-switch/backup/state-20251209234614.export"
[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 lmdb.1.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 "\"centos-10\""; then
            echo "A package failed and has been disabled for CI using the 'x-ci-accept-failures' field.";
          fi;
          test "$pkg" != 'lmdb.1.0' && 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
2025-12-09 23:47.08: Job failed: Failed: Build failed
2025-12-09 23:47.08: Log analysis:
2025-12-09 23:47.08: >>> 
[ERROR] The compilation of lmdb.1.0 failed at "dune build -p lmdb -j 255".
 (score = 20)
2025-12-09 23:47.08: >>> 
# Fatal error: exception Failure("lmdb.h not found")
 (score = 35)
2025-12-09 23:47.08: exception Failure("lmdb.h not found")