ocaml-ppx / ppx_tools

Tools for authors of ppx rewriters
MIT License
134 stars 39 forks source link

Build error (macOS 10.13.6) #65

Closed dboris closed 6 years ago

dboris commented 6 years ago

# opam-version 1.2.2
# os           darwin
# command      make all
# path         /Users/boris/.opam/ocsigen/build/ppx_tools.5.1+4.06.0+multicore-1
# compiler     4.06.1
# exit-code    2
# env-file     /Users/boris/.opam/ocsigen/build/ppx_tools.5.1+4.06.0+multicore-1/ppx_tools-78621-541445.env
# stdout-file  /Users/boris/.opam/ocsigen/build/ppx_tools.5.1+4.06.0+multicore-1/ppx_tools-78621-541445.out
# stderr-file  /Users/boris/.opam/ocsigen/build/ppx_tools.5.1+4.06.0+multicore-1/ppx_tools-78621-541445.err
### stdout ###
# ocamlc -bin-annot -w +A-4-17-44-45 -I +compiler-libs -safe-string -c ast_convenience.mli
# ocamlc -bin-annot -w +A-4-17-44-45 -I +compiler-libs -safe-string -c ast_convenience.ml
# ocamlc -bin-annot -w +A-4-17-44-45 -I +compiler-libs -safe-string -c ast_mapper_class.mli
### stderr ###
# File "ast_mapper_class.mli", line 26, characters 31-49:
# Error: Unbound type constructor effect_constructor
# make: *** [ast_mapper_class.cmi] Error 2```
hhugo commented 6 years ago

The important bit here is that you're trying to use some version of ocaml multicore. Ocaml multicore is still WIP and won't be supported by many ocaml libraries. Try again without multicore and things should work

dboris commented 6 years ago

This is in a fresh switch of OCaml 4.06.1. I have installed in the past 4.02.2+multicore, but I don't think there is a multicore 4.06.1.

hhugo commented 6 years ago

The log you've attached mentions multicore /Users/boris/.opam/ocsigen/build/ppx_tools.5.1+4.06.0+multicore-1

dboris commented 6 years ago
$ opam install ocsigen-start
The following actions will be performed:
  ∗  install ppx_tools                     5.1+4.06.0+multicore-1  [required by eliom]
  ∗  install ppx_deriving                  4.2.1                   [required by eliom]

Should I file a bug report with eliom?

dboris commented 6 years ago

Workaround was to install a specific, non-multicore version of ppx_tools manually, before installing ocsigen-start. I guess the multicore version was considered as latest by opam, which is unaware of multicore compatibility. Not sure if the issue should be addressed by eliom, opam, or the ppx_tools maintainers.

hhugo commented 6 years ago

I suspect you have something non standard in your opam remote. Try opam remote list.

dboris commented 6 years ago
$ opam remote list
  10 [git]    multicore     https://github.com/ocamllabs/multicore-opam.git
   0 [http]     default     https://opam.ocaml.org

You are right. That must be it. Closing.

hhugo commented 6 years ago

Possibly related issue https://github.com/ocamllabs/multicore-opam/issues/10