yallop / ocaml-ctypes

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

bad META file #754

Open mobileink opened 10 months ago

mobileink commented 10 months ago

There’s something flaky about the ctypes package. The <switchprefix>/lib/ctypes/META file says package "foreign" ( directory = "foreign" version = "0.21.1" requires = "ctypes-foreign" ) But there is no /lib/ctypes/foreign directory. I've checked this for switchs 4.14.0 and 5.1.0~rc2.

The reference for META syntax says, wrt to the "directory" variable: "The base directory for subpackages is the package directory of the containing package.". So I think there's something wrong here.

Furthermore, the dune-package file says: (deprecated_library_name (old_public_name ctypes.foreign) (new_public_name ctypes-foreign))

The opam file has no relevant info. If I run ocamlfind query ctypes.foreign, the output is $HOME/.opam/5.0.0/lib/ctypes/foreign which does not exist.

dbuenzli commented 9 months ago

FWIW I'm having this problem too, but I suspect the problem is rather with dune's META file generation.

Workaround is to depend on ctypes-foreign.