janestreet / core

Jane Street Capital's standard library overlay
MIT License
1.11k stars 111 forks source link

Unable to Install Core due to ppx_ast dependency #106

Closed sstadick closed 6 years ago

sstadick commented 6 years ago

Hello! I'm just working through the install instructions here: https://github.com/realworldocaml/book/wiki/Installation-Instructions

I can't get core to install on any version of ocaml. I get the same issue with ppx_ast. I'm new to ocaml, so I apologize if I'm missing something obvious.

:~ $ opam switch 4.06.0

=-=- Installing compiler 4.06.0 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[default.comp] https://github.com/ocaml/ocaml/archive/4.06.0.tar.gz downloaded
Now compiling OCaml. This may take a while, please bear with us...
Done.

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
βˆ—  installed base-bigarray.base
βˆ—  installed base-threads.base
βˆ—  installed base-unix.base
Done.
# To setup the new switch in the current shell, you need to run:
eval `opam config env`
:~ $ eval `opam config env`
:~ $ opam install core utop
The following actions will be performed:
  βˆ—  install conf-m4                 1           [required by ocamlfind]
  βˆ—  install ocamlbuild              0.12.0      [required by react]
  βˆ—  install ocamlfind               1.7.3-1     [required by utop]
  βˆ—  install num                     1.1         [required by sexplib]
  βˆ—  install jbuilder                1.0+beta18  [required by core, utop]
  βˆ—  install base-bytes              base        [required by camomile]
  βˆ—  install spawn                   v0.10.1     [required by core]
  βˆ—  install sexplib                 v0.10.0     [required by core]
  βˆ—  install result                  1.3         [required by lwt]
  βˆ—  install ppx_traverse_builtins   v0.10.0     [required by ppx_core, ppx_metaquot]
  βˆ—  install ppx_derivers            1.0         [required by ppx_type_conv]
  βˆ—  install ocaml-compiler-libs     v0.10.0     [required by ppx_core]
  βˆ—  install jane-street-headers     v0.10.0     [required by core_kernel]
  βˆ—  install re                      1.7.2       [required by ppx_expect]
  βˆ—  install cppo                    1.6.4       [required by utop]
  βˆ—  install base                    v0.10.0     [required by core]
  βˆ—  install topkg                   0.9.1       [required by react]
  βˆ—  install ocaml-migrate-parsetree 1.0.7       [required by core]
  βˆ—  install camomile                0.8.7       [required by utop]
  βˆ—  install typerep                 v0.10.0     [required by core_kernel]
  βˆ—  install stdio                   v0.10.0     [required by core]
  βˆ—  install react                   1.2.1       [required by utop]
  βˆ—  install octavius                1.2.0       [required by ppx_js_style]
  βˆ—  install ppx_tools_versioned     5.1         [required by lwt]
  βˆ—  install ppx_ast                 v0.10.0     [required by ppx_core]
  βˆ—  install configurator            v0.10.0     [required by core]
  βˆ—  install zed                     1.6         [required by lambda-term]
  βˆ—  install lwt                     3.3.0       [required by utop]
       For the PPX, please install package lwt_ppx
       For Lwt_log and Lwt_daemon, please install package lwt_log
  βˆ—  install ppx_core                v0.10.0     [required by ppx_assert, ppx_inline_test]
  βˆ—  install lwt_react               1.1.0       [required by utop]
  βˆ—  install ppx_optcomp             v0.10.0     [required by ppx_driver]
  βˆ—  install lambda-term             1.12.0      [required by utop]
  βˆ—  install ppx_driver              v0.10.2     [required by core]
  βˆ—  install utop                    2.1.0
  βˆ—  install variantslib             v0.10.0     [required by core_kernel]
  βˆ—  install ppx_metaquot            v0.10.0     [required by ppx_assert, ppx_inline_test]
  βˆ—  install ppx_let                 v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_here                v0.10.0     [required by ppx_assert, ppx_jane]
  βˆ—  install fieldslib               v0.10.0     [required by core_kernel]
  βˆ—  install ppx_type_conv           v0.10.0     [required by ppx_assert, ppx_base]
  βˆ—  install ppx_pipebang            v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_optional            v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_js_style            v0.10.0     [required by ppx_base]
  βˆ—  install ppx_inline_test         v0.10.0     [required by core_kernel]
  βˆ—  install ppx_fail                v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_variants_conv       v0.10.0     [required by bin_prot, ppx_jane]
  βˆ—  install ppx_typerep_conv        v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_traverse            v0.10.0     [required by ppx_custom_printf, ppx_expect]
  βˆ—  install ppx_sexp_conv           v0.10.0     [required by core_kernel]
  βˆ—  install ppx_fields_conv         v0.10.0     [required by bin_prot, ppx_jane]
  βˆ—  install ppx_enumerate           v0.10.0     [required by ppx_base]
  βˆ—  install ppx_compare             v0.10.0     [required by ppx_assert, bin_prot, ppx_base]
  βˆ—  install ppx_bench               v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_sexp_value          v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_sexp_message        v0.10.0     [required by core_kernel]
  βˆ—  install ppx_custom_printf       v0.10.0     [required by bin_prot, ppx_jane]
  βˆ—  install ppx_hash                v0.10.0     [required by core_kernel]
  βˆ—  install ppx_assert              v0.10.0     [required by core]
  βˆ—  install bin_prot                v0.10.0     [required by core_kernel]
  βˆ—  install ppx_base                v0.10.0     [required by core_kernel]
  βˆ—  install ppx_expect              v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_bin_prot            v0.10.0     [required by ppx_jane]
  βˆ—  install ppx_jane                v0.10.0     [required by core]
  βˆ—  install core_kernel             v0.10.0     [required by core]
  βˆ—  install core                    v0.10.0
