dbuenzli / jsont

Declarative JSON data manipulation for OCaml
https://erratique.ch/software/jsont
ISC License
15 stars 1 forks source link

Build issue with jsont.0.1.0 package #2

Open mbarbin opened 2 days ago

mbarbin commented 2 days ago

I'm not sure what's specific in my setup. I'd appreciate some help if you can think of something!

First attempt:

$ opam install jsont bytesrw
The following actions will be performed:
=== install 2 packages
  ∗ bytesrw 0.1.0
  ∗ jsont   0.1.0

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved bytesrw.0.1.0  (https://opam.ocaml.org/cache)
⬇ retrieved jsont.0.1.0  (https://opam.ocaml.org/cache)
∗ installed bytesrw.0.1.0
[ERROR] The compilation of jsont.0.1.0 failed at "ocaml pkg/pkg.ml build --dev-pkg false --with-cmdliner true --with-bytesrw true --with-brr true".

#=== ERROR while compiling jsont.0.1.0 ========================================#
# context     2.3.0 | linux/x86_64 | ocaml-base-compiler.5.2.1 | https://opam.ocaml.org#0b65c91e7650d82e2c12fe1f64a466d2c6954272
# path        ~/.opam/5.2.1/.opam-switch/build/jsont.0.1.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --dev-pkg false --with-cmdliner true --with-bytesrw true --with-brr true
# exit-code   1
# env-file    ~/.opam/log/jsont-199362-255f5f.env
# output-file ~/.opam/log/jsont-199362-255f5f.out
### output ###
# [...]
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-tag' 'debug'
#      '-build-dir' '_build' 'opam' 'pkg/META' 'CHANGES.md' 'LICENSE.md'
#      'README.md' 'src/jsont.a' 'src/jsont.cmxs' 'src/jsont.cmxa'
#      'src/jsont.cma' 'src/jsont.cmx' 'src/jsont.cmi' 'src/jsont.mli'
#      'src/jsont_base.cmx' 'src/bytesrw/jsont_bytesrw.a'
#      'src/bytesrw/jsont_bytesrw.cmxs' 'src/bytesrw/jsont_bytesrw.cmxa'
#      'src/bytesrw/jsont_bytesrw.cma' 'src/bytesrw/jsont_bytesrw.cmx'
#      'src/bytesrw/jsont_bytesrw.cmi' 'src/bytesrw/jsont_bytesrw.mli'
#      'src/brr/jsont_brr.a' 'src/brr/jsont_brr.cmxs' 'src/brr/jsont_brr.cmxa'
#      'src/brr/jsont_brr.cma' 'src/brr/jsont_brr.cmx' 'src/brr/jsont_brr.cmi'
#      'src/brr/jsont_brr.mli' 'doc/index.mld' 'doc/cookbook.mld'
#      'test/jsont_tool.native']: exited with 10

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build jsont 0.1.0
└─ 
┌─ The following changes have been performed
│ ∗ install bytesrw 0.1.0
└─ 

The log has:

ocamlfind: Package `b0.std' not found
Command exited with code 2.

I thought I could try to install b0 and tried again (probably a bad idea in retrospect, as I don't suppose this should be required). At any rate, with b0.0.0.5 installed, this time the error was:

+ ocamlfind ocamlc -c -g -bin-annot -safe-string -package 'cmdliner bytesrw b0.std' -I test -I src -I src/bytesrw -o test/jsont_tool.cmo test/jsont_tool.ml
File "test/jsont_tool.ml", line 22, characters 34-39:
22 |   let* git = Os.Cmd.get (Cmd.tool "git") in
                                       ^^^^^
Error: This expression has type "string" but an expression was expected of type
         "B0_std.Cmd.t"
Command exited with code 2.
dbuenzli commented 1 day ago

Ah crap I forgot to remove the dependency on b0.std in the jsont tool.

dbuenzli commented 1 day ago

(You can pin b0 meanwhile).

mbarbin commented 1 day ago

(You can pin b0 meanwhile).

That worked, thanks! I did so at 245bd6f066c5ea0632177a162fc608d9f6a0f24e (2024-11-10)