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

Can't compile the master branch on linux with ocaml version in [4.05, 4.09] #39

Open
Kerl13 opened this issue Jan 31, 2020 · 2 comments

Comments

@Kerl13
Copy link

Kerl13 commented Jan 31, 2020

Hi,

I'd be very interested to play with ocamli but I can't get it to compile, I tried with OCaml versions 4.05.0, 4.06.1, 4.07.1, 4.08.0, 4.08.1 and 4.09.0.

Running sh build under versions < 4.08 yields the following error:

*****BUILDING PPX_AUTO
make[1] : on entre dans le répertoire « /home/martin/git/enseignement/ocamli/ppx_auto »
ocamlfind ocamldep ppx_auto.ml > ._d/ppx_auto.d
ocamlfind ocamldep ppx_auto_util.ml > ._d/ppx_auto_util.d
ocamlfind ocamlopt -package compiler-libs.common -c -g -w -3 -w -40 ppx_auto_util.ml
ocamlfind ocamlopt -package compiler-libs.common -c -g -w -3 -w -40 ppx_auto.ml
ocamlfind ocamlopt \
			-package compiler-libs.common -linkpkg \
			        -g        -o ppx_auto \
			ppx_auto_util.cmx ppx_auto.cmx
make[1] : on quitte le répertoire « /home/martin/git/enseignement/ocamli/ppx_auto »
*****BUILDING MAIN
make[1] : on entre dans le répertoire « /home/martin/git/enseignement/ocamli »
ocamlfind ocamldep -native ocamli.mli > ._ncdi/ocamli.di
ocamlfind ocamldep -native runeval.mli > ._ncdi/runeval.di
ocamlfind ocamldep -native ocamlilib.mli > ._ncdi/ocamlilib.di
ocamlfind ocamldep -native tinyocamlrw.mli > ._ncdi/tinyocamlrw.di
ocamlfind ocamldep -native eval.mli > ._ncdi/eval.di
ocamlfind ocamldep -native ocamliprim.mli > ._ncdi/ocamliprim.di
ocamlfind ocamldep -native pptinyocaml.mli > ._ncdi/pptinyocaml.di
ocamlfind ocamldep -native tinyocamlutil.mli > ._ncdi/tinyocamlutil.di
ocamlfind ocamldep -native tinyexternal.mli > ._ncdi/tinyexternal.di
ocamlfind ocamldep -native tinyocaml.mli > ._ncdi/tinyocaml.di
ocamlfind ocamldep -native ocamlipat.mli > ._ncdi/ocamlipat.di
ocamlfind ocamldep -native ocamliutil.mli > ._ncdi/ocamliutil.di
ocamlfind ocamldep ocamli.ml > ._d/ocamli.d
ocamlfind ocamldep runeval.ml > ._d/runeval.d
ocamlfind ocamldep ocamlilib.ml > ._d/ocamlilib.d
ocamlfind ocamldep tinyocamlrw.ml > ._d/tinyocamlrw.d
ocamlfind ocamldep eval.ml > ._d/eval.d
ocamlfind ocamldep ocamliprim.ml > ._d/ocamliprim.d
ocamlfind ocamldep pptinyocaml.ml > ._d/pptinyocaml.d
ocamlfind ocamldep tinyocamlutil.ml > ._d/tinyocamlutil.d
ocamlfind ocamldep tinyexternal.ml > ._d/tinyexternal.d
ocamlfind ocamldep tinyocaml.ml > ._d/tinyocaml.d
ocamlfind ocamldep ocamlipat.ml > ._d/ocamlipat.d
ocamlfind ocamldep ocamliutil.ml > ._d/ocamliutil.d
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c ocamliutil.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto ocamliutil.ml
File "ocamliutil.ml", line 112, characters 3-17:
Error: Unbound record field pexp_loc_stack
make[1]: *** [OCamlMakefile:1076: ocamliutil.cmx] Error 2
make[1] : on quitte le répertoire « /home/martin/git/enseignement/ocamli »
make: *** [OCamlMakefile:777: native-code] Error 2

and under versions ≥ 4.08 it yields:

*****BUILDING PPX_AUTO
make[1] : on entre dans le répertoire « /home/martin/git/enseignement/ocamli/ppx_auto »
ocamlfind ocamldep ppx_auto.ml > ._d/ppx_auto.d
ocamlfind ocamldep ppx_auto_util.ml > ._d/ppx_auto_util.d
ocamlfind ocamlopt -package compiler-libs.common -c -g -w -3 -w -40 ppx_auto_util.ml
ocamlfind ocamlopt -package compiler-libs.common -c -g -w -3 -w -40 ppx_auto.ml
ocamlfind ocamlopt \
			-package compiler-libs.common -linkpkg \
			        -g        -o ppx_auto \
			ppx_auto_util.cmx ppx_auto.cmx
