Ocsigenserver installation failed

Hi,
I try to install eliom but the compilation of ocsigenserver failed.
Sys: Debian10
OCaml version 4.05.0

~/$ opam install eliom
return:
#=== ERROR while compiling ocsigenserver.2.9 ==========================
# context 2.0.3 | linux/x86_64 | ocaml-system.4.05.0 | https://opam
# path ~/.opam/default/.opam-switch/build/ocsigenserver.2.9
# command ~/.opam/opam-init/hooks/sandbox.sh build make
# exit-code 2
# env-file ~/.opam/log/ocsigenserver-12464-ad6566.env
# output-file ~/.opam/log/ocsigenserver-12464-ad6566.out
### output ###
# […]
# ocamlfind ocamlc -g -bin-annot -thread -I …/…/baselib -I …/…/htt pgocaml -package lwt -c ocsipersist.ml
# File “ocsipersist.ml”, line 56, characters 34-41:
# Error: The function applied to this argument has type
# ?check:('a -> (bool -> unit) -> unit) -> 'a Lwt_pool.t
# This argument cannot be applied with label ~dispose
# make[3]: *** [Makefile:46: ocsipersist.cmo] Error 2
# make[3] : on quitte le répertoire « /home/guillaume/.opam/default/.op/ocsipersist-pgsql »
# make[2]: *** [Makefile:52: byte] Error 2
# make[2] : on quitte le répertoire « /home/guillaume/.opam/default/.op »
# make[1]: *** [Makefile:7: all] Error 2
# make[1] : on quitte le répertoire « /home/guillaume/.opam/default/.op
# make: *** [Makefile:8: all] Error 2

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><
┌─ The following actions failed
│ λ build ocsigenserver 2.9
└─
Thks for help.

Hi,
It seems that you have an old version of Lwt_pool installed.
Also you are using an old version of OCaml. I am not sure it is still supported by all Ocsigen packages.
Try to upgrade to OCaml >= 4.07.
Vincent

I restart my setting from scratch:
remove & purge ocaml - opam
remove .opam
install opam:

~/$ sudo apt install opam

Upgrade last v. of ocaml:

~/$ opam switch create 4.09.0

~/$ ocaml -version
The OCaml toplevel, version 4.09.0

Now i have this error when i try to install a package:

~/$ opam install eliom
Sorry, no solution found: there seems to be a problem with your request.

No solution found, exiting
:thinking:

~/$ opam list
**# Packages matching: installed**
**# Name              # Installed # Synopsis**
**base-bigarray       base**
**base-threads        base**
**base-unix           base**
**ocaml               4.09.0      The OCaml compiler (virtual package)**
**ocaml-base-compiler 4.09.0      Official release 4.09.0**
**ocaml-config        1           OCaml Switch Configuration**

Installing with 4.05 seems to work fine for me, with the following solution: https://gist.github.com/Octachron/5fb1cf400d11b0d6435696064055cbf6 (that you can import with

opam switch import name_of_downloaded_gist

)

So to fix the problem of packages installation:
sudo apt install mccs
opam init --solver=mccs
Then
opam instal eliom
return:
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of eliom failed at “/home/guillaume/.opam/opam-init/hooks/sandbox.sh build make”.

#=== ERROR while compiling eliom.6.3.0 ========================================#
# context     2.0.3 | linux/x86_64 | ocaml-system.4.05.0 | https://opam.ocaml.org#f70ee2a2
# path        ~/.opam/default/.opam-switch/build/eliom.6.3.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build make
# exit-code   2
# env-file    ~/.opam/log/eliom-28510-d8a4ae.env
# output-file ~/.opam/log/eliom-28510-d8a4ae.out
### output ###
# [...]
# ocamlfind ocamldep -package unix,findlib -modules src/tools/eliompp_lexer.ml > src/tools/eliompp_lexer.ml.depends
# ocamlfind ocamlc -c -g -keep-locs -package unix,findlib -w +A-4-6-7-9-27-37-40-42-44-48 -I src/tools -o src/tools/eliompp_lexer.cmo src/tools/eliompp_lexer.ml
# ocamlfind ocamlc -c -g -keep-locs -package unix,findlib -w +A-4-6-7-9-27-37-40-42-44-48 -I src/tools -o src/tools/eliompp.cmo src/tools/eliompp.ml
# ocamlfind ocamlopt -c -g -keep-locs -package unix,findlib -w +A-4-6-7-9-27-37-40-42-44-48 -I src/tools -o src/tools/eliompp_lexer.cmx src/tools/eliompp_lexer.ml
# ocamlfind ocamlopt -c -g -keep-locs -package unix,findlib -w +A-4-6-7-9-27-37-40-42-44-48 -I src/tools -o src/tools/eliompp.cmx src/tools/eliompp.ml
# ocamlfind ocamlopt -linkpkg -g -keep-locs -package unix,str,findlib -I src/tools src/tools/eliompp_lexer.cmx src/tools/eliompp.cmx -o src/tools/eliompp.native
# ln -f src/tools/eliomc.native src/tools/js_of_eliom.native
# ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -modules src/lib/client/eliom_bus.mli > src/lib/client/eliom_bus.mli.depends
# + ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -modules src/lib/client/eliom_bus.mli > src/lib/client/eliom_bus.mli.depends
# ocamlfind: Package `js_of_ocaml-lwt.logger' not found
# Command exited with code 2.
# make: *** [Makefile:7: all] Error 10
indent preformatted text by 4 spaces

