ocaml-community/lambda-term

Fatal error: exception LTerm.No_such_encoding("646")

UnixJunkie opened this issue · 6 comments

Hello,

While trying to run utop on NetBSD:

Fatal error: exception LTerm.No_such_encoding("646")
Raised at file "src/lTerm.ml", line 163, characters 10-33
Called from file "src/lTerm.ml", line 197, characters 6-301
Called from file "src/core/lwt.ml", line 2026, characters 16-20
Re-raised at file "src/core/lwt.ml", line 2999, characters 28-29
Called from file "src/unix/lwt_main.ml", line 26, characters 8-18
Called from file "src/lib/uTop_main.ml", line 1399, characters 15-53
Called from file "src/lib/uTop_main.ml", line 1429, characters 4-25

I wonder if the same thing happens on OpenBSD.

utop version 2.3.0 and OCaml 4.07.1

Thanks,
F.

with OCaml 4.09.0:

  • install seq base [required by lwt]
  • install dune-configurator 1.0.0 [required by lwt]
  • install jbuilder transition [required by camomile]
  • install result 1.4 [required by lwt]
  • install mmap 1.1.0 [required by lwt]
  • install ocamlfind 1.8.1 [required by utop]
  • install cppo 1.6.6 [required by utop]
  • install ocamlbuild 0.14.0 [required by ocplib-endian, react]
  • install camomile 1.0.1 [required by utop]
  • install base-bytes base [required by zed]
  • install topkg 1.0.1 [required by react]
  • install charInfo_width 1.1.0 [required by zed]
  • install ocplib-endian 1.0 [required by lwt]
  • install react 1.2.1 [required by utop]
  • install lwt 4.4.0 [required by utop]
  • install zed 2.0.3 [required by lambda-term]
  • install lwt_react 1.1.3 [required by utop]
  • install lwt_log 1.1.0 [required by lambda-term]
  • install lambda-term 2.0.1 [required by utop]
  • install utop 2.4.2

Same problem:

utop

Fatal error: exception LTerm.No_such_encoding("646")
Raised at file "src/lTerm.ml", line 164, characters 10-33
Called from file "src/lTerm.ml", line 198, characters 6-301
Called from file "src/core/lwt.ml", line 2026, characters 16-20
Re-raised at file "src/core/lwt.ml", line 2999, characters 28-29
Called from file "src/unix/lwt_main.ml", line 26, characters 8-18
Called from file "src/lib/uTop_main.ml", line 1482, characters 15-53
Called from file "src/lib/uTop_main.ml", line 1512, characters 4-25

Same problem with ocp-browser:

# ocp-browser 
ocp-browser: internal error, uncaught exception:
             LTerm.No_such_encoding("646")
             Raised at file "src/lTerm.ml", line 163, characters 4-33
             Called from file "src/lTerm.ml", line 197, characters 6-301
             Called from file "src/core/lwt.ml", line 2026, characters 16-20
             Re-raised at file "src/core/lwt.ml", line 2999, characters 20-29
             Called from file "src/unix/lwt_main.ml", line 26, characters 8-18
             Called from file "cmdliner_term.ml", line 25, characters 19-24
             Called from file "cmdliner.ml", line 117, characters 32-39

A command that returns 646:

locale charmap

A workaround is adding those lines to ~/.bashrc:

export LANG="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_ALL=""

I am closing; if you think this is really a bug, you can reopen.

kandu commented

The code name can be ISO_646.BASIC or ISO_646.IRV, IIRC