===== βˆ—  65 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[base] Archive in cache
[bin_prot] Archive in cache
[configurator] Archive in cache
[core] Archive in cache
[core_kernel] Archive in cache
[fieldslib] Archive in cache
[default] https://opam.ocaml.org/archives/jane-street-headers.v0.10.0+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/cppo.1.6.4+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/lambda-term.1.12.0+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/jbuilder.1.0+beta18+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/lwt.3.3.0+opam.tar.gz downloaded
[num] Archive in cache
[default] https://opam.ocaml.org/archives/lwt_react.1.1.0+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/ocaml-compiler-libs.v0.10.0+opam.tar.gz downloaded
[ocamlbuild] Archive in cache
[default] https://opam.ocaml.org/archives/ocaml-migrate-parsetree.1.0.7+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/octavius.1.2.0+opam.tar.gz downloaded
[ppx_assert] Archive in cache
[ppx_ast] Archive in cache
[ppx_base] Archive in cache
[ppx_bench] Archive in cache
[ppx_bin_prot] Archive in cache
[ppx_compare] Archive in cache
[ppx_core] Archive in cache
[ppx_custom_printf] Archive in cache
[default] https://opam.ocaml.org/archives/ocamlfind.1.7.3-1+opam.tar.gz downloaded
[ppx_driver] Archive in cache
[ppx_enumerate] Archive in cache
[ppx_expect] Archive in cache
[ppx_fail] Archive in cache
[ppx_fields_conv] Archive in cache
[ppx_hash] Archive in cache
[ppx_here] Archive in cache
[ppx_inline_test] Archive in cache
[ppx_jane] Archive in cache
[ppx_js_style] Archive in cache
[ppx_let] Archive in cache
[ppx_metaquot] Archive in cache
[ppx_optcomp] Archive in cache
[ppx_optional] Archive in cache
[ppx_pipebang] Archive in cache
[ppx_sexp_conv] Archive in cache
[ppx_sexp_message] Archive in cache
[ppx_sexp_value] Archive in cache
[ppx_tools_versioned] Archive in cache
[ppx_traverse] Archive in cache
[default] https://opam.ocaml.org/archives/ppx_derivers.1.0+opam.tar.gz downloaded
[ppx_type_conv] Archive in cache
[ppx_typerep_conv] Archive in cache
[ppx_variants_conv] Archive in cache
[default] https://opam.ocaml.org/archives/ppx_traverse_builtins.v0.10.0+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/react.1.2.1+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/re.1.7.2+opam.tar.gz downloaded
[sexplib] Archive in cache
[default] https://opam.ocaml.org/archives/result.1.3+opam.tar.gz downloaded
[stdio] Archive in cache
[default] https://opam.ocaml.org/archives/spawn.v0.10.1+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/camomile.0.8.7+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/topkg.0.9.1+opam.tar.gz downloaded
[variantslib] Archive in cache
[default] https://opam.ocaml.org/archives/typerep.v0.10.0+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/utop.2.1.0+opam.tar.gz downloaded
[default] https://opam.ocaml.org/archives/zed.1.6+opam.tar.gz downloaded

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
βˆ—  installed conf-m4.1
βˆ—  installed ocamlfind.1.7.3-1
βˆ—  installed base-bytes.base
βˆ—  installed num.1.1
βˆ—  installed ocamlbuild.0.12.0
βˆ—  installed jbuilder.1.0+beta18
βˆ—  installed jane-street-headers.v0.10.0
βˆ—  installed ppx_derivers.1.0
βˆ—  installed ppx_traverse_builtins.v0.10.0
βˆ—  installed cppo.1.6.4
βˆ—  installed result.1.3
βˆ—  installed ocaml-compiler-libs.v0.10.0
βˆ—  installed re.1.7.2
βˆ—  installed spawn.v0.10.1
βˆ—  installed sexplib.v0.10.0
βˆ—  installed ocaml-migrate-parsetree.1.0.7
βˆ—  installed topkg.0.9.1
[ERROR] The compilation of ppx_ast failed at "jbuilder build -p ppx_ast -j 4".
βˆ—  installed octavius.1.2.0
βˆ—  installed react.1.2.1
βˆ—  installed camomile.0.8.7
βˆ—  installed base.v0.10.0
βˆ—  installed zed.1.6
βˆ—  installed stdio.v0.10.0
βˆ—  installed ppx_tools_versioned.5.1
βˆ—  installed typerep.v0.10.0
βˆ—  installed configurator.v0.10.0
βˆ—  installed lwt.3.3.0
βˆ—  installed lwt_react.1.1.0
βˆ—  installed lambda-term.1.12.0
βˆ—  installed utop.2.1.0

