-
Notifications
You must be signed in to change notification settings - Fork 409
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
Unable to specify a dynlink plugin build #3136
Comments
Hello, could you try #3141 and see if it solves your problem? You should use a stanza like
(note that the syntax is not final yet and may change) |
Seems to solve it indeed! Thanks! |
Great, thanks for the quick reply. The PR still needs some polishing, but hopefully will be included in the next release. |
Do you tried to link with |
#3141 was merged, so I think this can be closed. |
Hi!
I am trying to compile a dynlink plugin, and I'mhaving a hard time finding the correct dune rule for it.
My scenario is as follows:
main
executable accepts dynlink plugins. This is out of my repository and I don't own the code.lib
is a library I own.plugin
is a plugin formain
, it depends onlib
and sits in the same repository, but is in a different package.Because of the issue mentioned here (I need
-linkpkg
), the rule for building plugin is done by hand, and is currently:This works fine compilation-wise.
However, the issue I'm facing is
-package lib
is specified out of the scope of dune , and therefore is not correctly scheduled. Since they are both in the same repository, dune build fails becauselib.cmxa
is not built yet at the time this rule is executed.I tried to fix this in multiple ways, including:
(deps (package lib))
; but that fails when used with-p
option withError: No rule found for alias .lib-files
.(deps ../path/to/lib.cmxa)
, but besides being awful, it produces an error becauselib
is both present locally and installed in the opam switch.How can I properly specify the dependency to
lib
so it works both locally and in opam? More generally, is there a simpler way to specify theplugin
build without writing a custom rule?The text was updated successfully, but these errors were encountered: