aballier / ml-overlay

7 stars 6 forks source link

Issues installing opam in gentoo-prefix #3

Closed Chobbes closed 5 years ago

Chobbes commented 5 years ago

Having some problems installing this in a gentoo prefix.

I had to modify the cudf ebuild somewhat (getting duplicated parts of the prefix in these paths)

src_install() {
        export myocamldir=`ocamlc -where`                                                                                                                                                                           
        emake BINDIR="${D}" LIBDIR="${D}/usr/$(get_libdir)" C_LIB_DIR="${D}/c-lib/" OCAMLLIBDIR=${myocamldir#*$EXPREFIX}
        dodoc BUGS ChangeLog README TODO
}

Which got cudf to install, but now I'm having problems with opam itself:

Opam will be built WITH a built-in solver

Executables will be installed in /mnt/castor/seas_home/h/hobbes/gentoo/usr/bin
Manual pages will be installed in /mnt/castor/seas_home/h/hobbes/gentoo/usr/share/man
>>> Source configured.
>>> Compiling source in /mnt/castor/seas_home/h/hobbes/gentoo/var/tmp/portage/dev-ml/opam-client-2.0.5/work/opam-2.0.5 ...
      ocamlc src/client/.opam_client.objs/byte/opamConfigCommand.{cmo,cmt} (exit 2)
(cd _build/default && /mnt/castor/seas_home/h/hobbes/gentoo/usr/bin/ocamlc.opt -w -40 -w +a-4-40-42-44-48 -safe-string -g -bin-annot -I src/client/.opam_client.objs/byte -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/bytes -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/bz2 -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/cmdliner -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/cudf -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/dose3 -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/extlib -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/mccs -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/mccs/glpk/internal -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/ocamlgraph -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-core -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-file-format -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-format -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-repository -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-solver -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-state -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/re -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/re/pcre -intf-suffix .ml -no-alias-deps -o src/client/.opam_client.objs/byte/opamConfigCommand.cmo -c -impl src/client/opamConfigCommand.ml)
File "src/client/opamConfigCommand.ml", line 38, characters 17-53:
Error: Unbound value OpamGlobalState.inferred_from_system
      ocamlc src/client/.opam_client.objs/byte/opamCommands.{cmo,cmt} (exit 2)
(cd _build/default && /mnt/castor/seas_home/h/hobbes/gentoo/usr/bin/ocamlc.opt -w -40 -w +a-4-40-42-44-48 -safe-string -g -bin-annot -I src/client/.opam_client.objs/byte -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/bytes -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/bz2 -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/cmdliner -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/cudf -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/dose3 -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/extlib -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/mccs -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/mccs/glpk/internal -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/ocamlgraph -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-core -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-file-format -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-format -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-repository -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-solver -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-state -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/re -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/re/pcre -intf-suffix .ml -no-alias-deps -o src/client/.opam_client.objs/byte/opamCommands.cmo -c -impl src/client/opamCommands.ml)
File "src/client/opamCommands.ml", line 2817, characters 51-65:
Error: The function applied to this argument has type
         ?check_extra_files:(OpamTypes.basename * (OpamHash.t -> bool)) list ->
         (int * [ `Error | `Warning ] * string) list * OpamFile.OPAM.t option
This argument cannot be applied with label ~check_upstream
    ocamlopt src/client/.opam_client.objs/native/opamConfigCommand.{cmx,o} (exit 2)
(cd _build/default && /mnt/castor/seas_home/h/hobbes/gentoo/usr/bin/ocamlopt.opt -w -40 -w +a-4-40-42-44-48 -safe-string -g -I src/client/.opam_client.objs/byte -I src/client/.opam_client.objs/native -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/bytes -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/bz2 -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/cmdliner -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/cudf -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/dose3 -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/extlib -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/mccs -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/mccs/glpk/internal -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/ocamlgraph -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-core -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-file-format -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-format -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-repository -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-solver -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/opam-state -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/re -I /mnt/castor/seas_home/h/hobbes/gentoo/usr/lib64/ocaml/re/pcre -intf-suffix .ml -no-alias-deps -o src/client/.opam_client.objs/native/opamConfigCommand.cmx -c -impl src/client/opamConfigCommand.ml)
File "src/client/opamConfigCommand.ml", line 38, characters 17-53:
Error: Unbound value OpamGlobalState.inferred_from_system
    ocamlopt src/client/.opam_client.objs/native/opamAdminCheck.{cmx,o}
File "_none_", line 1:
Warning 58: no cmx file was found in path for module Algo, and its interface was not compiled with -opaque

Any clue what to do?

aballier commented 5 years ago

your cudf change looks weird -- please post the entire log of what and how it fails (ideally in a new report so that it can be fixed independently)

the opam issue seems to be due to opam-state, what version do you have installed ?

aballier commented 5 years ago

see above