doomeer / factorio

Factorio Planner
MIT License
137 stars 40 forks source link

make failed: "factoriojs.ml", line 115, characters 33-53; Unbound value Char.lowercase_ascii #60

Closed alexxroche closed 5 years ago

alexxroche commented 5 years ago

sudo apt-get install ocaml ocaml-findlib camlp4 js-of-ocaml &>/dev/null ; make ocamlbuild -no-links -use-ocamlfind -tag annot factoriojs.byte ocamlfind ocamlc -c -g -annot -package js_of_ocaml.syntax -syntax camlp4o -package js_of_ocaml -o factoriojs.cmo factoriojs.ml File "factoriojs.ml", line 115, characters 33-53: Error: Unbound value Char.lowercase_ascii Command exited with code 2. Makefile:36: recipe for target '_build/factoriojs.byte' failed make: *** [_build/factoriojs.byte] Error 10

I then tried:
sudo apt-get install opam; opam init; eval 'opam config env'; opam switch 4.02.3; opam install js_of_ocaml and still have the same error on Debian 4.12.6-1 x86_64;

doomeer commented 5 years ago

Hey, thanks for trying to build Factorio Planner!

Char.lowercase_ascii is only available in later versions of OCaml.

You can try to either:

I need to update the README with the actual version of OCaml which is required :P

Cheers.

alexxroche commented 5 years ago

Thank you. patch for factoriojs.ml with ocamlbuild 4.02.3 115c115 < Bytes.set src i (Char.lowercase_ascii chr) --- > Bytes.set src i (Char.lowercase chr) 131c131 < Bytes.set href i (Char.lowercase_ascii chr) --- > Bytes.set href i (Char.lowercase chr) worked (for those of use living in the out-of-date past.)

doomeer commented 5 years ago

@Saintis updated the README, thanks!