Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dkml-component-staging-ocamlrun ocamlobjinfo error #130

Open
tmcgilchrist opened this issue Oct 12, 2023 · 1 comment
Open

dkml-component-staging-ocamlrun ocamlobjinfo error #130

tmcgilchrist opened this issue Oct 12, 2023 · 1 comment

Comments

@tmcgilchrist
Copy link
Collaborator

Log error (https://staging.docs.ci.ocamllabs.io/job/2023-10-12/081042-voodoo-prep-468802):

/home/opam: (run (shell "opam exec -- ~/voodoo-prep -u dkml-component-offline-ocamlrun:fa76289bfeccefaf62b61e7a61e0c3bd,tsort:84654c62cbdcb9d6005df638c6921407,rresult:908a4733344ee81e270193d954d8da93,ppx_deriving:ea52a721de9bd5da6763cf77fbacc867,logs:0cd0d1315bbe6ea46ce219811adc3cc3,fpath:a30735c5068b6d0ddbce38d6d0f1dca0,dkml-install:3caa0f3f2afdeb1928258a9a21ad32d9,dkml-component-staging-ocamlrun:2938a389e6f6269c93a911d97a3c4ea4,diskuvbox:5b3cc227d59300e489de6db6a17c6923,bos:d48fafe0f401089619b993c03212f438,astring:908a4733344ee81e270193d954d8da93"))
prep: internal error, uncaught exception:
      Failure("Error: run ['ocamlobjinfo'\n     '/home/opam/.opam/5.0/share/dkml-component-staging-ocamlrun/staging-files/linux_x86_64/lib/ocaml/unix.cma']: exited with 2")
      
"/usr/bin/env" "bash" "-c" "opam exec -- ~/voodoo-prep -u dkml-component-offline-ocamlrun:fa76289bfeccefaf62b61e7a61e0c3bd,tsort:84654c62cbdcb9d6005df638c6921407,rresult:908a4733344ee81e270193d954d8da93,ppx_deriving:ea52a721de9bd5da6763cf77fbacc867,logs:0cd0d1315bbe6ea46ce219811adc3cc3,fpath:a30735c5068b6d0ddbce38d6d0f1dca0,dkml-install:3caa0f3f2afdeb1928258a9a21ad32d9,dkml-component-staging-ocamlrun:2938a389e6f6269c93a911d97a3c4ea4,diskuvbox:5b3cc227d59300e489de6db6a17c6923,bos:d48fafe0f401089619b993c03212f438,astring:908a4733344ee81e270193d954d8da93" failed with exit status 2
2023-10-12 08:19.44: Job failed: Failed: Build failed

The obuilder spec that produced this error

((build tools
        ((from ocaml/opam@sha256:2126e477ad59ade4287d40a5fda936bcce7c57534369dccc846bba33fbee4439)
         (user (uid 1000) (gid 1000))
         (workdir /home/opam)
         (run (shell "sudo chown opam:opam /home/opam"))
         (run (network host)
              (shell "sudo apt-get update && sudo apt-get install -yy m4 pkg-config"))
         (run (cache (opam-archives (target /home/opam/.opam/download-cache)) (opam-dune-cache (target /home/opam/.cache/dune)))
              (network host)
              (shell "opam pin -ny https://github.com/ocaml-doc/voodoo.git#67ccabec49b5f4d24147839291fcae7c19d3e8c9  && opam depext -iy voodoo-prep"))
         (run (shell "cp $(opam config var bin)/voodoo-prep /home/opam"))))
 (from ocaml/opam@sha256:2126e477ad59ade4287d40a5fda936bcce7c57534369dccc846bba33fbee4439)
 (user (uid 1000) (gid 1000))
 (workdir /home/opam)
 (run (shell "sudo chown opam:opam /home/opam"))
 (run (shell "sudo mkdir /src"))
 (copy (src packages) (dst /src/packages))
 (copy (src repo) (dst /src/repo))
 (run (network host)
      (shell "sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam && opam init --reinit -ni"))
 (run (shell "opam repo remove default && opam repo add opam /src"))
 (copy (from (build tools)) (src /home/opam/voodoo-prep) (dst /home/opam/))
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)) (opam-dune-cache (target /home/opam/.cache/dune)))
      (network host)
      (shell "opam install dune.3.11.0 ocamlfind.1.9.6"))
 (env DUNE_CACHE enabled)
 (env DUNE_CACHE_TRANSPORT direct)
 (env DUNE_CACHE_DUPLICATION copy)
 (run (cache (opam-archives (target /home/opam/.opam/download-cache)) (opam-dune-cache (target /home/opam/.cache/dune)))
      (network host)
      (shell "(sudo apt update) && ((opam depext -viy dkml-component-offline-ocamlrun.4.12.1~v1.0.2 tsort.2.1.0 topkg.1.0.7 stdlib-shims.0.3.0 sexplib0.v0.16.0 rresult.0.7.0 result.1.5 ppxlib.0.31.0 ppx_deriving.5.2.1 ppx_derivers.1.2.1 ocamlfind.1.9.6 ocamlbuild.0.14.2 ocaml-compiler-libs.v0.12.4 logs.0.7.0 fpath.0.7.3 fmt.0.9.0 dune.3.11.0 dkml-install.0.3.1 dkml-component-staging-ocamlrun.4.12.1~v1.0.2 diskuvbox.0.2.0 cppo.1.6.9 cmdliner.1.2.0 bos.0.2.1 astring.0.8.5 2>&1 | tee ~/opam.err.log) || echo 'Failed to install all packages')"))
 (run (shell "opam exec -- ~/voodoo-prep -u dkml-component-offline-ocamlrun:fa76289bfeccefaf62b61e7a61e0c3bd,tsort:84654c62cbdcb9d6005df638c6921407,rresult:908a4733344ee81e270193d954d8da93,ppx_deriving:ea52a721de9bd5da6763cf77fbacc867,logs:0cd0d1315bbe6ea46ce219811adc3cc3,fpath:a30735c5068b6d0ddbce38d6d0f1dca0,dkml-install:3caa0f3f2afdeb1928258a9a21ad32d9,dkml-component-staging-ocamlrun:2938a389e6f6269c93a911d97a3c4ea4,diskuvbox:5b3cc227d59300e489de6db6a17c6923,bos:d48fafe0f401089619b993c03212f438,astring:908a4733344ee81e270193d954d8da93"))
 (run (network host)
      (secrets (ssh_privkey (target /home/opam/.ssh/id_rsa)) (ssh_pubkey (target /home/opam/.ssh/id_rsa.pub)) (ssh_config (target /home/opam/.ssh/config)))
      (shell "(echo '0.588253') && (for DATA in prep/universes/908a4733344ee81e270193d954d8da93/astring/0.8.5,astring.0.8.5-908a4733344ee81e270193d954d8da93,astring.0.8.5 prep/universes/d48fafe0f401089619b993c03212f438/bos/0.2.1,bos.0.2.1-d48fafe0f401089619b993c03212f438,bos.0.2.1 prep/universes/5b3cc227d59300e489de6db6a17c6923/diskuvbox/0.2.0,diskuvbox.0.2.0-5b3cc227d59300e489de6db6a17c6923,diskuvbox.0.2.0 prep/universes/2938a389e6f6269c93a911d97a3c4ea4/dkml-component-staging-ocamlrun/4.12.1~v1.0.2,dkml-component-staging-ocamlrun.4.12.1~v1.0.2-2938a389e6f6269c93a911d97a3c4ea4,dkml-component-staging-ocamlrun.4.12.1~v1.0.2 prep/universes/3caa0f3f2afdeb1928258a9a21ad32d9/dkml-install/0.3.1,dkml-install.0.3.1-3caa0f3f2afdeb1928258a9a21ad32d9,dkml-install.0.3.1 prep/universes/a30735c5068b6d0ddbce38d6d0f1dca0/fpath/0.7.3,fpath.0.7.3-a30735c5068b6d0ddbce38d6d0f1dca0,fpath.0.7.3 prep/universes/0cd0d1315bbe6ea46ce219811adc3cc3/logs/0.7.0,logs.0.7.0-0cd0d1315bbe6ea46ce219811adc3cc3,logs.0.7.0 prep/universes/ea52a721de9bd5da6763cf77fbacc867/ppx_deriving/5.2.1,ppx_deriving.5.2.1-ea52a721de9bd5da6763cf77fbacc867,ppx_deriving.5.2.1 prep/universes/908a4733344ee81e270193d954d8da93/rresult/0.7.0,rresult.0.7.0-908a4733344ee81e270193d954d8da93,rresult.0.7.0 prep/universes/84654c62cbdcb9d6005df638c6921407/tsort/2.1.0,tsort.2.1.0-84654c62cbdcb9d6005df638c6921407,tsort.2.1.0 prep/universes/fa76289bfeccefaf62b61e7a61e0c3bd/dkml-component-offline-ocamlrun/4.12.1~v1.0.2,dkml-component-offline-ocamlrun.4.12.1~v1.0.2-fa76289bfeccefaf62b61e7a61e0c3bd,dkml-component-offline-ocamlrun.4.12.1~v1.0.2; do IFS=\",\"; set -- $DATA; ([ -d $1 ] || (echo \"FAILED:$2\" && mkdir -p $1 && cp ~/opam.err.log $1 && opam show $3 --raw > $1/opam)) && (shopt -s nullglob && ((tar -cvf $1.tar $1/*  && rm -R $1/* && mv $1.tar $1/content.tar) || (echo 'Empty directory'))) done) && (for DATA in prep/universes/908a4733344ee81e270193d954d8da93/astring/0.8.5,astring.0.8.5-908a4733344ee81e270193d954d8da93,astring.0.8.5 prep/universes/d48fafe0f401089619b993c03212f438/bos/0.2.1,bos.0.2.1-d48fafe0f401089619b993c03212f438,bos.0.2.1 prep/universes/5b3cc227d59300e489de6db6a17c6923/diskuvbox/0.2.0,diskuvbox.0.2.0-5b3cc227d59300e489de6db6a17c6923,diskuvbox.0.2.0 prep/universes/2938a389e6f6269c93a911d97a3c4ea4/dkml-component-staging-ocamlrun/4.12.1~v1.0.2,dkml-component-staging-ocamlrun.4.12.1~v1.0.2-2938a389e6f6269c93a911d97a3c4ea4,dkml-component-staging-ocamlrun.4.12.1~v1.0.2 prep/universes/3caa0f3f2afdeb1928258a9a21ad32d9/dkml-install/0.3.1,dkml-install.0.3.1-3caa0f3f2afdeb1928258a9a21ad32d9,dkml-install.0.3.1 prep/universes/a30735c5068b6d0ddbce38d6d0f1dca0/fpath/0.7.3,fpath.0.7.3-a30735c5068b6d0ddbce38d6d0f1dca0,fpath.0.7.3 prep/universes/0cd0d1315bbe6ea46ce219811adc3cc3/logs/0.7.0,logs.0.7.0-0cd0d1315bbe6ea46ce219811adc3cc3,logs.0.7.0 prep/universes/ea52a721de9bd5da6763cf77fbacc867/ppx_deriving/5.2.1,ppx_deriving.5.2.1-ea52a721de9bd5da6763cf77fbacc867,ppx_deriving.5.2.1 prep/universes/908a4733344ee81e270193d954d8da93/rresult/0.7.0,rresult.0.7.0-908a4733344ee81e270193d954d8da93,rresult.0.7.0 prep/universes/84654c62cbdcb9d6005df638c6921407/tsort/2.1.0,tsort.2.1.0-84654c62cbdcb9d6005df638c6921407,tsort.2.1.0 prep/universes/fa76289bfeccefaf62b61e7a61e0c3bd/dkml-component-offline-ocamlrun/4.12.1~v1.0.2,dkml-component-offline-ocamlrun.4.12.1~v1.0.2-fa76289bfeccefaf62b61e7a61e0c3bd,dkml-component-offline-ocamlrun.4.12.1~v1.0.2; do IFS=\",\"; set -- $DATA; rsync -aR --no-p ./$1 staging.docs.ci.ocamllabs.io:/data/.; done) && (for DATA in prep/universes/908a4733344ee81e270193d954d8da93/astring/0.8.5,astring.0.8.5-908a4733344ee81e270193d954d8da93,astring.0.8.5 prep/universes/d48fafe0f401089619b993c03212f438/bos/0.2.1,bos.0.2.1-d48fafe0f401089619b993c03212f438,bos.0.2.1 prep/universes/5b3cc227d59300e489de6db6a17c6923/diskuvbox/0.2.0,diskuvbox.0.2.0-5b3cc227d59300e489de6db6a17c6923,diskuvbox.0.2.0 prep/universes/2938a389e6f6269c93a911d97a3c4ea4/dkml-component-staging-ocamlrun/4.12.1~v1.0.2,dkml-component-staging-ocamlrun.4.12.1~v1.0.2-2938a389e6f6269c93a911d97a3c4ea4,dkml-component-staging-ocamlrun.4.12.1~v1.0.2 prep/universes/3caa0f3f2afdeb1928258a9a21ad32d9/dkml-install/0.3.1,dkml-install.0.3.1-3caa0f3f2afdeb1928258a9a21ad32d9,dkml-install.0.3.1 prep/universes/a30735c5068b6d0ddbce38d6d0f1dca0/fpath/0.7.3,fpath.0.7.3-a30735c5068b6d0ddbce38d6d0f1dca0,fpath.0.7.3 prep/universes/0cd0d1315bbe6ea46ce219811adc3cc3/logs/0.7.0,logs.0.7.0-0cd0d1315bbe6ea46ce219811adc3cc3,logs.0.7.0 prep/universes/ea52a721de9bd5da6763cf77fbacc867/ppx_deriving/5.2.1,ppx_deriving.5.2.1-ea52a721de9bd5da6763cf77fbacc867,ppx_deriving.5.2.1 prep/universes/908a4733344ee81e270193d954d8da93/rresult/0.7.0,rresult.0.7.0-908a4733344ee81e270193d954d8da93,rresult.0.7.0 prep/universes/84654c62cbdcb9d6005df638c6921407/tsort/2.1.0,tsort.2.1.0-84654c62cbdcb9d6005df638c6921407,tsort.2.1.0 prep/universes/fa76289bfeccefaf62b61e7a61e0c3bd/dkml-component-offline-ocamlrun/4.12.1~v1.0.2,dkml-component-offline-ocamlrun.4.12.1~v1.0.2-fa76289bfeccefaf62b61e7a61e0c3bd,dkml-component-offline-ocamlrun.4.12.1~v1.0.2; do IFS=\",\"; set -- $DATA; HASH=$((sha256sum $1/content.tar | cut -d \" \" -f 1)  || echo -n 'empty'); printf \"HASHES:$2:$HASH\\n\"; done)"))
)
@tmcgilchrist
Copy link
Collaborator Author

Running this locally give more clues, even though it is on macOS.

$ ocamlobjinfo _opam/share/dkml-component-staging-ocamlrun/staging-files/darwin_x86_64/lib/ocaml/unix.cma
File _opam/share/dkml-component-staging-ocamlrun/staging-files/darwin_x86_64/lib/ocaml/unix.cma
Wrong magic number:
this tool only supports object files produced by compiler version
	5.1.0
This seems to be a bytecode library (cma) for an older version of OCaml.
$ echo $?
2

The return code of 2 suggests it is the same issue, basically the unix.cma file doesn't match the OCaml compiler used.

tmcgilchrist added a commit to ocurrent/ocaml-docs-ci that referenced this issue Oct 19, 2023
They include cma files from an older version of OCaml, causing
packages that share a universe with them to fail. See
ocaml-doc/voodoo#130
tmcgilchrist added a commit to tmcgilchrist/ocaml-docs-ci that referenced this issue Oct 23, 2023
They include cma files from an older version of OCaml, causing
packages that share a universe with them to fail. See
ocaml-doc/voodoo#130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant