Closed stass closed 10 years ago
I wouldn't say utop crashes on OSX since I do use it on OSX ;)
A backtrace would be of great help, could you try running it with OCAMLPARAM=b?
Also what's the contents of your LANG environment variable? Try running it with LANG=C.
You are right, LANG was the issue. My LANG was set to en_US which for some reason causes utop to crash. I wonder if en_US means en_US.UTF-8.
The character encoding for en_US is ISO-8859-1. I can reproduce the error by setting LANG to en_US. Though it seems to be a bug in Camomile which raises UChar.Out_of_range
instead of CharEncoding.Out_of_range
. I'll modify lambda-term to treat the former as the latter.
I think OSX might do something special when LANG is set to en_US. The reason I said "utop crashes on OSX" in the bug report is that I was using it on FreeBSD without any problems for a while, however my LANG is set to ru_RU.KOI8-R on FreeBSD (with LC_MESSAGES being C). I just verified that it still works on FreeBSD if I set LANG to enUS and unset all LC (like I have on OS X).
It should be fixed by this commit:
https://github.com/diml/lambda-term/commit/2b8abec6986ec20420c14e302a00eec1a2d6140f
% utop Fatal error: exception UChar.Out_of_range Exit 2
% utop -version The universal toplevel for OCaml, version 1.5, compiled for OCaml version 4.01.0+dev16-2013-06-03
It crashes with 4.00.1 as well. Let me know if I can do some extra debugging.
Thanks.