tweag / opam-nix

Turn opam-based OCaml projects into Nix derivations
MIT License
111 stars 33 forks source link

ocaml5.1.1-opam-core-2.2.0 fails to build #91

Closed kentookura closed 4 months ago

kentookura commented 4 months ago

Describe the bug opam-core fails to build:

ocaml5.1.1-opam-core> Opam will be built WITH its default built-in solver
ocaml5.1.1-opam-core> Executables will be installed in /nix/store/lpfjkzdn9v946g3p39zjv62r2gav0v40-ocaml5.1.1-opam-core-2.2.0/bin
ocaml5.1.1-opam-core> Manual pages will be installed in /nix/store/lpfjkzdn9v946g3p39zjv62r2gav0v40-ocaml5.1.1-opam-core-2.2.0/share/man
ocaml5.1.1-opam-core> Running phase: buildPhase
ocaml5.1.1-opam-core> File "src/core/dune", line 6, characters 67-71:
ocaml5.1.1-opam-core> 6 |   (libraries   re (re_export ocamlgraph) unix sha jsonm swhid_core uutf
ocaml5.1.1-opam-core>                                                                        ^^^^
ocaml5.1.1-opam-core> Error: Library "uutf" not found.
ocaml5.1.1-opam-core> -> required by library "opam-core" in _build/default/src/core
ocaml5.1.1-opam-core> -> required by _build/default/META.opam-core
ocaml5.1.1-opam-core> -> required by _build/install/default/lib/opam-core/META
ocaml5.1.1-opam-core> -> required by _build/default/opam-core.install
ocaml5.1.1-opam-core> -> required by alias install

This is the dune file:

https://github.com/ocaml/opam/blob/a1c9c34417735687fd9310e7dc5c4c177e020441/src/core/dune

To Reproduce Run nix build in this repo.

Expected behavior It builds.

Environment

Full build logs:

``` ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/fvp288mpbp1sk089mfcxkbd3rn288g8f-ocaml5.1.1-findlib-1.9.6/nix-support/setup-hook' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/brfgny6xf2i3qfsfwnxchbgn9jxa6vzl-unzip-6.0/nix-support/setup-hook' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/yq6n8b0mnk0qxzbs3ajsjcp8ziwqylrl-patchelf-0.15.0/nix-support/setup-hook' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/iks1pihvbilsh5sy8qvpd638k422w9i8-update-autotools-gnu-config-scripts-hook/nix-support/setup-hook' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/jivxp510zxakaaic7qkrb7v1dd2rdbw9-multiple-outputs.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/ilaf1w22bxi6jsi45alhmvvdgy4ly3zs-patch-shebangs.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/nix-support/setup-hook' ocaml5.1.1-opam-core> sourcing setup hook '/nix/store/9rz99vibv1782dxjkwvxr29s7f2f86wl-binutils-wrapper-2.42/nix-support/setup-hook' ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/rr9yfqhvlcpl0sdz9v1fxbfvbhlrllmx-ocaml-5.1.1 ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/3mswiwwah2697vs00063cg3nxb5w3vds-dune-3.16.0 ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/fvp288mpbp1sk089mfcxkbd3rn288g8f-ocaml5.1.1-findlib-1.9.6 ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/brfgny6xf2i3qfsfwnxchbgn9jxa6vzl-unzip-6.0 ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/c5fnp2k2z1wg708scr2q1hd5bk0x1ysi-ocaml5.1.1-cppo-1.6.9 ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/yq6n8b0mnk0qxzbs3ajsjcp8ziwqylrl-patchelf-0.15.0 ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/iks1pihvbilsh5sy8qvpd638k422w9i8-update-autotools-gnu-config-scripts-hook ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/wgrbkkaldkrlrni33ccvm3b6vbxzb656-make-symlinks-relative.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/jivxp510zxakaaic7qkrb7v1dd2rdbw9-multiple-outputs.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/ilaf1w22bxi6jsi45alhmvvdgy4ly3zs-patch-shebangs.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0 ocaml5.1.1-opam-core> calling 'envBuildHostHook' function hook 'exportOcamlDestDir' /nix/store/9rz99vibv1782dxjkwvxr29s7f2f86wl-binutils-wrapper-2.42 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'addOCamlPath' /nix/store/w57hgyh0xhxkvm811nrlaakbpfarbbhr-ocaml5.1.1-ocamlgraph-2.1.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/w57hgyh0xhxkvm811nrlaakbpfarbbhr-ocaml5.1.1-ocamlgraph-2.1.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/w57hgyh0xhxkvm811nrlaakbpfarbbhr-ocaml5.1.1-ocamlgraph-2.1.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'addOCamlPath' /nix/store/ahggc6fmha5bfk7aw75ds7hclg8kkfrk-ocaml5.1.1-stdlib-shims-0.3.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/ahggc6fmha5bfk7aw75ds7hclg8kkfrk-ocaml5.1.1-stdlib-shims-0.3.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/ahggc6fmha5bfk7aw75ds7hclg8kkfrk-ocaml5.1.1-stdlib-shims-0.3.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'addOCamlPath' /nix/store/mxc97j88z7is25v6dh1vgr3hrl63myzl-ocaml5.1.1-re-1.11.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/mxc97j88z7is25v6dh1vgr3hrl63myzl-ocaml5.1.1-re-1.11.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/mxc97j88z7is25v6dh1vgr3hrl63myzl-ocaml5.1.1-re-1.11.0 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'addOCamlPath' /nix/store/pn5zxypfycg7p485s8z0zflh2c2l3jnc-ocaml5.1.1-seq-0.1 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/pn5zxypfycg7p485s8z0zflh2c2l3jnc-ocaml5.1.1-seq-0.1 ocaml5.1.1-opam-core> calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/pn5zxypfycg7p485s8z0zflh2c2l3jnc-ocaml5.1.1-seq-0.1 ocaml5.1.1-opam-core> calling 'postHook' function hook 'detectOcamlConflicts' ocaml5.1.1-opam-core> Running phase: unpackPhase ocaml5.1.1-opam-core> unpacking source archive /nix/store/02z7xakx0w5ay7jn1fjzkffcj2s0rcrz-opam-full-2.2.0-2.tar.gz ocaml5.1.1-opam-core> calling 'unpackCmd' function hook '_tryUnzip' /nix/store/02z7xakx0w5ay7jn1fjzkffcj2s0rcrz-opam-full-2.2.0-2.tar.gz ocaml5.1.1-opam-core> calling 'unpackCmd' function hook '_defaultUnpack' /nix/store/02z7xakx0w5ay7jn1fjzkffcj2s0rcrz-opam-full-2.2.0-2.tar.gz ocaml5.1.1-opam-core> source root is opam-full-2.2.0 ocaml5.1.1-opam-core> calling 'postUnpack' function hook '_updateSourceDateEpochFromSourceRoot' ocaml5.1.1-opam-core> setting SOURCE_DATE_EPOCH to timestamp 1720010379 of file opam-full-2.2.0/src_ext/archives/dune-3.14.2.tbz ocaml5.1.1-opam-core> Running phase: patchPhase ocaml5.1.1-opam-core> Running phase: updateAutotoolsGnuConfigScriptsPhase ocaml5.1.1-opam-core> Running phase: configurePhase ocaml5.1.1-opam-core> calling 'preConfigure' function hook '_multioutConfig' ocaml5.1.1-opam-core> patching script interpreter paths in ./configure ocaml5.1.1-opam-core> ./configure: interpreter directive changed from "#! /bin/sh" to "/nix/store/m101dg80ngyjdb02g6jwy80sr7kzj26g-bash-5.2p26/bin/sh" ocaml5.1.1-opam-core> configure flags: --disable-static --prefix=/nix/store/lpfjkzdn9v946g3p39zjv62r2gav0v40-ocaml5.1.1-opam-core-2.2.0 --disable-checks ocaml5.1.1-opam-core> checking for ocamlc... ocamlc ocaml5.1.1-opam-core> OCaml version is 5.1.1 ocaml5.1.1-opam-core> OCaml library path is /nix/store/rr9yfqhvlcpl0sdz9v1fxbfvbhlrllmx-ocaml-5.1.1/lib/ocaml ocaml5.1.1-opam-core> checking for ocamlopt... ocamlopt ocaml5.1.1-opam-core> checking for ocamlc.opt... ocamlc.opt ocaml5.1.1-opam-core> checking for ocamlopt.opt... ocamlopt.opt ocaml5.1.1-opam-core> checking for ocaml... ocaml ocaml5.1.1-opam-core> checking for ocamldep... ocamldep ocaml5.1.1-opam-core> checking for ocamldep.opt... ocamldep.opt ocaml5.1.1-opam-core> checking for ocamlmktop... ocamlmktop ocaml5.1.1-opam-core> checking for ocamlmklib... ocamlmklib ocaml5.1.1-opam-core> checking for ocamldoc... ocamldoc ocaml5.1.1-opam-core> checking for ocamldoc.opt... ocamldoc.opt ocaml5.1.1-opam-core> checking for ocamlbuild... no ocaml5.1.1-opam-core> checking OCaml Sys.os_type... Unix ocaml5.1.1-opam-core> checking for gawk... gawk ocaml5.1.1-opam-core> checking for compiler type... cc ocaml5.1.1-opam-core> checking for compiler architecture... amd64 ocaml5.1.1-opam-core> checking for compiler system... linux ocaml5.1.1-opam-core> checking for compiler target... x86_64-unknown-linux-gnu ocaml5.1.1-opam-core> checking whether the C compiler works... yes ocaml5.1.1-opam-core> checking for C compiler default output file name... a.out ocaml5.1.1-opam-core> checking for suffix of executables... ocaml5.1.1-opam-core> checking whether we are cross compiling... no ocaml5.1.1-opam-core> checking for suffix of object files... o ocaml5.1.1-opam-core> checking whether the compiler supports GNU C... yes ocaml5.1.1-opam-core> checking whether gcc accepts -g... yes ocaml5.1.1-opam-core> checking for gcc option to enable C11 features... none needed ocaml5.1.1-opam-core> checking for stdio.h... yes ocaml5.1.1-opam-core> checking for stdlib.h... yes ocaml5.1.1-opam-core> checking for string.h... yes ocaml5.1.1-opam-core> checking for inttypes.h... yes ocaml5.1.1-opam-core> checking for stdint.h... yes ocaml5.1.1-opam-core> checking for strings.h... yes ocaml5.1.1-opam-core> checking for sys/stat.h... yes ocaml5.1.1-opam-core> checking for sys/types.h... yes ocaml5.1.1-opam-core> checking for unistd.h... yes ocaml5.1.1-opam-core> checking for acl/libacl.h... no ocaml5.1.1-opam-core> checking for library containing acl_get_perm... no ocaml5.1.1-opam-core> checking for ocamlobjinfo... ocamlobjinfo ocaml5.1.1-opam-core> checking for ocamlfind... ocamlfind ocaml5.1.1-opam-core> checking for curl... no ocaml5.1.1-opam-core> checking for wget... no ocaml5.1.1-opam-core> checking for dune... dune ocaml5.1.1-opam-core> checking for patch... patch ocaml5.1.1-opam-core> checking for bunzip2... bunzip2 ocaml5.1.1-opam-core> checking for linking method... shared ocaml5.1.1-opam-core> checking for OCaml findlib package unix... found ocaml5.1.1-opam-core> checking for OCaml findlib package re 1.9.0 or later... found 1.11.0 ocaml5.1.1-opam-core> checking for OCaml findlib package base64 3.1.0 or later... no ocaml5.1.1-opam-core> checking for OCaml findlib package cmdliner... not found ocaml5.1.1-opam-core> checking for OCaml findlib package ocamlgraph... found ocaml5.1.1-opam-core> checking for OCaml findlib package cudf 0.7 or later... no ocaml5.1.1-opam-core> checking for OCaml findlib package dose3.common 6.1 or later... no ocaml5.1.1-opam-core> checking for OCaml findlib package dose3.algo 6.1 or later... no ocaml5.1.1-opam-core> checking for OCaml findlib package opam-file-format 2.1.4 or later... no ocaml5.1.1-opam-core> checking for OCaml findlib package spdx_licenses... not found ocaml5.1.1-opam-core> checking for OCaml findlib package opam-0install-cudf 0.4 or later... no ocaml5.1.1-opam-core> checking for OCaml findlib package jsonm... not found ocaml5.1.1-opam-core> checking for OCaml findlib package uutf... not found ocaml5.1.1-opam-core> checking for OCaml findlib package sha... not found ocaml5.1.1-opam-core> checking for OCaml findlib package swhid_core... not found ocaml5.1.1-opam-core> checking for OCaml findlib package mccs 1.1+17 or later... no ocaml5.1.1-opam-core> checking whether the compiler supports GNU C++... yes ocaml5.1.1-opam-core> checking whether g++ accepts -g... yes ocaml5.1.1-opam-core> checking for g++ option to enable C++11 features... none needed ocaml5.1.1-opam-core> checking whether g++ really is a C++ compiler... yes ocaml5.1.1-opam-core> configure: creating ./config.status ocaml5.1.1-opam-core> config.status: creating Makefile.config ocaml5.1.1-opam-core> config.status: creating src/ocaml-flags-configure.sexp ocaml5.1.1-opam-core> config.status: creating src/stubs/c-flags.sexp ocaml5.1.1-opam-core> config.status: creating src/stubs/libacl/c-libraries.sexp ocaml5.1.1-opam-core> Opam will be built WITH its default built-in solver ocaml5.1.1-opam-core> Executables will be installed in /nix/store/lpfjkzdn9v946g3p39zjv62r2gav0v40-ocaml5.1.1-opam-core-2.2.0/bin ocaml5.1.1-opam-core> Manual pages will be installed in /nix/store/lpfjkzdn9v946g3p39zjv62r2gav0v40-ocaml5.1.1-opam-core-2.2.0/share/man ocaml5.1.1-opam-core> Running phase: buildPhase ocaml5.1.1-opam-core> File "src/core/dune", line 6, characters 67-71: ocaml5.1.1-opam-core> 6 | (libraries re (re_export ocamlgraph) unix sha jsonm swhid_core uutf ocaml5.1.1-opam-core> ^^^^ ocaml5.1.1-opam-core> Error: Library "uutf" not found. ocaml5.1.1-opam-core> -> required by library "opam-core" in _build/default/src/core ocaml5.1.1-opam-core> -> required by _build/default/META.opam-core ocaml5.1.1-opam-core> -> required by _build/install/default/lib/opam-core/META ocaml5.1.1-opam-core> -> required by _build/default/opam-core.install ocaml5.1.1-opam-core> -> required by alias install ```
kentookura commented 4 months ago

No longer occurs after updating the flake...

LogicalOverflow commented 4 months ago

For other finding this: This problem currently (also) occurs when building from an up-to-date nixpkgs unstable, because opam-core is broken there. https://github.com/NixOS/nixpkgs/pull/329608 should fixes it and nixos-24.05 still works.