Esy: "esy install" fails to install packages

Created on 17 May 2018  ยท  5Comments  ยท  Source: esy/esy

I wanted to play with opium and thought I should try esy as well. I cloned the example repo and tried to add opium. I was told that I need to have a higher version of OCaml so I changed it to 4.6.1 and tried again. Then I got the following output.

~/Projects/esy-ocaml-project master ~ esy add @opam/opium
esy add v0.0.70
(node:45031) ExperimentalWarning: The fs.promises API is experimental
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 41 new dependencies.
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ”œโ”€ @opam/[email protected]
โ””โ”€ [email protected]
Done in 14.12s.
esy build v0.0.70
(node:45103) ExperimentalWarning: The fs.promises API is experimental
[59/63] โ   building @opam/[email protected]
[-/63] โ   waiting...
[-/63] โ   waiting...
[-/63] โ   waiting...
[-/63] โ   waiting...
[-/63] โ   waiting...
[-/63] โ   waiting...
error @opam/cohttp (node_modules/@opam/cohttp) failed to build.

The error below is likely a bug in Esy itself, please report it.

  Error: Command failed.
Exit code: 1
Command: /usr/local/lib/node_modules/esy/node_modules/@esy-ocaml/ocamlrun/install/bin/ocamlrun
Arguments: /usr/local/lib/node_modules/esy/bin/esyBuildPackage -B -
Directory: /Users/ulrik/Projects/esy-ocaml-project
Output:
# esy-build-package: running: 'jbuilder' 'subst' '-n' 'cohttp'
# esy-build-package: running: 'jbuilder' 'build' '-p' 'cohttp' '-j' '4'
    ocamlopt .ppx/ppx_fields_conv+ppx_sexp_conv/ppx.exe (exit 2)
(cd _build/default && /Users/ulrik/.esy/3___________________________________________________________________/i/ocaml-4.6.1-2f0a0fce/bin/ocamlopt.opt -o .ppx/ppx_fields_conv+ppx_sexp_conv/ppx.exe -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__base-100000000.11.0-c6fbd67f/lib/base -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__base-100000000.11.0-c6fbd67f/lib/base/caml -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__base-100000000.11.0-c6fbd67f/lib/base/shadow_stdlib -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocaml_compiler_libs-100000000.11.0-5994b9e0/lib/ocaml-compiler-libs/common -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocaml_compiler_libs-100000000.11.0-5994b9e0/lib/ocaml-compiler-libs/shadow -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocaml_migrate_parsetree-1.0.10-9c26e508/lib/ocaml-migrate-parsetree -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocaml_migrate_parsetree-1.0.10-9c26e508/lib/ocaml-migrate-parsetree/driver-main -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocamlfind-1.8.0-eb23f37d/lib/ocaml/compiler-libs -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___derivers-1.0.0-5dbef089/lib/ppx_derivers -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___fields___conv-100000000.11.0-37bb6f02/lib/ppx_fields_conv -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___sexp___conv-100000000.11.2-e84be772/lib/ppx_sexp_conv -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___sexp___conv-100000000.11.2-e84be772/lib/ppx_sexp_conv/expander -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib/ast -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib/print_diff -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib/traverse_builtins -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__result-1.3.0-90013aa3/lib/result -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__sexplib0-100000000.11.0-a1d34c5b/lib/sexplib0 -I /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__stdio-100000000.11.0-e8be67ea/lib/stdio /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__base-100000000.11.0-c6fbd67f/lib/base/caml/caml.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__base-100000000.11.0-c6fbd67f/lib/base/shadow_stdlib/shadow_stdlib.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__sexplib0-100000000.11.0-a1d34c5b/lib/sexplib0/sexplib0.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__base-100000000.11.0-c6fbd67f/lib/base/base.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocamlfind-1.8.0-eb23f37d/lib/ocaml/compiler-libs/ocamlcommon.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocaml_compiler_libs-100000000.11.0-5994b9e0/lib/ocaml-compiler-libs/common/ocaml_common.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocaml_compiler_libs-100000000.11.0-5994b9e0/lib/ocaml-compiler-libs/shadow/ocaml_shadow.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__result-1.3.0-90013aa3/lib/result/result.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocaml_migrate_parsetree-1.0.10-9c26e508/lib/ocaml-migrate-parsetree/migrate_parsetree.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___derivers-1.0.0-5dbef089/lib/ppx_derivers/ppx_derivers.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib/ast/ppxlib_ast.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib/print_diff/ppxlib_print_diff.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib/traverse_builtins/ppxlib_traverse_builtins.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__stdio-100000000.11.0-e8be67ea/lib/stdio/stdio.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib/ppxlib.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___fields___conv-100000000.11.0-37bb6f02/lib/ppx_fields_conv/ppx_fields_conv.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___sexp___conv-100000000.11.2-e84be772/lib/ppx_sexp_conv/expander/ppx_sexp_conv_expander.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___sexp___conv-100000000.11.2-e84be772/lib/ppx_sexp_conv/ppx_sexp_conv.cmxa /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ocaml_migrate_parsetree-1.0.10-9c26e508/lib/ocaml-migrate-parsetree/driver-main/migrate_parsetree_driver_main.cmxa)
File "_none_", line 1:
Error: Files /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppx___fields___conv-100000000.11.0-37bb6f02/lib/ppx_fields_conv/ppx_fields_conv.cmxa
       and /Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__ppxlib-0.2.0-b1ecf588/lib/ppxlib/ast/ppxlib_ast.cmxa
       make inconsistent assumptions over interface Ppxlib_ast__Import
esy-build-package: run ['sandbox-exec' '-f'

                   '/var/folders/r_/yvf8py_d6016744qhg9xc95m0000gn/T/c88176'

                   '/Users/ulrik/.esy/3___________________________________________________________________/i/opam__slash__jbuilde

Tried changing to another OCaml version without success.

When I first cloned the repo everything was working and I could do changes in the files and build etc.

bug old-bug-esy-install

All 5 comments

This is a depsolver failure, the possible solution would be to add this to a package.json:

"resolutions": {
  "**/@opam/ppxlib": "0.3.0"
}

These lines will make sure we have a single ppxlib in our depgraph.

That solves my issue but I guess this should stay open as opening issues and getting hand holding is not sustainable ๐Ÿ˜„ Should probably rename the issue to something more descriptive?

I've renamed this issue to collect examples of failures which we need to validate against the new installer (once it ready).

Closing as we have new installer in 0.2.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bryphe picture bryphe  ยท  6Comments

zartstrom picture zartstrom  ยท  3Comments

dejanr picture dejanr  ยท  6Comments

bryphe picture bryphe  ยท  7Comments

maarekj picture maarekj  ยท  7Comments