Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile with OCaml 4.09.0 #83

Open
zeule opened this issue Dec 29, 2019 · 4 comments
Open

Does not compile with OCaml 4.09.0 #83

zeule opened this issue Dec 29, 2019 · 4 comments

Comments

@zeule
Copy link

zeule commented Dec 29, 2019

Generates errors about Pervasives:

Error (alert deprecated): module Stdlib.Pervasives
Use Stdlib instead.
@kousu
Copy link

kousu commented Feb 18, 2020

I'm having problems too, but with a different error on OpenBSD. OpenBSD 6.6 has OCaml 4.09 in packages right now (https://openports.se/lang/ocaml) and

$ opam install camomile
The following actions will be performed:
  - install camomile 1.0.2

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[camomile.1.0.2] downloaded from cache at https://opam.ocaml.org/cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of camomile failed at "/home/kousu/.opam/default/bin/dune build -p camomile -j 1 @install".

#=== ERROR while compiling camomile.1.0.2 =====================================#
# context     2.0.5 | openbsd/x86_64 | ocaml-system.4.09.0 | https://opam.ocaml.org#0825e2d9
# path        ~/.opam/default/.opam-switch/build/camomile.1.0.2
# command     ~/.opam/default/bin/dune build -p camomile -j 1 @install
# exit-code   1
# env-file    ~/.opam/log/camomile-20648-d0f245.env
# output-file ~/.opam/log/camomile-20648-d0f245.out
### output ###
# [...]
# camomilelocaledef Camomile/locales/zh_MO.mar (exit 2)
# (cd _build/default/Camomile && tools/camomilelocaledef.exe --file locales/zh_MO.txt locales)
# Fatal error: exception Stack overflow
# camomilelocaledef Camomile/locales/zh_TW.mar (exit 2)
# (cd _build/default/Camomile && tools/camomilelocaledef.exe --file locales/zh_TW.txt locales)
# Fatal error: exception Stack overflow
# camomilelocaledef Camomile/locales/zh_TW_STROKE.mar (exit 2)
# (cd _build/default/Camomile && tools/camomilelocaledef.exe --file locales/zh_TW_STROKE.txt locales)
# Fatal error: exception Stack overflow
# camomilelocaledef Camomile/locales/zh__PINYIN.mar (exit 2)
# (cd _build/default/Camomile && tools/camomilelocaledef.exe --file locales/zh__PINYIN.txt locales)
# Fatal error: exception Stack overflow



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build camomile 1.0.2
+- 
- No changes have been performed

avsm added a commit to avsm/opam-repository that referenced this issue Jul 26, 2020
There seems to be a stack overflow that is particularly bad
on ppc64le, as all of the opam CI builds fail:

```
camomilelocaledef Camomile/locales/zh__PINYIN.mar (got signal SEGV)
(cd _build/default/Camomile && tools/camomilelocaledef.exe --file locales/zh__PINYIN.txt locales)
```

Increasing the stack limit on the build container didnt
help, so I'll mark this as unavailable on ppc64 until we
can figure out the root cause.  There is an upstream issue
at: yoriyuki/Camomile#83
@yurivict
Copy link

Does not compile with ocaml-4.12:

dune build @install
File "Camomile/internal/byte_labeled_dag.ml", line 90, characters 29-47:
90 |   let comp (s1, _) (s2, _) = Pervasives.compare s1 s2 in
                                  ^^^^^^^^^^^^^^^^^^
Error (alert deprecated): module Stdlib.Pervasives
Use Stdlib instead.

If you need to stay compatible with OCaml < 4.07, you can use the 
stdlib-shims library: https://github.com/ocaml/stdlib-shims
File "Camomile/public/oOChannel.mli", line 116, characters 22-43:
116 | class of_in_channel : Pervasives.in_channel -> char_input_channel
                            ^^^^^^^^^^^^^^^^^^^^^
Error (alert deprecated): module Stdlib.Pervasives
Use Stdlib instead.

If you need to stay compatible with OCaml < 4.07, you can use the 
stdlib-shims library: https://github.com/ocaml/stdlib-shims
File "Camomile/public/oOChannel.mli", line 119, characters 23-45:
119 | class of_out_channel : Pervasives.out_channel -> char_output_channel
                             ^^^^^^^^^^^^^^^^^^^^^^
Error (alert deprecated): module Stdlib.Pervasives
Use Stdlib instead.

@mndrix
Copy link

mndrix commented Dec 29, 2021

Fatal error: exception Stack overflow

I resolved this error (camomile 1.0.2, OpenBSD 7.0, OCaml 4.13.1) by increasing ulimits:

$ ulimit -n "$(ulimit -H -n)" -l "$(ulimit -H -l)" -s "$(ulimit -H -s)"

The adjustment to -n was probably not necessary.

@kousu
Copy link

kousu commented Jan 9, 2022

Thank you @mndrix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants