onlinemediagroup / ocaml-usbmux

Connect to your iDevices over USB at scale
114 stars 13 forks source link

Installation error on opam install usbmux #18

Open JohnCoates opened 6 years ago

JohnCoates commented 6 years ago

This is on High Sierra

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  šŸ« 
[ERROR] The compilation of usbmux failed at "ocaml setup.ml -build".
Processing  1/1: [usbmux: ocaml]
#=== ERROR while installing usbmux.1.3.2 ======================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml setup.ml -build
# path         /Users/macbook/.opam/system/build/usbmux.1.3.2
# compiler     system (4.06.0)
# exit-code    1
# env-file     /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.env
# stdout-file  /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.out
# stderr-file  /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.err
### stdout ###
# [...]
# ocamlfind ocamlopt unix.cmxa -I /Users/macbook/.opam/system/lib/ocamlbuild /Users/macbook/.opam/system/lib/ocamlbuild/ocamlbuildlib.cmxa -linkpkg myocamlbuild.ml /Users/macbook/.opam/system/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# /Users/macbook/.opam/system/bin/ocamlfind ocamldep -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -modules src/lib/usbmux.mli > src/lib/usbmux.mli.depends
# /Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmi src/lib/usbmux.mli
# /Users/macbook/.opam/system/bin/ocamlfind ocamldep -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -modules src/lib/usbmux.ml > src/lib/usbmux.ml.depends
# /Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
# + /Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
# File "src/lib/usbmux.ml", line 158, characters 35-41:
# Error: This expression has type bytes but an expression was expected of type
#          string
# Command exited with code 2.
### stderr ###
# E: Failure("Command ''/Users/macbook/.opam/system/bin/ocamlbuild' src/lib/usbmux.cma src/lib/usbmux.cmxa src/lib/usbmux.a src/lib/usbmux.cmxs src/app/main.native -use-ocamlfind -tag debug' terminated with error code 10")
fxfactorial commented 6 years ago

Hi,

try a lower version compiler.

On Jan 17, 2018, at 7:26 AM, John Coates notifications@github.com wrote:

This is on High Sierra

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= šŸ« [ERROR] The compilation of usbmux failed at "ocaml setup.ml -build". Processing 1/1: [usbmux: ocaml]

=== ERROR while installing usbmux.1.3.2 ======================================

opam-version 1.2.2

os darwin

command ocaml setup.ml -build

path /Users/macbook/.opam/system/build/usbmux.1.3.2

compiler system (4.06.0)

exit-code 1

env-file /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.env

stdout-file /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.out

stderr-file /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.err

stdout

[...]

ocamlfind ocamlopt unix.cmxa -I /Users/macbook/.opam/system/lib/ocamlbuild /Users/macbook/.opam/system/lib/ocamlbuild/ocamlbuildlib.cmxa -linkpkg myocamlbuild.ml /Users/macbook/.opam/system/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild

/Users/macbook/.opam/system/bin/ocamlfind ocamldep -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -modules src/lib/usbmux.mli > src/lib/usbmux.mli.depends

/Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmi src/lib/usbmux.mli

/Users/macbook/.opam/system/bin/ocamlfind ocamldep -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -modules src/lib/usbmux.ml > src/lib/usbmux.ml.depends

/Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml

+ /Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml

File "src/lib/usbmux.ml", line 158, characters 35-41:

Error: This expression has type bytes but an expression was expected of type

string

Command exited with code 2.

stderr

E: Failure("Command ''/Users/macbook/.opam/system/bin/ocamlbuild' src/lib/usbmux.cma src/lib/usbmux.cmxa src/lib/usbmux.a src/lib/usbmux.cmxs src/app/main.native -use-ocamlfind -tag debug' terminated with error code 10")

ā€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/onlinemediagroup/ocaml-usbmux/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/AC5WkNoedfdgp6HHZq6p-t6NKMvT1Y5Aks5tLhEegaJpZM4Rhg23.

JohnCoates commented 6 years ago

Thanks, I'm new to ocaml. Is there a certain version I should try, or a recommended command to switch compiler versions?

fxfactorial commented 6 years ago

Maybe try like:

opam switch ios -A  4.04.0

And be sure to do the ``evalopam config env```` it suggests to do, then install should work.

2600box commented 6 years ago

I had this same problem with compiler version # compiler system (4.06.1)

using opam switch ios -A 4.04.0 to downgrade worked a charm