owlbarn / eigen

Owl's OCaml Interface to Eigen3 C++ Library
http://eigen.tuxfamily.org/
MIT License
33 stars 12 forks source link

Build failure on platforms with no shared libraries #20

Open nandor opened 4 years ago

nandor commented 4 years ago

The library expects ocamlmklib to produce both a shared and a static library:

https://github.com/owlbarn/eigen/blob/master/eigen_cpp/dune#L3

If OCaml is compiled without shared libraries, this rule fails. Could the problematic rule be rewritten into a dune stanza that omits building a shared library for a static environment?

Dune now seems to support targets with no shared libs:

https://github.com/ocsigen/lwt/issues/599

mseri commented 4 years ago

Yes, this seems doable indeed. I don’t have time to work on it at the moment, but I would be happy to review a PR fixing it

nandor commented 4 years ago

I'd be happy to work on a patch to provide support for cross compilation and static libraries. Would it be a problem if I also upgraded to dune 2.0?

mseri commented 4 years ago

That will not be a problem as long as owl is still building fine with dune2