tmattio / inquire

:art: Create beautiful interactive command line interface in OCaml
https://tmattio.github.io/inquire
MIT License
42 stars 3 forks source link

OpenBSD compat #1

Closed kousu closed 4 years ago

kousu commented 4 years ago

Here's a report of me trying to get this working on OpenBSD. It mostly worked but I had to fill in some gaps :)

The README says I need make (which I assume is GNU make) and opam so

$ doas pkg_add gmake opam

But gmake fails trying to run dune. Okay, so

$ doas pkg_add dune

Now

$ gmake
dune build @install
File "lib/dune", line 5, characters 12-16:
5 |  (libraries base lwt lambda-term)
                ^^^^
Error: Library "base" not found.
Hint: try: dune external-lib-deps --missing @install
gmake: *** [Makefile:4: all] Error 1

Is dune supposed to come with opam? And is gmake supposed to auto-install the opam dependencies? They don't seem to, at least on OpenBSD.

And then I'm stumped because https://github.com/yoriyuki/Camomile/ isn't currently building on OpenBSD:

$ opam init
$ opam install base lwt lambda-term
[ mostly works ...until ]
#=== 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-70159-335865.env
# output-file ~/.opam/log/camomile-70159-335865.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

Nice work otherwise though. I want to give it a run-through.

tmattio commented 4 years ago

Hey @kousu, hope you're doing well :)

Thanks for opening the issue. Which OCaml version are you using? I just saw that you commented on https://github.com/yoriyuki/Camomile/issues/83. I'm not sure that's the cause of the issue as your error is due to a stack overflow, but have you tried switching to OCaml 4.08 to see if it works?

Also, dune does not come with opam, if you have opam installed and configured, you can install dune with opam install dune. To install the package dependencies, you can run opam install . --deps-only a the root of the project.

tmattio commented 4 years ago

Closing this for now, but feel free to re-open if you need more help 🙂

kousu commented 4 years ago

Sorry! I missed the Github notification. I didn't get it working but it's fine I'll reopen if I wanna give it another shot!

On May 9, 2020 6:44:22 AM EDT, Thibaut Mattio notifications@github.com wrote:

Closing this for now, but feel free to re-open if you need more help 🙂

-- > You are receiving this because you were mentioned.> Reply to this email directly or view it on GitHub:> https://github.com/tmattio/inquire/issues/1#issuecomment-626146991

-- kousu