The ocsigenserver is installed; so do I need this eliom packages?

Note that the fix to this eliom issue is to fix the version of js_of_ocaml-lwt to 3.1.0.

Downgrade the package didn’t work:
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[eliom.6.3.0] found in cache
[js_of_ocaml-lwt.3.1.0] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⊘ removed   js_of_ocaml-lwt.3.3.0
∗ installed js_of_ocaml-lwt.3.1.0
[ERROR] The compilation of eliom failed at "/home/guillaume/.opam/opam-init/hooks/sandbox.sh build make".

#=== ERROR while compiling eliom.6.3.0 ========================================#
# context     2.0.3 | linux/x86_64 | ocaml-system.4.05.0 | https://opam.ocaml.org#f70ee2a2
# path        ~/.opam/default/.opam-switch/build/eliom.6.3.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build make
# exit-code   2
# env-file    ~/.opam/log/eliom-21064-3bd1cf.env
# output-file ~/.opam/log/eliom-21064-3bd1cf.out
### output ###
# [...]
# ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -modules src/lib/client/eliom_lib_base.mli > src/lib/client/eliom_lib_base.mli.depends
# ocamlfind ocamlc -c -g -keep-locs -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -w +A-4-6-7-9-27-37-40-42-44-48 -I src/lib -I src/lib/client -o src[...]
# ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -modules src/lib/client/eliom_parameter.mli > src/lib/client/eliom_parameter.mli.d[...]
# ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -modules src/lib/client/eliom_parameter_sigs.mli > src/lib/client/eliom_parameter_[...]
# ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -package js_of_ocaml.ppx -package js_of_ocaml-ppx.deriving,lwt.ppx,js_of_ocaml-lwt[...]
# ocamlfind ocamldep -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -package js_of_ocaml.ppx -package js_of_ocaml-ppx.deriving,lwt.ppx,js_of_ocaml-lwt[...]
# ocamlfind ocamlc -c -g -keep-locs -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -w +A-4-6-7-9-27-37-40-42-44-48 -I src/lib -I src/lib/client -o src[...]
# + ocamlfind ocamlc -c -g -keep-locs -package js_of_ocaml-ppx.deriving -package react,js_of_ocaml,reactiveData -package lwt_react,tyxml.functor,js_of_ocaml.tyxml,js_of_ocaml-lwt,js_of_ocaml-lwt.logger -package deriving.runtime,js_of_ocaml.deriving -package ocsigenserver.cookies,ocsigenserver.polytables,ocsigenserver.baselib.base -w +A-4-6-7-9-27-37-40-42-44-48 -I src/lib -I src/lib/client -o s[...]
# File "src/lib/eliom_lib.client.mli", line 35, characters 27-31:
# Error: Unbound module Js
# Command exited with code 2.
# make: *** [Makefile:7: all] Error 10



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build eliom 6.3.0
└─ 
┌─ The following changes have been performed
│ ↘ downgrade js_of_ocaml-lwt 3.3.0 to 3.1.0
└─

I forgot that the main js_of_ocaml package needs to be downgraded to 3.1.0 too.

Done Thanks for your help. :grinning:

The fix (short way):

Ocaml 4.05 works fine.
Downgrade js_of_ocaml.3.1.0 & js_of_ocaml-lwt.3.1.0
reinstall eliom

Concerning the solver I suppose its link with Debian 10.

Glad you found a solution. I guess 4.09 is too recent and some dependency has not been upgraded yet.
You don’t need to downgrade js_of_ocaml with more recent versions.

Keep us informed about your progress with Ocsigen.
I recommend to start with Ocsigen Start, which will give you a good overview of what you can do, and read the tutorials before the manuals (documentation is huge).

Thks for help.
No doubt I will come back with tricky questions around Ocaml & Ocsigen…