make[1] : on quitte le répertoire « /home/martin/git/enseignement/ocamli/ppx_auto »
*****BUILDING MAIN
make[1] : on entre dans le répertoire « /home/martin/git/enseignement/ocamli »
ocamlfind ocamldep -native ocamli.mli > ._ncdi/ocamli.di
ocamlfind ocamldep -native runeval.mli > ._ncdi/runeval.di
ocamlfind ocamldep -native ocamlilib.mli > ._ncdi/ocamlilib.di
ocamlfind ocamldep -native tinyocamlrw.mli > ._ncdi/tinyocamlrw.di
ocamlfind ocamldep -native eval.mli > ._ncdi/eval.di
ocamlfind ocamldep -native ocamliprim.mli > ._ncdi/ocamliprim.di
ocamlfind ocamldep -native pptinyocaml.mli > ._ncdi/pptinyocaml.di
ocamlfind ocamldep -native tinyocamlutil.mli > ._ncdi/tinyocamlutil.di
ocamlfind ocamldep -native tinyexternal.mli > ._ncdi/tinyexternal.di
ocamlfind ocamldep -native tinyocaml.mli > ._ncdi/tinyocaml.di
ocamlfind ocamldep -native ocamlipat.mli > ._ncdi/ocamlipat.di
ocamlfind ocamldep -native ocamliutil.mli > ._ncdi/ocamliutil.di
ocamlfind ocamldep ocamli.ml > ._d/ocamli.d
ocamlfind ocamldep runeval.ml > ._d/runeval.d
ocamlfind ocamldep ocamlilib.ml > ._d/ocamlilib.d
ocamlfind ocamldep tinyocamlrw.ml > ._d/tinyocamlrw.d
ocamlfind ocamldep eval.ml > ._d/eval.d
ocamlfind ocamldep ocamliprim.ml > ._d/ocamliprim.d
ocamlfind ocamldep pptinyocaml.ml > ._d/pptinyocaml.d
ocamlfind ocamldep tinyocamlutil.ml > ._d/tinyocamlutil.d
ocamlfind ocamldep tinyexternal.ml > ._d/tinyexternal.d
ocamlfind ocamldep tinyocaml.ml > ._d/tinyocaml.d
ocamlfind ocamldep ocamlipat.ml > ._d/ocamlipat.d
ocamlfind ocamldep ocamliutil.ml > ._d/ocamliutil.d
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c ocamliutil.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto ocamliutil.ml
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c ocamlipat.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto ocamlipat.ml
File "ocamlipat.ml", line 8, characters 22-2678:
  8 | ......................function
  9 |   | AMPERAMPER -> "&&"
 10 |   | AMPERSAND -> "&"
 11 |   | AND -> "and"
 12 |   | AS -> "as"
...
124 |   | WITH -> "with"
125 |   | COMMENT (s, _) -> s
126 |   | DOCSTRING _ -> "FIXMEDOCSTRING"
127 |   | EOL -> ""
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
(LETOP _|ANDOP _)
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c tinyocaml.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto tinyocaml.ml
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c tinyexternal.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto tinyexternal.ml
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c tinyocamlutil.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto tinyocamlutil.ml
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c pptinyocaml.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto pptinyocaml.ml
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c ocamliprim.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto ocamliprim.ml
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c eval.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto eval.ml
ocamlfind ocamlc -package str,unix,bigarray,compiler-libs.common -c tinyocamlrw.mli
ocamlfind ocamlopt -package str,unix,bigarray,compiler-libs.common -c -g -w -3 -w -40 -safe-string -ppx ppx_auto/ppx_auto tinyocamlrw.ml
File "tinyocamlrw.ml", line 163, characters 2-46:
163 | | Pexp_open (_, {txt = Longident.Lident n}, e) ->
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: The constructor Pexp_open expects 2 argument(s),
       but is applied here to 3 argument(s)
make[1]: *** [OCamlMakefile:1076: tinyocamlrw.cmx] Error 2
make[1] : on quitte le répertoire « /home/martin/git/enseignement/ocamli »
make: *** [OCamlMakefile:777: native-code] Error 2

Am I doing something wrong or am I missing a dependency?
Thanks!

@johnwhitington
Copy link
Owner

Tag "OCaml17" with OCaml 4.05.0 should build -- I just tried it here.

I will be working to make OCamli up to date in the next few months.

Let me know how you get on.

@Kerl13 Kerl13 changed the title Can't compile ocamli on linux with Can't compile the master branch on linux with ocaml version in [4.05, 4.09] Feb 1, 2020
@Kerl13
Copy link
Author

Kerl13 commented Feb 1, 2020

OCaml17 compiles thanks, I should have looked at that first

(also fixed the issue's title)

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

2 participants