-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Description
The build fails at the compilation of wiki.js:
$ make
...
C:\cygwin\...\js_of_ocaml\compiler\js_of_ocaml: Error: End_of_file
Raised at file "jsoo_compile.ml", line 41, characters 28-29
Re-raised at file "jsoo_compile.ml", line 47, characters 10-13
Called from file "jsoo_compile.ml", line 114, characters 6-300
../Makefile.common:11: recipe for target 'wiki.js' failed
...
The EOF is raised by really_input ic s 0 n of Util.read_file. Unlike the other example .ml files, wikicreole.ml is created from wikicreole.mll, and it is in DOS format with \r in MinGW OCaml. While in_channel_length returns bytes of the channel not taking into account the EOL translations, really_input does. Therefore the n from in_channel_length is too big for really_input and the EOF exception is raised. For details, please refer to the comment of in_channel_length.
Possible quick fix is to open the file using open_in_bin instead of open_in in Util.read_file.
Metadata
Metadata
Assignees
Labels
No labels