#=== ERROR while installing ppx_ast.v0.10.0 ===================================#
# opam-version 1.2.2
# os           darwin
# command      jbuilder build -p ppx_ast -j 4
# path         /Users/seth/.opam/4.06.0/build/ppx_ast.v0.10.0
# compiler     4.06.0
# exit-code    1
# env-file     /Users/seth/.opam/4.06.0/build/ppx_ast.v0.10.0/ppx_ast-50668-0ff8ed.env
# stdout-file  /Users/seth/.opam/4.06.0/build/ppx_ast.v0.10.0/ppx_ast-50668-0ff8ed.out
# stderr-file  /Users/seth/.opam/4.06.0/build/ppx_ast.v0.10.0/ppx_ast-50668-0ff8ed.err
### stderr ###
#         bash src/parser.ml (exit 127)
# (cd _build/default/src && /usr/local/Cellar/bash -e -u -o pipefail -c '( echo "open Import"; cat parser0.ml; ) > parser.ml')
#         bash src/parser.mli (exit 127)
# (cd _build/default/src && /usr/local/Cellar/bash -e -u -o pipefail -c '( echo "open Import"; cat parser0.mli; ) > parser.mli')
#         bash src/location_helper.ml (exit 127)
# (cd _build/default/src && /usr/local/Cellar/bash -e -u -o pipefail -c '../generate/select.exe location_helper.ml-4.06 location_helper.ml-default > location_helper.ml')

