yallop / ocaml-ctypes

Library for binding to C libraries using pure OCaml
MIT License
363 stars 95 forks source link

cannot install ctypes.0.17.1 on ocaml-4.10.0 #657

Closed UnixJunkie closed 3 years ago

UnixJunkie commented 3 years ago
The following actions will be performed:
  ∗ install ctypes 0.17.1

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ctypes.0.17.1] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of ctypes failed at "/home/berenger/.opam/opam-init/hooks/sandbox.sh build make XEN=disable libffi.config".

#=== ERROR while compiling ctypes.0.17.1 ======================================#
# context              2.0.3 | linux/x86_64 | ocaml-base-compiler.4.10.0 | git+https://github.com/ocaml/opam-repository.git
# path                 ~/.opam/default/.opam-switch/build/ctypes.0.17.1
# command              ~/.opam/opam-init/hooks/sandbox.sh build make XEN=disable libffi.config
# exit-code            2
# env-file             ~/.opam/log/ctypes-10370-d2c37b.env
# output-file          ~/.opam/log/ctypes-10370-d2c37b.out
### output ###
# [...]
# ./src/discover/determine_as_needed_flags.sh >> asneeded.config
# ocamlfind  ocamlc -o discover -package str -strict-sequence -linkpkg src/discover/commands.mli src/discover/commands.ml src/discover/discover.ml -I src/discover
# ./discover -ocamlc "ocamlfind  ocamlc" > libffi.config || (rm libffi.config && false)
# testing for brew: .............................. available
# testing for MacPorts: .......................... unavailable
# Fatal error: exception Stdlib.Exit
# ocamlfind  ocamlc -o discover -package str -strict-sequence -linkpkg src/discover/commands.mli src/discover/commands.ml src/discover/discover.ml -I src/discover
# ./discover -ocamlc "ocamlfind  ocamlc" > libffi.config || (rm libffi.config && false)
# testing for brew: .............................. available
# testing for MacPorts: .......................... unavailable
# Fatal error: exception Stdlib.Exit
# make: *** No rule to make target 'libffi.config'.  Stop.

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ctypes 0.17.1
└─ 
╶─ No changes have been performed
UnixJunkie commented 3 years ago

opam pinning to the git repos. does not help

UnixJunkie commented 3 years ago

maybe related to https://github.com/ocamllabs/ocaml-ctypes/issues/647

UnixJunkie commented 3 years ago

I cannot reproduce, but this is the second time I end up in an opam and system state where ctypes cannot be installed...

UnixJunkie commented 3 years ago

If I opam uninstall ctypes-foreign, then ctypes installs successfully... ?!

yallop commented 3 years ago

The ctypes opam build instructions build the foreign subpackage only if ctypes-foreign is installed.

UnixJunkie commented 3 years ago

Just for the record:

opam depext -i ctypes-foreign ctypes # fails with the above error
opam remove ctypes-foreign; opam install ctypes # just works