Hello again and my apologies for pestering you with this one more time. Three days ago, when I was doing opam update && opam upgrade, I got this output (I run the updates daily):
<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><> π«
[multicore] no changes from git+https://github.com/ocaml-multicore/multicore-opam.git
[default] synchronised from https://opam.ocaml.org
Now run 'opam upgrade' to apply any package updates.
The following actions will be performed:
β upgrade domainslib 0.2.2 to 0.3.0
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
[domainslib.0.3.0] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
[ERROR] The compilation of domainslib failed at "/Users/dimi/.opam/opam-init/hooks/sandbox.sh build dune build -p domainslib".
#=== ERROR while compiling domainslib.0.3.0 ===================================#
# context 2.0.8 | macos/x86_64 | ocaml-variants.4.12.0+domains+effects | git+https://github.com/ocaml-multicore/multicore-opam.git
# path ~/.opam/4.12.0+domains+effects/.opam-switch/build/domainslib.0.3.0
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p domainslib
# exit-code 1
# env-file ~/.opam/log/domainslib-47297-1872ec.env
# output-file ~/.opam/log/domainslib-47297-1872ec.out
### output ###
# Error: Unbound module Mutex
# [...]
# (cd _build/default && /Users/dimi/.opam/4.12.0+domains+effects/bin/ocamlc.opt -w -40 -g -bin-annot -I lib/.domainslib.objs/byte -no-alias-deps -open Domainslib__ -o lib/.domainslib.objs/byte/domainslib__Multi_channel.cmo -c -impl lib/multi_channel.ml)
# File "lib/multi_channel.ml", line 20, characters 9-16:
# 20 | mutex: Mutex.t;
# ^^^^^^^
# Error: Unbound module Mutex
# ocamlopt lib/.domainslib.objs/native/domainslib__Chan.{cmx,o} (exit 2)
# (cd _build/default && /Users/dimi/.opam/4.12.0+domains+effects/bin/ocamlopt.opt -w -40 -g -I lib/.domainslib.objs/byte -I lib/.domainslib.objs/native -intf-suffix .ml -no-alias-deps -open Domainslib__ -o lib/.domainslib.objs/native/domainslib__Chan.cmx -c -impl lib/chan.ml)
# File "lib/chan.ml", line 4, characters 9-16:
# 4 | mutex: Mutex.t;
# ^^^^^^^
# Error: Unbound module Mutex
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build domainslib 0.3.0
ββ
βΆβ No changes have been performed
This looks like a consequence of some recent updates in the compiler and domainslib. Mutex, Condition Variable and Semaphore were added to stdlib modules (ocaml-multicore#548) and a work stealing implementation for Domainslib Task (domainslib#29).
My recommendation is to reinstall the compiler with opam reinstall ocaml-variants and run the updates after the compiler is updated.
Itβs packaged up in the multicore-opam repo, so a opam update; opam install domainslib should do the trick (and you should get 0.3.0). Let us know if thatβs not working for some reason.
What does it say if you try opam install domainslib.0.3.0? (this comes currently from the same opam remote you are getting the 4.12.0+domains+effects compiler from).