=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
The following actions were aborted
  βˆ—  install bin_prot          v0.10.0
  βˆ—  install core              v0.10.0
  βˆ—  install core_kernel       v0.10.0
  βˆ—  install fieldslib         v0.10.0
  βˆ—  install ppx_assert        v0.10.0
  βˆ—  install ppx_base          v0.10.0
  βˆ—  install ppx_bench         v0.10.0
  βˆ—  install ppx_bin_prot      v0.10.0
  βˆ—  install ppx_compare       v0.10.0
  βˆ—  install ppx_core          v0.10.0
  βˆ—  install ppx_custom_printf v0.10.0
  βˆ—  install ppx_driver        v0.10.2
  βˆ—  install ppx_enumerate     v0.10.0
  βˆ—  install ppx_expect        v0.10.0
  βˆ—  install ppx_fail          v0.10.0
  βˆ—  install ppx_fields_conv   v0.10.0
  βˆ—  install ppx_hash          v0.10.0
  βˆ—  install ppx_here          v0.10.0
  βˆ—  install ppx_inline_test   v0.10.0
  βˆ—  install ppx_jane          v0.10.0
  βˆ—  install ppx_js_style      v0.10.0
  βˆ—  install ppx_let           v0.10.0
  βˆ—  install ppx_metaquot      v0.10.0
  βˆ—  install ppx_optcomp       v0.10.0
  βˆ—  install ppx_optional      v0.10.0
  βˆ—  install ppx_pipebang      v0.10.0
  βˆ—  install ppx_sexp_conv     v0.10.0
  βˆ—  install ppx_sexp_message  v0.10.0
  βˆ—  install ppx_sexp_value    v0.10.0
  βˆ—  install ppx_traverse      v0.10.0
  βˆ—  install ppx_type_conv     v0.10.0
  βˆ—  install ppx_typerep_conv  v0.10.0
  βˆ—  install ppx_variants_conv v0.10.0
  βˆ—  install variantslib       v0.10.0
The following actions failed
  βˆ—  install ppx_ast v0.10.0
The following changes have been performed
  βˆ—  install base                    v0.10.0
  βˆ—  install base-bytes              base
  βˆ—  install camomile                0.8.7
  βˆ—  install conf-m4                 1
  βˆ—  install configurator            v0.10.0
  βˆ—  install cppo                    1.6.4
  βˆ—  install jane-street-headers     v0.10.0
  βˆ—  install jbuilder                1.0+beta18
  βˆ—  install lambda-term             1.12.0
  βˆ—  install lwt                     3.3.0
  βˆ—  install lwt_react               1.1.0
  βˆ—  install num                     1.1
  βˆ—  install ocaml-compiler-libs     v0.10.0
  βˆ—  install ocaml-migrate-parsetree 1.0.7
  βˆ—  install ocamlbuild              0.12.0
  βˆ—  install ocamlfind               1.7.3-1
  βˆ—  install octavius                1.2.0
  βˆ—  install ppx_derivers            1.0
  βˆ—  install ppx_tools_versioned     5.1
  βˆ—  install ppx_traverse_builtins   v0.10.0
  βˆ—  install re                      1.7.2
  βˆ—  install react                   1.2.1
  βˆ—  install result                  1.3
  βˆ—  install sexplib                 v0.10.0
  βˆ—  install spawn                   v0.10.1
  βˆ—  install stdio                   v0.10.0
  βˆ—  install topkg                   0.9.1
  βˆ—  install typerep                 v0.10.0
  βˆ—  install utop                    2.1.0
  βˆ—  install zed                     1.6

=-=- lwt.3.3.0 installed successfully -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
=> Lwt 4.0.0 will make some breaking changes in March 2018. See
     https://github.com/ocsigen/lwt/issues/453

The former state can be restored with:
    opam switch import "~/.opam/4.06.0/backup/state-20180212144203.export"
sstadick commented 6 years ago

I figured it out. For reasons unkown to me opam was using /usr/local/Cellar/bash, which is a directory to multiple versions of bath (idk why homebrew does this).

All I did was move /usr/local/bin to the front of my $PATH so it appeared before the /usr/local/Cellar, now everything appears to be working. export PATH="/usr/local/bin:$PATH"