How to build brr with b0?

Hi,

I’m currently trying to build and test brr, but I’m not familiar with the b0 build tool.

After reading the b0 manual, my attempt was as follows:

cd brr
opam switch create . 5.3.0 --deps-only # installing things...
opam install . b0 # install b0 on the local switch
eval $(opam env)
b0 # build the project

I encountered the following error:

[FAIL] [ocamlopt][2]: (b0 file log --id 21)
File "/home/naora/projects/brr/B0.ml", line 18, characters 19-21:
Error: Unbound value "(~/)"

b0: [ERROR] Could not compile B0 file /home/naora/projects/brr/B0.ml

I’m not sure what I’m doing wrong.

I believe you need the development version of b0 (which itself requires the development version of cmdliner). This worked for me:

opam pin --dev cmdliner
opam pin --dev b0
opam source --dev brr
cd brr
opam install --deps-only .
b0
3 Likes

Yes thanks @kit-ty-kate. As written in DEVEL.md in general my projects do depend on the development version of b0.

At the moment it’s a bit painful because I’m trying to dogfood and improve the upcoming cmdliner completion support so you also need a pin on cmdliner which may break a few important package you have in your switch like odoc or ocp-indent (but pinning their dev version aswell should do it).

1 Like

Thanks to both of you. I wasn’t aware of the --dev flag.