Closed anmonteiro closed 4 years ago
There's already logic to drop the cmxs
, see here so we could likely use it for .so
aswell. However detection relies on whether the native dynlink library is available. So using that will be wrong on a configure
with --disable-native-compiler
on a platform that does support dynlinking. Isn't configurability great ?
Better would be to use the newer supports_shared_libraries
of ocamlc -config
but that only went into 4.08.0
(topkg
still supports 4.03.0
).
I think I'll just fallback to test for the existence of either lib{asm,caml}run_shared).so
.
I added something in dfdd31983faceef7bc642d30. Could you please do an opam pin topkg --dev
to confirm it works and indicate me on which OCaml version you are actually testing this.
Thanks for jumping on this so quickly.
indicate me on which OCaml version you are actually testing this.
I'm on OCaml 4.10.
I tested the change you made and I still got the same error. I dug into the code and found that it works with the patch in #137.
Excellent thanks for digging into the stuff. I merged a slightly amended version of the patch. Once you confirm everything is right on your side we can proceed to release.
Thanks for your help with this! I can confirm mtime and ptime now build in this environment.
Releasing is up to you, don't bother if it's time consuming. I can depend on the development version for now if you want to batch other fixes eventually before getting it out.
The software is rather stable and in maintenance mode so that could be a long wait. Here you go https://github.com/ocaml/opam-repository/pull/16915 . Thanks again for pointing at the right places, it helped in doing that swiftly.
I stumbled upon this when trying to build
mtime
andptime
in a static musl-libc environment without shared library support. Error attached below.It seems like topkg is trying to generate a rule for building + installing the shared objects unconditionally (relevant snippet). It sounds like OCamlbuild might support checking this via
supports_shared_libraries
(based on this).The error is as follows: