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

Error when running ocsigenserver: The module `B' is not yet initialized #775

Closed
bguil opened this issue Dec 7, 2023 · 4 comments · Fixed by #776
Closed

Error when running ocsigenserver: The module `B' is not yet initialized #775

bguil opened this issue Dec 7, 2023 · 4 comments · Fixed by #776

Comments

@bguil
Copy link

bguil commented Dec 7, 2023

With Ocaml 5.1.0 and eliom 10.1.2 installed on MacOSX, I have a strange bug which seems to be linked to the names of the files:

Step to reproduce:

  • eliom-distillery -name test_eliom
  • in test_eliom directory make test.opt works as expected
  • add a new file b.eliom with one line module M = Map.Make (String)
  • add a new file a.eliom with one line let _ = B.M.empty
  • then make test.opt produces the error:
ocsigenserver.opt: main: Fatal - Error in configuration file: Error while parsing configuration file: Eliom: while loading local/lib/test_eliom/test_eliom.cmxs: error while linking [...]/test_eliom/local/lib/test_eliom/test_eliom.cmxs.
ocsigenserver.opt: main: The module `B' is not yet initialized

NOTE: if you rename a.eliom into c.eliom, the error disappears!

Is seems that the problem is linked to the names of the modules:

  • a.eliom depends on b.eliom
  • a.eliom is before b.eliom following alphabetical order

Note also that I do not have the error with OCaml 4.14.1 and eliom 10.1.2

@bguil
Copy link
Author

bguil commented Dec 8, 2023

The problem is still present with the last Ocaml release (5.1.1) announced today.

@vouillon
Copy link
Member

vouillon commented Dec 8, 2023

Thanks for your detailed bug report! This is fixed by #776.

@bguil
Copy link
Author

bguil commented Dec 8, 2023

Thanks for the fix. I've updated the Makefile following your PR, it's fixed.

I'd also like to take this opportunity to also mention a problem that sometimes occurs. When a module name is changed, sometimes doing make clean && make is not enough and I have to run rm -rf _deps to come to a running version.
Perhaps the Makefile can be improved to avoid this?

@balat balat closed this as completed in #776 Dec 8, 2023
@balat
Copy link
Member

balat commented Dec 8, 2023

Thank you for the bug report. We will release a new version version soon.
It will also contain a new template with dune-based build system.
I recommend to switch to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants