Jupyter OCaml kernel on ARM64

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"

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