1

I have updated eliom to the latest version (5.0.0) installed via opam, and it fails. I have tried both with 4.02.1 & 4.02.3 compiler, but, it fails to compile basic eliom :

eliomdep -client -ppx -package lwt.ppx -package js_of_ocaml.deriving.ppx -package js_of_ocaml.ppx mysite.eliom > _deps/mysite.eliom.client
Fatal error: exception Fl_package_base.No_such_package("js_of_ocaml.deriving.ppx", "")
make: *** [_deps/mysite.eliom.client] Erreur 2

Any idea ?

Pierre G.
  • 4,346
  • 1
  • 12
  • 25

2 Answers2

1

You seems to be missing the ppx deriving plugin. It's an optional dependency.

opam install ppx_deriving

Are you using the base template ? I don't remember any use of ppx deriving in it.

Drup
  • 3,679
  • 13
  • 14
  • I 've just tried to install ppx_deriving : "js_of_ocaml.2.7 is in conflict with ppx_deriving.1.1". And I am using the base template : "eliom-distillery -name mysite -template basic.ppx -target-directory mysite" ; then "cd mysite; make test.byte" that's all. – Pierre G. Feb 04 '16 at 19:10
  • ppx_deriving.1.1 is a quite old version. You should use 3.0. `opam install ppx_deriving.3.0`. You may want to read https://opam.ocaml.org/doc/Install.html#ExternalSolvers too. – Drup Feb 04 '16 at 19:18
  • Installation is fine with ocaml 4.02.3 - but I still get the error when producing test.byte. The failing command is : js_of_eliom -ppx -c -package lwt.ppx -package js_of_ocaml.deriving.ppx -package js_of_ocaml.ppx mysite.eliom ; when manually I type this command without ".ppx", it works ("js_of_eliom -ppx -c -package lwt -package js_of_ocaml.deriving -package js_of_ocaml mysite.eliom") – Pierre G. Feb 04 '16 at 19:33
  • Does the package even exist ? You can check using `ocamlfind list`. – Drup Feb 04 '16 at 19:43
1

It looks like there is a flaw in Makefile.options generated by eliom-distillery : the CLIENT_PACKAGES is initially equal to a list of <package>.ppx ; one has to remove .ppx extension to get it works:

initial Makefile.options

...
# OCamlfind packages for the server
SERVER_PACKAGES := lwt.ppx js_of_ocaml.deriving.ppx
# OCamlfind packages for the client
CLIENT_PACKAGES := lwt.ppx js_of_ocaml.deriving.ppx js_of_ocaml.ppx
...

corrected Makefile.options :

...
# OCamlfind packages for the server
SERVER_PACKAGES := lwt js_of_ocaml.deriving
# OCamlfind packages for the client
CLIENT_PACKAGES := lwt js_of_ocaml.deriving js_of_ocaml
...

This is due to ppx-deriving.3.0 that is not installed. (Thx to Drup)

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Pierre G.
  • 4,346
  • 1
  • 12
  • 25