Having Problem When installing utop in ocaml 4.06

utop

#1

Hi, i’m new to Ocaml and When i try to install utop, i got this error :
#=== ERROR while installing zed.1.5 ===========================================#

opam-version 1.2.2

os darwin

command jbuilder build -p zed -j 4

path /Users/jonakash/.opam/4.06.0/build/zed.1.5

compiler 4.06.0

exit-code 1

env-file /Users/jonakash/.opam/4.06.0/build/zed.1.5/zed-10970-6d07ae.env

stdout-file /Users/jonakash/.opam/4.06.0/build/zed.1.5/zed-10970-6d07ae.out

stderr-file /Users/jonakash/.opam/4.06.0/build/zed.1.5/zed-10970-6d07ae.err

stderr

Error: This expression has type bytes but an expression was expected of type

[…]

(cd _build/default && /Users/jonakash/.opam/4.06.0/bin/ocamlc.opt -w -40 -g -bin-annot -I /Users/jonakash/.opam/4.06.0/lib/bytes -I /Users/jonakash/.opam/4.06.0/lib/camomile -I /Users/jonakash/.opam/4.06.0/lib/ocaml -I /Users/jonakash/.opam/4.06.0/lib/react -no-alias-deps -I src -o src/zed_rope.cmo -c -impl src/zed_rope.ml)

File “src/zed_rope.ml”, line 541, characters 13-91:

Error: This expression has type bytes but an expression was expected of type

Zed_utf8.t = string

ocamlopt src/zed_utf8.{cmx,o} (exit 2)

(cd _build/default && /Users/jonakash/.opam/4.06.0/bin/ocamlopt.opt -w -40 -g -I /Users/jonakash/.opam/4.06.0/lib/bytes -I /Users/jonakash/.opam/4.06.0/lib/camomile -I /Users/jonakash/.opam/4.06.0/lib/ocaml -I /Users/jonakash/.opam/4.06.0/lib/react -no-alias-deps -I src -o src/zed_utf8.cmx -c -impl src/zed_utf8.ml)

File “src/zed_utf8.ml”, line 303, characters 26-29:

Error: This expression has type bytes but an expression was expected of type

string

Help Me please,


#2

In the just released 4.06 version of OCaml strings became immutable by default. Not all the packages had the time to update yet. If you are new to OCaml I suggest sticking to 4.05 for the time being.


#3

That said, after the latest package updates, I can now build utop under 4.06. (It was broken before that.) I suspect that the original poster should probably do opam update and it might then be possible to build it.


#4

Thanks for your answer, i just do opam update, try again and utop built successful.


#5

FYI, @dbuenzli is correct. Even though utop is now working, there are still a number of packages that don’t quite work on 4.06 yet. You may be happiest doing 4.05 for the moment.