vbrankov / hdf5-ocaml

OCaml wrapper for HDF5
31 stars 17 forks source link

HDF5 now requires PPX libraries? (Re-opened) #24

Closed markghayden closed 3 years ago

markghayden commented 5 years ago

[This issue was closed before I was able to respond to previous comment. I've re-opened and included additional detail below.]

When building with current HDF5 libraries, we seem to now require a Ppx_inline_test_lib Runtime module. Is this intentional? I'd guess that this is a development requirement that has slipped into the release.

best, Mark

Sorry for not replying sooner.

Short answer: Unless I'm missing something, YES!!!! these are causing lots of problems. Long answer is below.

This change draws in what seems like a massive number of other files (see portion of Makefile included at the bottom of this comment). I just finished working through the dependencies-of-dependencies-of-dependencies-of-dependencies. Using ocaml hdf5 now requires all the libraries listed below just to use read some arrays from HDF5 files. Also, my software makes use of Path module which has a name conflict with one of the modules in one of the many libraries (maybe there are more of these conflicts?).

Please understand that I distribute my software to be used on mobile devices which are cross-compiled. With this change, I now need to distribute many additional libraries and increase the size of our executables (downloaded over cellular connections). Also, I now need to make sure these libraries cross-compile for Windows, IOS, and Android... a massive undertaking that could easily take 1 month of effort just devoted to this... and then would need to be fixed every time there is a change/update to these libraries. This is all on top of the general concern of having a ton of additional software included that we don't know much about.

I hope this all makes sense. If there is some way these dependencies can be removed, that would be extremely helpful if not essential to our continued use of your otherwise very useful library. I think if there is going to be an isolated use that triggers dependencies on so many things that it might make sense to split that off as an optional HDF library.

`HDF5_INCLUDES = -I $(OCAMLLIB)/compiler-libs -I $(OCAMLSYSLIB)/ocaml-compiler-libs/shadow -I $(OCAMLSYSLIB)/ocaml-migrate-parsetree -I $(OCAMLSYSLIB)/base
-I $(OCAMLSYSLIB)/base/caml -I $(OCAMLSYSLIB)/base/shadow_stdlib -I $(OCAMLSYSLIB)/stdio -I $(OCAMLSYSLIB)/sexplib0 -I $(OCAMLSYSLIB)/ppxlib -I $(OCAMLSYSLIB)/ppxlib/ast -I $(OCAMLSYSLIB)/ppxlib/print_diff -I $(OCAMLSYSLIB)/ppxlib/traverse -I $(OCAMLSYSLIB)/ppxlib/traverse_builtins -I $(OCAMLSYSLIB)/ppx_derivers -I $(OCAMLSYSLIB)/ppx_inline_test -I $(OCAMLSYSLIB)/ppx_inline_test/config -I $(OCAMLSYSLIB)/ppx_inline_test/runtime-lib -I $(OCAMLSYSLIB)/ppx_inline_test/libname -I $(OCAMLSYSLIB)/hdf5/raw
-I $(OCAMLSYSLIB)/hdf5/caml

LIBS_HDF5 = ocaml_shadow.cma
ocamlcommon.cma ocamloptcomp.cma
sexplib0.cma
caml.cma
shadow_stdlib.cma
base.cma
stdio.cma
ppx_derivers.cma
migrate_parsetree.cma
ppxlib_traverse_builtins.cma
ppxlib_ast.cma
ppxlib_print_diff.cma
ppxlib.cma
ppxlib_traverse.cma ppx_inline_test_libname.cma ppx_inline_test.cma ppx_inline_test_lib.cma inline_test_config.cma
hdf5_raw.cma
hdf5_caml.cma `

markghayden commented 3 years ago

Tried again and this no longer seems to be an issue.