Skip to content
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

dune-site-depending libraries cannot be used in non-dune projects #11565

Closed
glondu opened this issue Mar 25, 2025 · 4 comments
Closed

dune-site-depending libraries cannot be used in non-dune projects #11565

glondu opened this issue Mar 25, 2025 · 4 comments
Labels
otherlibs Related to internal dune libraries wontfix

Comments

@glondu
Copy link
Contributor

glondu commented Mar 25, 2025

Expected Behavior

Libraries using dune-site can be used in non-dune projects.

Actual Behavior

dune-site-depending libraries depend on a Dune_site__Dune_site_data module whose implementation does not exist.

Reproduction

In Debian, virt-top depends on gettext which depends on dune-site. However, virt-top does not use dune (only ocamlfind) and the final linking step fails with:

File "_none_", line 1:
Error: No implementation provided for the following modules:
         Dune_site__Dune_site_data referenced from Dune_site__Helpers (/usr/lib/x86_64-linux-gnu/ocaml/5.3.0/dune-site/dune_site.cmxa)
ocamlopt returned with exit code 2

My understanding is that, when using dune, this module is generated by dune. I'm not sure, and I did not investigate on why this is needed, but it this is the case, it looks like a defect somewhere.

Specifications

  • Version of dune (output of dune --version): 3.17.2
  • Version of ocaml (output of ocamlc --version): 5.3.0
  • Operating system (distribution and version): Debian sid

Additional information

@maiste
Copy link
Collaborator

maiste commented Mar 31, 2025

Thanks for reporting!
I'm not sure dune-site is meant to be used outside of dune... @rgrinberg what are the expectations about it?

@maiste maiste added the otherlibs Related to internal dune libraries label Mar 31, 2025
@rgrinberg
Copy link
Member

It is generated by dune, but only when it links the final binary. dune-site is indeed dune only and other build systems would have to provide their own implementation for this module.

@Leonidas-from-XIV
Copy link
Collaborator

So I guess we can close this as WONTFIX as for the fix other build systems would need to start supporting dune-site?

@maiste
Copy link
Collaborator

maiste commented Apr 2, 2025

Indeed! Feel free to reopen if you think this is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
otherlibs Related to internal dune libraries wontfix
Projects
None yet
Development

No branches or pull requests

4 participants