Hi, Iβm trying to use Jupyter OCaml kernel on Ubuntu 24.04 for ARM64 architecture and encountered the followiong error along the way.
$ uname
Linux taulecgw 6.8.0-1021-azure #25-Ubuntu SMP Wed Jan 15 20:23:05 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
In this environment, I did the following
[1] bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh)"
(according to Install OCaml )
[2] opam init --yes
[3] eval $(opam env); opam install jupyter --yes
Then I got this error (I attached the whole log):
#=== ERROR while compiling ocaml-variants.4.12.0+domains+effects ==============#
# context 2.3.0 | linux/arm64 | | https://opam.ocaml.org#a8ed476033bb6d4d29d63b5907404e6ef35a302d
# path ~/.opam/default/.opam-switch/build/ocaml-variants.4.12.0+domains+effects
# command /usr/bin/make -j1
# exit-code 2
# env-file ~/.opam/log/ocaml-variants-213939-0bd9ab.env
# output-file ~/.opam/log/ocaml-variants-213939-0bd9ab.out
### output ###
# [...]
# fiber.c: In function βcaml_maybe_expand_stackβ:
# fiber.c:235:53: error: βWosize_gc_regsβ undeclared (first use in this function
)
# 235 | value* bucket = caml_stat_alloc(sizeof(value) * Wosize_gc_regs);
# | ^~~~~~~~~~~~~~
# fiber.c:235:53: note: each undeclared identifier is reported only once for eac
h function it appears in
# make[3]: *** [Makefile:378: fiber.n.o] Error 1
# make[3]: Leaving directory '/home/u25998/.opam/default/.opam-switch/build/ocaml-variants.4.12.0+domains+effects/runtime'
FWIW, I searched ~/.opam/default/.opam-switch/build/ocaml-variants.4.12.0+domains+effects
for Wosize_gc_regs
and found that it is defined in ~/.opam/default/.opam-switch/build/ocaml-variants.4.12.0+domains+effects/runtime/caml/stack.h
when TARGET_amd64
is set and not defined otherwise, which suggests this code only works for amd64 arch.
I also noticed that installing jupyter package has an effect of removing a number of packages (below), so I am a bit worrying if jupyter is an outdated package.
β β remove base-domains base
β β remove base-effects base
β β remove base-nnp base
β β remove ocaml 5.3.0
β β remove ocaml-base-compiler 5.3.0
β β remove ocaml-compiler 5.3.0
β β remove ocaml-config 3
β β remove ocaml-options-vanilla 1
I have been using opam jupyter package on amd64 architecture for years and this time I tried to switch to ARM64. If there is an alternative to installing opam jupyter package for using Jupyter + OCaml, I wonβt stick to the way I am accustomed to. Any suggestion is appreciated.
Sorry, forgot to attach the whole log, which is this.
u25997@taulecgw:~$ opam init --yes
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg
command on your system.
- you won't be able to use darcs repositories unless you install the darcs
command on your system.
[ERROR] Sandboxing is not working on your platform ubuntu:
"~/.opam/opam-init/hooks/sandbox.sh build sh -c echo SUCCESS | tee
check-write" exited with code 1 "bwrap: loopback: Failed RTM_NEWADDR:
Operation not permitted"
Do you want to disable it? Note that this will result in less secure package
builds, so please ensure that you have some other isolation mechanisms in
place (such as running within a container or virtual machine). [y/n] y
<><> Fetching repository information <><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
<><> Required setup - please read ><><><><><><><><><><><><><><><><><><><><><><>
In normal operation, opam only alters files within ~/.opam.
However, to best integrate with your system, some environment variables
should be set. If you allow it to, this initialisation step will update
your bash configuration by adding the following line to ~/.bash_profile:
test -r '/home/u25997/.opam/opam-init/init.sh' && . '/home/u25997/.opam/opam-init/init.sh' > /dev/null 2> /dev/null || true
Otherwise, every time you want to access your opam installation, you will
need to run:
eval $(opam env)
You can always re-run this setup with 'opam init' later.
[WARNING] Shell not updated in non-interactive mode: use --shell-setup
<><> Creating initial switch 'default' (invariant ["ocaml" {>= "4.05.0"}] - initially with ocaml-base-compiler)
<><> Installing new switch packages ><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml" {>= "4.05.0"}]
<><> Processing actions ><><><><><><><><><><><><><><><><><><><><><><><><><><><>
β installed base-bigarray.base
β installed base-threads.base
β installed base-unix.base
β installed ocaml-options-vanilla.1
β¬ retrieved ocaml-config.3 (2 extra sources)
β¬ retrieved ocaml-config.3 (2 extra sources)
β¬ retrieved ocaml-compiler.5.3.0 (https://opam.ocaml.org/cache)
β installed ocaml-compiler.5.3.0
β installed ocaml-base-compiler.5.3.0
β installed ocaml-config.3
β installed ocaml.5.3.0
β installed base-domains.base
β installed base-effects.base
β installed base-nnp.base
Done.
# To update the current shell environment, run: eval $(opam env
--switch=default)
u25997@taulecgw:~$ opam install --yes jupyter
The following actions will be performed:
=== remove 3 packages
β ocaml-base-compiler 5.3.0 [conflicts with ocaml-config]
β ocaml-compiler 5.3.0
β ocaml-options-vanilla 1
[conflicts with ocaml-option-nnp]
=== downgrade 2 packages
β ocaml 5.3.0 to 4.12.0 [required by jupyter]
β ocaml-config 3 to 2 [required by ocaml]
=== recompile 3 packages
β» base-domains base [uses ocaml-variants]
β» base-effects base [uses ocaml-variants]
β» base-nnp base
[uses ocaml-option-nnp, base-domains]
=== install 40 packages
β base v0.15.1 [required by ppx_yojson_conv]
β base-bytes base [required by ocplib-endian]
β base64 3.5.1 [required by jupyter]
β conf-gmp 4
[required by conf-gmp-powm-sec, zarith]
β conf-gmp-powm-sec 3 [required by cryptokit]
β conf-pkg-config 4
[required by zarith, conf-zlib, conf-zmq]
β conf-zlib 1 [required by cryptokit]
β conf-zmq 0.1 [required by zmq]
β cppo 1.8.0 [required by ppx_deriving]
β cryptokit 1.20 [required by jupyter]
β csexp 1.5.2
[required by dune-configurator]
β dune 3.17.2 [required by jupyter]
β dune-configurator 3.17.2 [required by cryptokit, zmq]
β jupyter 2.8.3
β logs 0.7.0 [required by jupyter]
β lwt 5.9.1 [required by jupyter]
β lwt_ppx 5.9.1 [required by jupyter]
β ocaml-compiler-libs v0.12.4 [required by ppxlib]
β ocaml-option-nnp 1 [required by ocaml-variants]
β ocaml-variants 4.12.0+domains+effects [required by ocaml]
β ocamlbuild 0.16.1 [required by logs, uuidm]
β ocamlfind 1.9.8
[required by ppx_deriving, logs, uuidm]
β ocplib-endian 1.2 [required by lwt]
β octavius 1.2.2 [required by ppx_js_style]
β ppx_derivers 1.2.1 [required by ppx_deriving]
β ppx_deriving 6.0.3 [required by jupyter]
β ppx_js_style v0.15.0 [required by ppx_yojson_conv]
β ppx_yojson_conv v0.15.1 [required by jupyter]
β ppx_yojson_conv_lib v0.15.0 [required by ppx_yojson_conv]
β ppxlib 0.35.0
[required by ppx_deriving, lwt_ppx, ppx_yojson_conv]
β seq base [required by yojson]
β sexplib0 v0.15.1 [required by ppxlib, base]
β stdint 0.7.2 [required by jupyter]
β stdlib-shims 0.3.0 [required by ppxlib]
β topkg 1.0.8 [required by logs, uuidm]
β uuidm 0.9.8 [required by jupyter]
β yojson 2.2.2 [required by jupyter]
β zarith 1.14 [required by cryptokit]
β zmq 5.3.0 [required by jupyter]
β zmq-lwt 5.3.0 [required by jupyter]
<><> Processing actions ><><><><><><><><><><><><><><><><><><><><><><><><><><><>
β removed ocaml-options-vanilla.1
β¬ retrieved conf-gmp.4 (https://opam.ocaml.org/cache)
β installed conf-gmp.4
β¬ retrieved base64.3.5.1 (https://opam.ocaml.org/cache)
β installed conf-pkg-config.4
β installed conf-zlib.1
β¬ retrieved conf-gmp-powm-sec.3 (https://opam.ocaml.org/cache)
β installed conf-gmp-powm-sec.3
β¬ retrieved conf-zmq.0.1 (https://opam.ocaml.org/cache)
β installed conf-zmq.0.1
β¬ retrieved base.v0.15.1 (https://opam.ocaml.org/cache)
β¬ retrieved cppo.1.8.0 (https://opam.ocaml.org/cache)
β¬ retrieved csexp.1.5.2 (https://opam.ocaml.org/cache)
β¬ retrieved cryptokit.1.20 (https://opam.ocaml.org/cache)
β¬ retrieved logs.0.7.0 (https://opam.ocaml.org/cache)
β¬ retrieved jupyter.2.8.3 (https://opam.ocaml.org/cache)
β¬ retrieved ocaml-compiler-libs.v0.12.4 (https://opam.ocaml.org/cache)
β¬ retrieved dune.3.17.2, dune-configurator.3.17.2 (https://opam.ocaml.org/cache)
β removed base-effects.base
β removed base-nnp.base
β removed base-domains.base
β removed ocaml.5.3.0
β removed ocaml-config.3
β removed ocaml-base-compiler.5.3.0
β removed ocaml-compiler.5.3.0
β installed ocaml-option-nnp.1
β¬ retrieved ocaml-config.2 (2 extra sources)
β¬ retrieved ocaml-config.2 (2 extra sources)
β¬ retrieved lwt.5.9.1, lwt_ppx.5.9.1 (https://opam.ocaml.org/cache)
β¬ retrieved ocamlbuild.0.16.1 (https://opam.ocaml.org/cache)
β¬ retrieved ocamlfind.1.9.8 (https://opam.ocaml.org/cache)
β¬ retrieved ocplib-endian.1.2 (https://opam.ocaml.org/cache)
β¬ retrieved octavius.1.2.2 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_derivers.1.2.1 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_deriving.6.0.3 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_js_style.v0.15.0 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_yojson_conv_lib.v0.15.0 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_yojson_conv.v0.15.1 (https://opam.ocaml.org/cache)
β¬ retrieved seq.base (2 extra sources)
β¬ retrieved seq.base (2 extra sources)
β¬ retrieved ppxlib.0.35.0 (https://opam.ocaml.org/cache)
β¬ retrieved sexplib0.v0.15.1 (https://opam.ocaml.org/cache)
β¬ retrieved stdint.0.7.2 (https://opam.ocaml.org/cache)
β¬ retrieved stdlib-shims.0.3.0 (https://opam.ocaml.org/cache)
β¬ retrieved uuidm.0.9.8 (https://opam.ocaml.org/cache)
β¬ retrieved topkg.1.0.8 (https://opam.ocaml.org/cache)
β¬ retrieved yojson.2.2.2 (https://opam.ocaml.org/cache)
β¬ retrieved zarith.1.14 (https://opam.ocaml.org/cache)
β¬ retrieved zmq.5.3.0, zmq-lwt.5.3.0 (https://opam.ocaml.org/cache)
β¬ retrieved ocaml-variants.4.12.0+domains+effects (git+https://github.com/ocaml-multicore/ocaml-multicore.git#4.12+domains+effects)
[ERROR] The compilation of ocaml-variants.4.12.0+domains+effects failed at
"make -j1".
#=== ERROR while compiling ocaml-variants.4.12.0+domains+effects =============#
# context 2.3.0 | linux/arm64 | | https://opam.ocaml.org#a8ed476033bb6d4d29d63b5907404e6ef35a302d
# path ~/.opam/default/.opam-switch/build/ocaml-variants.4.12.0+domains+effects
# command /usr/bin/make -j1
# exit-code 2
# env-file ~/.opam/log/ocaml-variants-249839-e66665.env
# output-file ~/.opam/log/ocaml-variants-249839-e66665.out
### output ###
# [...]
# fiber.c: In function βcaml_maybe_expand_stackβ:
# fiber.c:235:53: error: βWosize_gc_regsβ undeclared (first use in this function)
# 235 | value* bucket = caml_stat_alloc(sizeof(value) * Wosize_gc_regs);
# | ^~~~~~~~~~~~~~
# fiber.c:235:53: note: each undeclared identifier is reported only once for each function it appears in
# make[3]: *** [Makefile:378: fiber.n.o] Error 1
# make[3]: Leaving directory '/home/u25997/.opam/default/.opam-switch/build/ocaml-variants.4.12.0+domains+effects/runtime'
# make[2]: *** [Makefile:766: makeruntimeopt] Error 2
# make[2]: Leaving directory '/home/u25997/.opam/default/.opam-switch/build/ocaml-variants.4.12.0+domains+effects'
# make[1]: *** [Makefile:216: opt.opt] Error 2
# make[1]: Leaving directory '/home/u25997/.opam/default/.opam-switch/build/ocaml-variants.4.12.0+domains+effects'
# make: *** [Makefile:276: world.opt] Error 2
<><> Error report ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
ββ The following actions failed
β Ξ» build ocaml-variants 4.12.0+domains+effects
ββ
ββ The following changes have been performed (the rest was aborted)
β β remove base-domains base
β β remove base-effects base
β β remove base-nnp base
β β remove ocaml 5.3.0
β β remove ocaml-base-compiler 5.3.0
β β remove ocaml-compiler 5.3.0
β β remove ocaml-config 3
β β remove ocaml-options-vanilla 1
β β install conf-gmp 4
β β install conf-gmp-powm-sec 3
β β install conf-pkg-config 4
β β install conf-zlib 1
β β install conf-zmq 0.1
β β install ocaml-option-nnp 1
ββ
# To update the current shell environment, run: eval $(opam env)
The former state can be restored with:
/usr/local/bin/opam switch import
"/home/u25997/.opam/default/.opam-switch/backup/state-20250317074243.export"
Or you can retry to install your package selection with:
/usr/local/bin/opam install --restore
u25997@taulecgw:~$
I was going to ask why are you using such a low OCaml version but I guess you donβt have a choice. Now it seems the solver gave you an experimental ocaml version:
I also had a look at opam info jupyter
and is seems you just need < 5.
Perhaps you could try to start over with:
opam switch create for-jupyter 4.14.2
eval $(opam env)
opam install jupyter
Thanks! It worked!
P.S., I personally do not like to use an older OCaml compiler just for using Jupyter, but I donβt know any alternative. If there is anything I can give a shot on the Jupyter side of things to stay with ocaml 5.3.0, I love to know. (I am almost totally a newbie when it comes to opam β¦).
1 Like
See [WIP] upgrade to OCaml 5 by kimmywork Β· Pull Request #199 Β· akabe/ocaml-jupyter Β· GitHub
If that PR actually works you could try with:
opam switch create 5.3.0 5.3.0
eval $(opam env)
opam pin add jupyter https://github.com/kimmywork/ocaml-jupyter.git#ocaml-5
opam install jupyter
Thank you.
Unfortunately, it got the following error while comping jupyter.
As I am not versed enough to dig into it, I will (with regret) live with the 4.12.0 for now. Thanks.
The whole log, just for record.
pl0@taulecgw:~$ eval $(opam env --switch 5.3.0 --set-switch)
pl0@taulecgw:~$ opam pin add jupyter https://github.com/kimmywork/ocaml-jupyter.git#ocaml-5
[NOTE] Package jupyter is already pinned to git+https://github.com/kimmywork/ocaml-jupyter.git#ocaml-5 (version 2.8.3).
[jupyter.2.8.3] synchronised (no changes)
jupyter is now pinned to git+https://github.com/kimmywork/ocaml-jupyter.git#ocaml-5 (version 2.8.3)
The following actions will be performed:
=== install 39 packages
β base v0.17.1 [required by ppx_yojson_conv]
β base-bytes base [required by ocplib-endian]
β base64 3.5.1 [required by jupyter]
β conf-gmp 4 [required by conf-gmp-powm-sec, zarith]
β conf-gmp-powm-sec 3 [required by cryptokit]
β conf-pkg-config 4 [required by zarith, conf-zlib, conf-zmq]
β conf-zlib 1 [required by cryptokit]
β conf-zmq 0.1 [required by zmq]
β cppo 1.8.0 [required by ppx_deriving]
β cryptokit 1.20 [required by jupyter]
β csexp 1.5.2 [required by dune-configurator]
β dune 3.17.2 [required by jupyter]
β dune-configurator 3.17.2 [required by cryptokit, zmq]
β jupyter 2.8.3 (pinned)
β logs 0.8.0 [required by jupyter]
β lwt 5.9.1 [required by jupyter]
β lwt_ppx 5.9.1 [required by jupyter]
β ocaml-compiler-libs v0.17.0 [required by ppxlib]
β ocaml_intrinsics_kernel v0.17.1 [required by base]
β ocamlbuild 0.16.1 [required by logs, uuidm]
β ocamlfind 1.9.8 [required by ppx_deriving, logs, uuidm]
β ocplib-endian 1.2 [required by lwt]
β octavius 1.2.2 [required by ppx_js_style]
β ppx_derivers 1.2.1 [required by ppx_deriving]
β ppx_deriving 6.0.3 [required by jupyter]
β ppx_js_style v0.17.0 [required by ppx_yojson_conv]
β ppx_yojson_conv v0.17.0 [required by jupyter]
β ppx_yojson_conv_lib v0.17.0 [required by ppx_yojson_conv]
β ppxlib 0.35.0 [required by ppx_deriving, lwt_ppx, ppx_yojson_conv]
β seq base [required by yojson]
β sexplib0 v0.17.0 [required by ppxlib, base]
β stdint 0.7.2 [required by jupyter]
β stdlib-shims 0.3.0 [required by ppxlib]
β topkg 1.0.8 [required by logs, uuidm]
β uuidm 0.9.10 [required by jupyter]
β yojson 2.2.2 [required by jupyter]
β zarith 1.14 [required by cryptokit]
β zmq 5.3.0 [required by jupyter]
β zmq-lwt 5.3.0 [required by jupyter]
Proceed with β 39 installations? [y/n] y
Proceed with β 39 installations? [y/n] y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
β¬ retrieved conf-gmp.4 (https://opam.ocaml.org/cache)
β installed conf-gmp.4
β¬ retrieved base64.3.5.1 (https://opam.ocaml.org/cache)
β installed conf-pkg-config.4
β installed conf-zlib.1
β¬ retrieved conf-gmp-powm-sec.3 (https://opam.ocaml.org/cache)
β installed conf-gmp-powm-sec.3
β¬ retrieved conf-zmq.0.1 (https://opam.ocaml.org/cache)
β installed conf-zmq.0.1
β¬ retrieved base.v0.17.1 (https://opam.ocaml.org/cache)
β¬ retrieved cppo.1.8.0 (https://opam.ocaml.org/cache)
β¬ retrieved csexp.1.5.2 (https://opam.ocaml.org/cache)
β¬ retrieved cryptokit.1.20 (https://opam.ocaml.org/cache)
β¬ retrieved jupyter.2.8.3 (no changes)
β¬ retrieved logs.0.8.0 (https://opam.ocaml.org/cache)
β¬ retrieved ocaml-compiler-libs.v0.17.0 (https://opam.ocaml.org/cache)
β¬ retrieved lwt.5.9.1, lwt_ppx.5.9.1 (https://opam.ocaml.org/cache)
β¬ retrieved dune.3.17.2, dune-configurator.3.17.2 (https://opam.ocaml.org/cache)
β¬ retrieved ocaml_intrinsics_kernel.v0.17.1 (https://opam.ocaml.org/cache)
β¬ retrieved ocamlbuild.0.16.1 (https://opam.ocaml.org/cache)
β¬ retrieved ocplib-endian.1.2 (https://opam.ocaml.org/cache)
β¬ retrieved ocamlfind.1.9.8 (https://opam.ocaml.org/cache)
β¬ retrieved octavius.1.2.2 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_derivers.1.2.1 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_js_style.v0.17.0 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_deriving.6.0.3 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_yojson_conv.v0.17.0 (https://opam.ocaml.org/cache)
β¬ retrieved ppx_yojson_conv_lib.v0.17.0 (https://opam.ocaml.org/cache)
β¬ retrieved sexplib0.v0.17.0 (https://opam.ocaml.org/cache)
β¬ retrieved seq.base (2 extra sources)
β¬ retrieved seq.base (2 extra sources)
β¬ retrieved ppxlib.0.35.0 (https://opam.ocaml.org/cache)
β¬ retrieved stdint.0.7.2 (https://opam.ocaml.org/cache)
β¬ retrieved stdlib-shims.0.3.0 (https://opam.ocaml.org/cache)
β¬ retrieved uuidm.0.9.10 (https://opam.ocaml.org/cache)
β¬ retrieved topkg.1.0.8 (https://opam.ocaml.org/cache)
β¬ retrieved yojson.2.2.2 (https://opam.ocaml.org/cache)
β¬ retrieved zmq.5.3.0, zmq-lwt.5.3.0 (https://opam.ocaml.org/cache)
β¬ retrieved zarith.1.14 (https://opam.ocaml.org/cache)
β installed dune.3.17.2
β installed ocamlbuild.0.16.1
β installed base64.3.5.1
β installed cppo.1.8.0
β installed csexp.1.5.2
β installed ocaml-compiler-libs.v0.17.0
β installed dune-configurator.3.17.2
β installed ocaml_intrinsics_kernel.v0.17.1
β installed ocamlfind.1.9.8
β installed base-bytes.base
β installed octavius.1.2.2
β installed ppx_derivers.1.2.1
β installed ocplib-endian.1.2
β installed seq.base
β installed sexplib0.v0.17.0
β installed lwt.5.9.1
β installed base.v0.17.1
β installed stdint.0.7.2
β installed stdlib-shims.0.3.0
β installed topkg.1.0.8
β installed ppxlib.0.35.0
β installed logs.0.8.0
β installed lwt_ppx.5.9.1
β installed ppx_deriving.6.0.3
β installed ppx_js_style.v0.17.0
β installed uuidm.0.9.10
β installed yojson.2.2.2
β installed zarith.1.14
β installed ppx_yojson_conv_lib.v0.17.0
β installed cryptokit.1.20
β installed ppx_yojson_conv.v0.17.0
β installed zmq.5.3.0
β installed zmq-lwt.5.3.0
[ERROR] The compilation of jupyter.2.8.3 failed at "dune build -p jupyter -j 1".
#=== ERROR while compiling jupyter.2.8.3 ======================================#
# context 2.3.0 | linux/arm64 | ocaml-base-compiler.5.3.0 | pinned(git+https://github.com/kimmywork/ocaml-jupyter.git#ocaml-5#a02c176419edbd88fbef748bcb44c8ddf4fad64b)
# path ~/.opam/5.3.0/.opam-switch/build/jupyter.2.8.3
# command ~/.opam/5.3.0/bin/dune build -p jupyter -j 1
# exit-code 1
# env-file ~/.opam/log/jupyter-391382-28744e.env
# output-file ~/.opam/log/jupyter-391382-28744e.out
### output ###
# [...]
# 29 | stdin_prompt : string [@key "prompt"];
# ^^^^^^
# Error: Unbound value "string_of_yojson"
(cd _build/default && /home/pl0/.opam/5.3.0/bin/ocamlc.opt -w A-4-31-33-34-39-41-42-43-44-45-48-49-50-58-66 -safe-string -strict-sequence -strict-formats -short-paths -g -bin-annot -bin-annot-occurrences -I src/core/.jupyter.objs/byte -I /home/pl0/.opam/5.3.0/lib/ocaml/unix -I /home/pl0/.opam/5.3.0/lib/ppx_yojson_[...]
# File "src/core/version.pp.ml", line 1:
# Warning 70 [missing-mli]: Cannot find interface file.
(cd _build/default && /home/pl0/.opam/5.3.0/bin/ocamlc.opt -w A-4-31-33-34-39-41-42-43-44-45-48-49-50-58-66 -safe-string -strict-sequence -strict-formats -short-paths -g -bin-annot -bin-annot-occurrences -I src/core[...]
# File "src/core/comm.ml", line 26, characters 25-31:
# 26 | comm_target : string option [@key "target_name"] [@default None];
# ^^^^^^
# Error: Unbound value "option_of_yojson"
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
ββ The following actions failed
β Ξ» build jupyter 2.8.3
ββ
ββ The following changes have been performed
β β install base v0.17.1
β β install base-bytes base
β β install base64 3.5.1
β β install conf-gmp 4
β β install conf-gmp-powm-sec 3
β β install conf-pkg-config 4
β β install conf-zlib 1
β β install conf-zmq 0.1
β β install cppo 1.8.0
β β install cryptokit 1.20
β β install csexp 1.5.2
β β install dune 3.17.2
β β install dune-configurator 3.17.2
β β install logs 0.8.0
β β install lwt 5.9.1
β β install lwt_ppx 5.9.1
β β install ocaml-compiler-libs v0.17.0
β β install ocaml_intrinsics_kernel v0.17.1
β β install ocamlbuild 0.16.1
β β install ocamlfind 1.9.8
β β install ocplib-endian 1.2
β β install octavius 1.2.2
β β install ppx_derivers 1.2.1
β β install ppx_deriving 6.0.3
β β install ppx_js_style v0.17.0
β β install ppx_yojson_conv v0.17.0
β β install ppx_yojson_conv_lib v0.17.0
β β install ppxlib 0.35.0
β β install seq base
β β install sexplib0 v0.17.0
β β install stdint 0.7.2
β β install stdlib-shims 0.3.0
β β install topkg 1.0.8
β β install uuidm 0.9.10
β β install yojson 2.2.2
β β install zarith 1.14
β β install zmq 5.3.0
β β install zmq-lwt 5.3.0
ββ
<><> jupyter.2.8.3 troubleshooting ><><><><><><><><><><><><><><><><><><><><><><>
=> Please run for registration of ocaml-jupyter kernel:
=>
=> $ ocaml-jupyter-opam-genspec
=> $ jupyter kernelspec install --name ocaml-jupyter \
[NOTE] Pinning command successful, but your installed packages may be out of sync.
The former state can be restored with:
/usr/local/bin/opam switch import "/home/pl0/.opam/5.3.0/.opam-switch/backup/state-20250321100332.export"
pl0@taulecgw:~$
#=== ERROR while compiling jupyter.2.8.3 ======================================#
# context 2.3.0 | linux/arm64 | ocaml-base-compiler.5.3.0 | pinned(git+https://github.com/kimmywork/ocaml-jupyter.git#ocaml-5#a02c176419edbd88fbef748bcb44c8ddf4fad64b)
# path ~/.opam/5.3.0/.opam-switch/build/jupyter.2.8.3
# command ~/.opam/5.3.0/bin/dune build -p jupyter -j 1
# exit-code 1
# env-file ~/.opam/log/jupyter-391382-28744e.env
# output-file ~/.opam/log/jupyter-391382-28744e.out
### output ###
# [...]
# 29 | stdin_prompt : string [@key "prompt"];
# ^^^^^^
# Error: Unbound value "string_of_yojson"
mseri
March 26, 2025, 5:25pm
7
I think you may just need to open ppx type conv runtime library in the toplevel of some files to fix this error. Iβll try to send a PR to the PR in the next few days if I can find some time