-
Notifications
You must be signed in to change notification settings - Fork 410
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 and mt predicate #96
Comments
So far predicates were not needed so they are not supported to simplify things, it's one less concept to understand for users. I think supporting this would be a lot of work for little benefit, if any. Especially given that support for multicore is coming. |
Ok it is reasonable. I think something should be said in the manual for advanced user. And shouldn't thread be always linked in that case? |
Ok, I added a comment about it in the manual.
they will be linked if you depend directly or indirectly on the threads library. |
Ok so I'm going to propose an MR that adds ocamlfind heuristics for missing thread dependency (and I should also try to ask lablgtk to fix its meta). |
I'm a bit confused, what would such a heuristic do? |
The ocamlfind heuristic is when If you want that binary for which no packages use the
the heuristic adds But I think that if |
Seems to me that lablgtk should just say:
If only a handful of packages are affected, i'd rather document that people need to add an explicit dependency on threads when using such packages rather than add some magic. |
However i'm happy to detect such cases and print a warning, to help users understand what's happening and fix their linking errors |
The
mt
predicate is forced by jbuilder.What is the rational for that? For example Lablgtk can be used without threads, jbuilder force the user to use them (or perhaps it change nothing when you don't use them).
ocamlfind has some heuristics for adding missing
threads
dependency (eg. lablgtk with mt doesn't depend on thread):It seems to me that jbuilder doesn't have them, even if ,maybe by chance , program that use lablgtk and threads can be linked well.
The text was updated successfully, but these errors were encountered: