Error: Reference to undefined global `Build_info__Build_info_data'
Expected Behavior
I would like to be able to load dune-build-info inside an Ocaml top level which is a dependency of Ocaml-RDF
Actual Behavior
When I am trying to load "_opam/lib/dune-build-info/build_info.cma"
I get the following error :
Error: Reference to undefined global `Build_info__Build_info_data'
Reproduction
-
opam switch create . --empty -
opam install dune-build-info=3.0.3 -
eval $(opam env) -
ocaml -
# #directory "_opam/lib/dune-build-info";; -
# #load "_opam/lib/dune-build-info/build_info.cma";;
Specifications
- Version of
dune(output ofdune --version): 3.0.3 - Version of
ocaml(output ofocamlc --version) 4.14.0 - Operating system (distribution and version): Debian GNU/Linux 11
What are you trying to do? Build_info_data is a module that is generated by Dune at link-time of executables that make use of build-info library.
I am trying to run an OCaml top level with rdf modules loaded.
So I have made a dune project with rdf=0.13.0 as a dependency and when I am trying to run ocaml and invoke #use_output "dune ocaml top" to load the every modules, the following outputted line is leading to the described error
...
#load ".../_opam/lib/dune-build-info/build_info.cma";;
...
My understanding is that this line is appearing on dune ocaml top output because ocaml-rdf is depending on the dune-build-info package. Is that correct ?
Thanks for your quick reply
My understanding is that this line is appearing on
dune ocaml topoutput because ocaml-rdf is depending on thedune-build-infopackage. Is that correct ?
Yes. I don't see a way to make this work at the moment, but perhaps I am missing something. @rgrinberg do see how to make this work?
I suppose it's the same issue with loading virtual libraries into the toplevel. We should generate this module when trying to load it into the toplevel.
I also got the same error message (also with rdf lib).
I get that errmsg from within utop, but also when just compiling my code and not using utop - no toplevel involved.
When I remove the -linkpkg option from my compilation, the error disappears, but then I can't load Submodules like Term for example.