Bug#1111165: ben: Building template fails: Error: Unbound module "Ben_frontends"
Hello,
Le 15/08/2025 à 12:15, Sebastiaan Couwenberg a écrit :
Using dune [...]
Good idea.
[...] seems to work after adding the new template to templates/dune:
dune build templates/debiangis.cmxs
This does require installing libppx-yojson-conv-ocaml-dev which was not
pulled in via the libben-ocaml-dev dependencies.
This way, you might rebuild the whole ben, hence you may need all its
build-dependencies including this one.
Copying the .cmxs file to /usr/lib/ben/templates no longer works.
Even after setting BEN_TEMPLATES_DIR? Its default value is $(ocamlc
-where)/ben/templates, as you've figured out.
This did work:
su -c "mkdir /usr/lib/x86_64-linux-gnu/ocaml/5.3.0/ben/templates/
debiangis"
su -c "cp -v _build/default/templates/debiangis.* /usr/lib/x86_64-
linux-gnu/ocaml/5.3.0/ben/templates/debiangis/"
What is the recommended way to build & install a custom template?
There is no "recommended" way, the way you did seems fine.
If you do not want to fiddle with ben sources:
https://salsa.debian.org/debian/ben/-/tree/master/examples/custom-template
Cheers,
--
Stéphane
Reply to: