vbmithr / ocaml-websocket

Websocket library for OCaml
ISC License
162 stars 44 forks source link

websocket 2.9 install fails #83

Closed alinpopa closed 7 years ago

alinpopa commented 7 years ago
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
∗  installed stringext.1.4.3
∗  installed magic-mime.1.0.0
∗  installed uchar.0.0.1
∗  installed ocplib-endian.1.0
∗  installed topkg.0.9.0
∗  installed base64.2.1.2
∗  installed astring.0.8.3
∗  installed cmdliner.1.0.0
∗  installed ipaddr.2.7.2
∗  installed fmt.0.8.2
∗  installed uri.1.9.2
∗  installed logs.0.6.2
∗  installed cstruct.2.3.2
∗  installed conduit.0.15.0
∗  installed cohttp.0.22.0
[ERROR] The compilation of websocket failed at "ocaml pkg/build.ml native=true native-dynlink=true lwt=true async=true async_ssl=false nocrypto=false cryptokit=false test=false".

#=== ERROR while installing websocket.2.9 =====================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml pkg/build.ml native=true native-dynlink=true lwt=true async=true async_ssl=false nocrypto=false cryptokit=false test=false
# path         /Users/alin/.opam/system/build/websocket.2.9
# compiler     system (4.04.0)
# exit-code    10
# env-file     /Users/alin/.opam/system/build/websocket.2.9/websocket-94036-7355b0.env
# stdout-file  /Users/alin/.opam/system/build/websocket.2.9/websocket-94036-7355b0.out
# stderr-file  /Users/alin/.opam/system/build/websocket.2.9/websocket-94036-7355b0.err
### stdout ###
# [...]
# File "lib/websocket_async.ml", line 252, characters 28-852:
# Error: The function applied to this argument has type
#          'a Async.Std.Deferred.Or_error.t ->
#          ('a -> 'b Async.Std.Deferred.Or_error.t) ->
#          'b Core_kernel.Std.Or_error.t Async_kernel.Types.Deferred.t
# This argument cannot be applied with label ~f
# Command exited with code 2.
# + ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package cppo_ocamlbuild myocamlbuild.ml /Users/alin/.opam/system/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# File "_none_", line 1:
# Warning 58: no cmx file was found in path for module Ocamlbuild_cppo, and its interface was not compiled with -opaque

I can gather more details on this failure if needed.

Thanks.

alinpopa commented 7 years ago

Further details: noticed that this problem is after installing async (113.33.00, looks like):

∗  installed async_kernel.113.33.00
∗  installed async_rpc_kernel.113.33.00
∗  installed async_unix.113.33.00+4.03
∗  installed async_extra.113.33.00+4.03
∗  installed async.113.33.00
∗  installed cstruct.2.3.2
∗  installed conduit.0.15.0
∗  installed cohttp.0.22.0
[ERROR] The compilation of websocket failed at "ocaml pkg/build.ml native=true native-dynlink=true lwt=true async=true async_ssl=false nocrypto=false cryptokit=false test=false".

#=== ERROR while installing websocket.2.9 =====================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml pkg/build.ml native=true native-dynlink=true lwt=true async=true async_ssl=false nocrypto=false cryptokit=false test=false
# path         /Users/alin/.opam/system/build/websocket.2.9
# compiler     system (4.04.0)
# exit-code    10
# env-file     /Users/alin/.opam/system/build/websocket.2.9/websocket-47032-527847.env
# stdout-file  /Users/alin/.opam/system/build/websocket.2.9/websocket-47032-527847.out
# stderr-file  /Users/alin/.opam/system/build/websocket.2.9/websocket-47032-527847.err
### stdout ###
# [...]
# File "lib/websocket_async.ml", line 252, characters 28-852:
# Error: The function applied to this argument has type
#          'a Async.Std.Deferred.Or_error.t ->
#          ('a -> 'b Async.Std.Deferred.Or_error.t) ->
#          'b Core_kernel.Std.Or_error.t Async_kernel.Types.Deferred.t
# This argument cannot be applied with label ~f
# Command exited with code 2.
# + ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package cppo_ocamlbuild myocamlbuild.ml /Users/alin/.opam/system/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# File "_none_", line 1:
# Warning 58: no cmx file was found in path for module Ocamlbuild_cppo, and its interface was not compiled with -opaque

=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
  ∗  install websocket 2.9
The following changes have been performed
  ⊘  remove  websocket        2.9
  ∗  install async            113.33.00
  ∗  install async_extra      113.33.00+4.03
  ∗  install async_kernel     113.33.00
  ∗  install async_rpc_kernel 113.33.00
  ∗  install async_unix       113.33.00+4.03

The former state can be restored with:
    opam switch import "~/.opam/system/backup/state-20170223075903.export"
vbmithr commented 7 years ago

It is an incompatibility with Jane Street Core/Async libraries in OPAM and the dev version. Is it possible to use Janestreet's bleeding-edge version of their libs:

opam repo add janestreet-bleeding https://ocaml.janestreet.com/opam-repository

I'm developing against those libraries since they will release very soon. Thanks.

alinpopa commented 7 years ago

Ah; right; it makes sense; thanks. Closing it.