-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Threads library explicitely required to build with netsys #1024
Comments
I'm not sure why it works with ocamlfind, maybe ocamlfind does some magic to automatically add |
Might be related to #96? |
Not really, the META file of netsys still looks wrong to me and it should declare a dependency on |
Ah, looking at #96 I see that ocamlfind indeed has some magic. I'm not really keen on adding this to dune though. Could you try sending a patch to netsys instead? |
It is already reported at https://gitlab.camlcity.org/gerd/lib-ocamlnet3/issues/14 Closing this issue then. Thanks! |
When using the
netsys
library (from ocamlnet), it is necessary to add thethreads
library to thelibraries
field BEFORE thenetsys
library. This is confusing because usually I think the order of the libraries doesn't matter. And when using ocamlbuild, there is no need to specify the dependency onthreads
.The
threads
might be necessary because there is norequires(mt) += "threads"
in the META file of netsys. But I didn't read in dune's documentation that the order inlibraries
is important.Files to reproduce:
main.ml:
dune file I expected to work:
dune file with threads not working:
dune file working:
To compile with ocamlbuild:
Netsys META file:
The text was updated successfully, but these errors were encountered: