Comments (50)
I tried
# opam switch working -A 4.03.0
# eval `opam config env`
# opam install usbmux -y
Without success
`~/gandalf_src/ocaml-usbmux # make
ocaml setup.ml -build
W: File src/lib/META has changed, doing a backup in src/lib/META.bak
Finished, 0 targets (0 cached) in 00:00:00.
- /root/.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 plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
Failure("Ast_mapper: OCaml version mismatch or malformed input")
File "src/lib/usbmux.ml", line 1:
Error: Error while running external preprocessor
Command line: /root/.opam/system/lib/ppx_deriving/./ppx_deriving /root/.opam/system/lib/ppx_deriving_yojson/./ppx_deriving_yojson.cma '/tmp/camlppxa8c6aa' '/tmp/camlppx2e859f'
Command exited with code 2.
Compilation unsuccessful after building 4 targets (3 cached) in 00:00:00.
E: Failure("Command ''/usr/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")
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 1`
from ocaml-usbmux.
Hi, thanks for using this code!
Double check that your environment is correct by doing an opam switch right before and in the directory do: opam pin add usbmux . -y
Seems like you're missing the pin command. Also do an opam update before all of this.
from ocaml-usbmux.
Thank You for quick responce!
`~/gandalf_src/ocaml-usbmux # opam pin add usbmux . -y
[WARNING] Running as root is not recommended
[NOTE] Package usbmux is already path-pinned to /root/gandalf_src/ocaml-usbmux.
This will erase any previous custom definition.
Proceed ? [Y/n] y
[usbmux] /root/gandalf_src/ocaml-usbmux/ synchronized
usbmux needs to be installed.
The following dependencies couldn't be met:
- usbmux -> cohttp -> sexplib < 113.01.00
- usbmux -> cohttp -> ppx_fields_conv -> ppx_type_conv (< 113.25.00 | >= 113.33.00+4.03) -> ppx_driver < 113.25.00 -> ppx_core < 113.25.00
- usbmux -> cohttp -> ppx_fields_conv -> ppx_type_conv (< 113.25.00 | >= 113.33.00+4.03) -> ppx_deriving < 4.0
- usbmux -> cohttp -> pa_fields_conv
- usbmux -> lwt >= 2.5.1
- usbmux -> ppx_deriving_yojson >= 2.4 -> ppx_deriving >= 4.0
Your request can't be satisfied: - Conflicting version constraints for ppx_deriving
- cohttp.0.9.1 is in conflict with lwt.2.5.2
- cohttp.0.9.10 is in conflict with lwt.2.5.2
- cohttp.0.9.11 is in conflict with lwt.2.5.2
- cohttp.0.9.12 is in conflict with lwt.2.5.2
- cohttp.0.9.13 is in conflict with lwt.2.5.2
- cohttp.0.9.14 is in conflict with lwt.2.5.2
- cohttp.0.9.15 is in conflict with lwt.2.5.2
- cohttp.0.9.2 is in conflict with lwt.2.5.2
- cohttp.0.9.3 is in conflict with lwt.2.5.2
- cohttp.0.9.4 is in conflict with lwt.2.5.2
- cohttp.0.9.5 is in conflict with lwt.2.5.2
- cohttp.0.9.6 is in conflict with lwt.2.5.2
- cohttp.0.9.7 is in conflict with lwt.2.5.2
- cohttp.0.9.8 is in conflict with lwt.2.5.2
- cohttp.0.9.9 is in conflict with lwt.2.5.2
- pa_fields_conv is not available because your system doesn't comply with ocaml-version >= "4.00.0" & ocaml-version < "4.03".
- ppx_core<113.25.00 is not available because your system doesn't comply with ocaml-version >= "4.02.3" & ocaml-version < "4.03.0".
- sexplib<113.01.00 is not available because your system doesn't comply with ocaml-version >= "4.02.1" & ocaml-version < "4.03".
No solution found, exiting
[NOTE] Pinning command successful, but your installed packages may be out of sync.`
from ocaml-usbmux.
Could create small manual how corectly install?
Thanx in advance!
from ocaml-usbmux.
@freemanlutsk Hmm, why are you running opam as root?
The installation instructions are listed in here: https://github.com/onlinemediagroup/ocaml-usbmux/blob/master/README.md
I'm not entirely clear what's happening, will have to dig a little deeper. System info please?
The dependency output is odd, I think I might have to force some higher dependencies...
While waiting to hear back from you, you can also try out this binary release for Linux (Ubuntu) https://github.com/onlinemediagroup/ocaml-usbmux/releases/download/v1.3.1/gandalf_ubuntu_14_x86_64
There's a compiled version for OS X as well https://github.com/onlinemediagroup/ocaml-usbmux/releases
from ocaml-usbmux.
I have same problem:
$ uname -a
Linux workstation 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
~/gandalf_src/ocaml-usbmux$ make
ocaml setup.ml -build
W: File src/lib/META has changed, doing a backup in src/lib/META.bak
Finished, 0 targets (0 cached) in 00:00:00.
- /home/deploy/.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 plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
File "src/lib/usbmux.ml", line 260, characters 9-336:
Error: This expression has type
(Yojson.Safe.json Lazy.t * ([<Error of string |
Ok of 'b ] as 'a))
list -> 'b list
but an expression was expected of type
(Yojson.Safe.json Lazy.t *
tunnel Ppx_deriving_yojson_runtime.error_or)
list -> 'c
Type 'a is not compatible with type
tunnel Ppx_deriving_yojson_runtime.error_or =
(tunnel, string) Result.result
Command exited with code 2.
Compilation unsuccessful after building 4 targets (3 cached) in 00:00:00.
E: Failure("Command ''/usr/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")
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 1
from ocaml-usbmux.
When install with opam:
~/gandalf_src/ocaml-usbmux$ opam switch working -A 4.03.0
~/gandalf_src/ocaml-usbmux$ eval opam config env
~/gandalf_src/ocaml-usbmux$ opam install usbmux -y
~/gandalf_src/ocaml-usbmux$ which gandalf
/home/deploy/.opam/working/bin/gandalf
~/gandalf_src/ocaml-usbmux$ gandalf
Fatal error: exception Unix.Unix_error(Unix.ENOENT, "connect", "")
Raised at file "src/core/lwt.ml", line 789, characters 22-23
Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
Called from file "src/app/main.ml", line 224, characters 19-39
from ocaml-usbmux.
Okay I think the first one is versioning constraints that I can fix and the second one is that you need to have usbmuxd already running before using Gandalf. Thank you will fix first and give better error on second
from ocaml-usbmux.
@artful88533 @freemanlutsk Thanks for your patience friends. I fixed the issue, an upstream package had changed its API and your opam installation tried installing that one. I updated this code correspondingly. The fix isn't seen up here yet because I need to push/resolve some git permissions first. But should be up soon.
from ocaml-usbmux.
That's great news. Can you tell when we see fix here?
from ocaml-usbmux.
@artful88533 try this:
$ opam pin add usbmux https://github.com/fxfactorial/ocaml-usbmux
from ocaml-usbmux.
I tried:
~/gandalf_src/ocaml-usbmux# opam pin add usbmux https://github.com/fxfactorial/ocaml-usbmux
[WARNING] Running as root is not recommended
[NOTE] Package usbmux is already http-pinned to https://github.com/fxfactorial/ocaml-usbmux.
This will erase any previous custom definition.
Proceed ? [Y/n] y
[usbmux] https://github.com/fxfactorial/ocaml-usbmux downloaded
usbmux needs to be installed.
The following dependencies couldn't be met:
- usbmux -> cohttp -> sexplib < 113.01.00
- usbmux -> cohttp -> ppx_fields_conv -> ppx_core < 113.25.00
- usbmux -> cohttp -> ppx_fields_conv -> ppx_type_conv >= 113.33.00+4.03 -> ppx_deriving < 4.0
- usbmux -> cohttp -> pa_fields_conv
- usbmux -> cohttp -> conduit = 0.5.1 -> sexplib < 113.01.00
- usbmux -> lwt >= 2.5.1
- usbmux -> ppx_deriving_yojson >= 2.4 -> ppx_deriving >= 4.0
Your request can't be satisfied: - Conflicting version constraints for ppx_deriving
- cohttp.0.9.1 is in conflict with lwt.2.5.2
- cohttp.0.9.10 is in conflict with lwt.2.5.2
- cohttp.0.9.11 is in conflict with lwt.2.5.2
- cohttp.0.9.12 is in conflict with lwt.2.5.2
- cohttp.0.9.13 is in conflict with lwt.2.5.2
- cohttp.0.9.14 is in conflict with lwt.2.5.2
- cohttp.0.9.15 is in conflict with lwt.2.5.2
- cohttp.0.9.2 is in conflict with lwt.2.5.2
- cohttp.0.9.3 is in conflict with lwt.2.5.2
- cohttp.0.9.4 is in conflict with lwt.2.5.2
- cohttp.0.9.5 is in conflict with lwt.2.5.2
- cohttp.0.9.6 is in conflict with lwt.2.5.2
- cohttp.0.9.7 is in conflict with lwt.2.5.2
- cohttp.0.9.8 is in conflict with lwt.2.5.2
- cohttp.0.9.9 is in conflict with lwt.2.5.2
- pa_fields_conv is not available because your system doesn't comply with ocaml-version >= "4.00.0" & ocaml-version < "4.03".
- ppx_core<113.25.00 is not available because your system doesn't comply with ocaml-version >= "4.02.3" & ocaml-version < "4.03.0".
- sexplib<113.01.00 is not available because your system doesn't comply with ocaml-version >= "4.02.1" & ocaml-version < "4.03".
No solution found, exiting
[NOTE] Pinning command successful, but your installed packages may be out of sync.
~/gandalf_src/ocaml-usbmux# opam list
[WARNING] Running as root is not recommended
Installed packages for working:
base-bigarray base Bigarray library distributed with the OCaml compiler
base-bytes base Bytes library distributed with the OCaml compiler
base-threads base Threads library distributed with the OCaml compiler
base-unix base Unix library distributed with the OCaml compiler
base64 2.0.0 Base64 encoding and decoding library
biniou 1.0.12 Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve
camlp4 4.03+1 Camlp4 is a system for writing extensible parsers for programming languages
cmdliner 0.9.8 Declarative definition of command line interfaces for OCaml
cohttp 0.21.0 HTTP(S) library for Lwt, Async and Mirage
conduit 0.12.0 Network connection library for TCP and SSL
conf-m4 1 Virtual package relying on m4
conf-ncurses 1 Virtual package relying on ncurses
conf-pkg-config 1.0 Virtual package relying on pkg-config installation.
conf-which 1 Virtual package relying on which
cppo 1.3.2 Equivalent of the C preprocessor for OCaml programs
cstruct 2.2.0 access C structures via a camlp4 extension
easy-format 1.2.0 High-level and functional interface to the Format module of the OCaml standard library
fieldslib 113.24.00 Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and crea
ipaddr 2.7.0 IP (and MAC) address representation library
lambdasoup 0.6 Easy functional HTML scraping and manipulation with CSS selectors
lwt 2.5.2 A cooperative threads library for OCaml
magic-mime 1.0.0 Convert file extensions to MIME types
markup 0.7.2 Error-recovering functional HTML5 and XML parsers and writers
oasis 0.4.6 Architecture for building OCaml libraries and applications
ocaml-data-notation 0.0.11 Store data using OCaml notation
ocamlbuild 0.9.2 OCamlbuild is a build system with builtin rules to easily build most OCaml projects.
ocamlfind 1.6.2 A library manager for OCaml
ocamlify 0.0.1 Include files in OCaml code
ocamlmod 0.0.8 Generate OCaml modules from source files
ocplib-endian 1.0 Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01.
plist 0.1 Create Apple Plists
ppx_core 113.33.01+4.03 Standard library for ppx rewriters
ppx_deriving 3.3 Type-driven code generation for OCaml >=4.02
ppx_driver 113.33.01+4.03 Feature-full driver for OCaml AST transformers
ppx_fields_conv 113.33.00+4.03 Generation of accessor and iteration functions for ocaml records
ppx_optcomp 113.33.00+4.03 Optional compilation for OCaml
ppx_sexp_conv 113.33.01+4.03 Generation of S-expression conversion functions from type definitions
ppx_tools 5.0+4.03.0 Tools for authors of ppx rewriters and other syntactic tools
ppx_type_conv 113.33.01+4.03 Support Library for type-driven code generators
re 1.6.1 RE is a regular expression library for OCaml
sexplib 113.33.00+4.03 Library for serializing OCaml values to and from S-expressions
stringext 1.4.2 Extra string functions for OCaml
type_conv 113.00.02 Library for building type-driven syntax extensions
uri 1.9.2 RFC3986 URI/URL parsing library
uutf 0.9.4 Non-blocking streaming Unicode codec for OCaml
yojson 1.3.2 Yojson is an optimized parsing and printing library for the JSON format
But I want build ocaml-usbmux from source. Can I do it?
from ocaml-usbmux.
@artful88533 yes you can! Sorry my bad, I forgot to mention that I had to limit it to the OCaml compile ranges, (an upstream package isn't playing as nicely as I want..)
available: [ ocaml-version >= "4.02.0" & ocaml-version < "4.03.0"]
so basically do:
$ opam switch usbmux -A 4.02.3
$ eval `opam config env`
$ opam pin add usbmux https://github.com/fxfactorial/ocaml-usbmux -y
(Also somewhat odd you're running opam as root...)
from ocaml-usbmux.
But I have error with make:
~/gandalf_src/ocaml-usbmux# make
ocaml setup.ml -build
W: File src/lib/META has changed, doing a backup in src/lib/META.bak
Finished, 1 target (0 cached) in 00:00:00.
- /root/.opam/usbmux/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 plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
File "src/lib/usbmux.ml", line 260, characters 9-336:
Error: This expression has type
(Yojson.Safe.json Lazy.t * ([<Error of string |
Ok of 'b ] as 'a))
list -> 'b list
but an expression was expected of type
(Yojson.Safe.json Lazy.t *
tunnel Ppx_deriving_yojson_runtime.error_or)
list -> 'c
Type 'a is not compatible with type
tunnel Ppx_deriving_yojson_runtime.error_or =
(tunnel, string) Result.result
Command exited with code 2.
Compilation unsuccessful after building 4 targets (0 cached) in 00:00:00.
E: Failure("Command ''/root/.opam/usbmux/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")
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 1
from ocaml-usbmux.
You got that error with make directly? Did it error out using the opam pin instructions ?
from ocaml-usbmux.
~/gandalf_src/ocaml-usbmux# opam switch usbmux -A 4.02.3
[WARNING] Running as root is not recommended
~/gandalf_src/ocaml-usbmux# eval opam config env
[WARNING] Running as root is not recommended
~/gandalf_src/ocaml-usbmux# opam pin add usbmux https://github.com/fxfactorial/ocaml-usbmux -y
[WARNING] Running as root is not recommended
[NOTE] Package usbmux is already http-pinned to https://github.com/fxfactorial/ocaml-usbmux.
This will erase any previous custom definition.
Proceed ? [Y/n] y
[usbmux] https://github.com/fxfactorial/ocaml-usbmux downloaded
usbmux needs to be installed.
The following actions will be performed:
∗ install usbmux 1.3.1*
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[usbmux.1.3.1] https://github.com/fxfactorial/ocaml-usbmux downloaded
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of usbmux failed at "oasis setup".
Processing 1/1: [usbmux: ocaml]
#=== ERROR while installing usbmux.1.3.1 ======================================#
opam-version 1.2.2
os linux
command oasis setup
path /root/.opam/usbmux/build/usbmux.1.3.1
compiler 4.02.3
exit-code 1
env-file /root/.opam/usbmux/build/usbmux.1.3.1/usbmux-11272-ad8886.env
stdout-file /root/.opam/usbmux/build/usbmux.1.3.1/usbmux-11272-ad8886.out
stderr-file /root/.opam/usbmux/build/usbmux.1.3.1/usbmux-11272-ad8886.err
stderr
E: Sys_error("_oasis: No such file or directory")
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
∗ install usbmux 1.3.1
No changes have been performed
=-=- usbmux.1.3.1 troubleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> Now you can ssh into your jailbroken iDevice using the CLI, gandalf.
=> Simple invocation:
=> sudo which gandalf
--mappings etc/mapping --daemonize --verbose
=> where etc/mapping is a file such that # start comments and consists of
an array of json objects with these fields, note that name can be null
and is just a nickname for this tunnel, other fields are required.
This is a comment
[{"udid":"9cdfac9f74c5e18a6eff3611c0927df5cf4f2eca",
"name":"i11",
"forwarding": [{"local_port":2000, "device_port":22},
{"local_port":3000, "device_port":1122}]}]
=> See uptime, tunnels and other metadata with:
=> gandalf --status
=> Note that with over 13 devices usbmuxd will start to buck
=> because of threading issue with libplist.
=> Use the custom one provided at https://github.com/onlinemediagroup/libplist
=>
=> The Linux kernel will also have trouble with many USB3.0 devices, ie over 15ish
=> Fix that issue by turning off USB3.0 support in your BIOS
=> Check out the man page or see the README at:
=> https://github.com/onlinemediagroup/ocaml-usbmux/blob/master/README.md
[NOTE] Pinning command successful, but your installed packages may be out of sync.
from ocaml-usbmux.
@artful88533 Oh gosh, try cloning the repo, https://github.com/fxfactorial/ocaml-usbmux, and doing directly in the cloned repo.
$ opam pin add usbmux . -y
from ocaml-usbmux.
You are probably tired of me :)
=== ERROR while installing usbmux.1.3.1 ======================================#
opam-version 1.2.2
os linux
command ocaml setup.ml -build
path /root/.opam/usbmux/build/usbmux.1.3.1
compiler 4.02.3
exit-code 1
env-file /root/.opam/usbmux/build/usbmux.1.3.1/usbmux-13162-d2d111.env
stdout-file /root/.opam/usbmux/build/usbmux.1.3.1/usbmux-13162-d2d111.out
stderr-file /root/.opam/usbmux/build/usbmux.1.3.1/usbmux-13162-d2d111.err
stdout
Error: This expression has type
[...]
list -> 'b list
but an expression was expected of type
(Yojson.Safe.json Lazy.t *
tunnel Ppx_deriving_yojson_runtime.error_or)
list -> 'c
Type 'a is not compatible with type
tunnel Ppx_deriving_yojson_runtime.error_or =
(tunnel, string) Result.result
Command exited with code 2.
stderr
E: Failure("Command ''/root/.opam/usbmux/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")
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
∗ install usbmux 1.3.1
No changes have been performed
from ocaml-usbmux.
@artful88533 no, not at all. I am very grateful you are still here. I know what the problem is, basically just need to get the version constraints right in opam.
can you do:
$ opam list
from ocaml-usbmux.
$ opam list
Installed packages for usbmux:
base-bigarray base Bigarray library distributed with the OCaml compiler
base-bytes base Bytes library distributed with the OCaml compiler
base-ocamlbuild base OCamlbuild binary and libraries distributed with the OCaml compiler
base-threads base Threads library distributed with the OCaml compiler
base-unix base Unix library distributed with the OCaml compiler
base64 2.0.0 Base64 encoding and decoding library
biniou 1.0.12 Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve
camlp4 4.02+7 Camlp4 is a system for writing extensible parsers for programming languages
cmdliner 0.9.8 Declarative definition of command line interfaces for OCaml
cohttp 0.21.0 HTTP(S) library for Lwt, Async and Mirage
conduit 0.12.0 Network connection library for TCP and SSL
conf-m4 1 Virtual package relying on m4
conf-ncurses 1 Virtual package relying on ncurses
conf-pkg-config 1.0 Virtual package relying on pkg-config installation.
conf-which 1 Virtual package relying on which
cppo 1.3.2 Equivalent of the C preprocessor for OCaml programs
cstruct 2.2.0 access C structures via a camlp4 extension
easy-format 1.2.0 High-level and functional interface to the Format module of the OCaml standard library
fieldslib 113.33.03 Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create n
ipaddr 2.7.0 IP (and MAC) address representation library
js-build-tools 113.33.04 Collection of tools to help building Jane Street Packages
lambdasoup 0.6 Easy functional HTML scraping and manipulation with CSS selectors
lwt 2.5.2 A cooperative threads library for OCaml
magic-mime 1.0.0 Convert file extensions to MIME types
markup 0.7.2 Error-recovering functional HTML5 and XML parsers and writers
oasis 0.4.6 Architecture for building OCaml libraries and applications
ocaml-data-notation 0.0.11 Store data using OCaml notation
ocamlbuild 0 Build system distributed with the OCaml compiler since OCaml 3.10.0
ocamlfind 1.6.2 A library manager for OCaml
ocamlify 0.0.1 Include files in OCaml code
ocamlmod 0.0.8 Generate OCaml modules from source files
ocplib-endian 1.0 Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01.
plist 0.1 Create Apple Plists
ppx_core 113.33.03 Standard library for ppx rewriters
ppx_deriving 4.0 Type-driven code generation for OCaml >=4.02
ppx_deriving_yojson 3.0 JSON codec generator for OCaml >=4.02
ppx_driver 113.33.03 Feature-full driver for OCaml AST transformers
ppx_fields_conv 113.33.03 Generation of accessor and iteration functions for ocaml records
ppx_optcomp 113.33.03 Optional compilation for OCaml
ppx_sexp_conv 113.33.03 Generation of S-expression conversion functions from type definitions
ppx_tools 5.0+4.02.0 Tools for authors of ppx rewriters and other syntactic tools
ppx_type_conv 113.33.03 Support Library for type-driven code generators
re 1.6.1 RE is a regular expression library for OCaml
result 1.2 Compatibility Result module
sexplib 113.33.03 Library for serializing OCaml values to and from S-expressions
stringext 1.4.2 Extra string functions for OCaml
type_conv 113.00.02 Library for building type-driven syntax extensions
uri 1.9.2 RFC3986 URI/URL parsing library
uutf 0.9.4 Non-blocking streaming Unicode codec for OCaml
yojson 1.3.2 Yojson is an optimized parsing and printing library for the JSON format
from ocaml-usbmux.
@artful88533 Okay, that's super odd because here's my installation on a linux VM:
base-bigarray base Bigarray library distributed with the OCaml com
base-bytes base Bytes library distributed with the OCaml compil
base-ocamlbuild base OCamlbuild binary and libraries distributed wit
base-threads base Threads library distributed with the OCaml comp
base-unix base Unix library distributed with the OCaml compile
base64 2.0.0 Base64 encoding and decoding library
biniou 1.0.12 Binary data format designed for speed, safety,
camlp4 4.02+7 Camlp4 is a system for writing extensible parse
cmdliner 0.9.8 Declarative definition of command line interfac
cohttp 0.21.0 HTTP(S) library for Lwt, Async and Mirage
conduit 0.12.0 Network connection library for TCP and SSL
conf-m4 1 Virtual package relying on m4
conf-ncurses 1 Virtual package relying on ncurses
conf-pkg-config 1.0 Virtual package relying on pkg-config installat
conf-which 1 Virtual package relying on which
cppo 1.3.2 Equivalent of the C preprocessor for OCaml prog
cstruct 2.2.0 access C structures via a camlp4 extension
easy-format 1.2.0 High-level and functional interface to the Form
fieldslib 113.33.03 Syntax extension to define first class values r
ipaddr 2.7.0 IP (and MAC) address representation library
js-build-tools 113.33.04 Collection of tools to help building Jane Stree
lambdasoup 0.6 Easy functional HTML scraping and manipulation
lwt 2.5.2 A cooperative threads library for OCaml
magic-mime 1.0.0 Convert file extensions to MIME types
markup 0.7.2 Error-recovering functional HTML5 and XML parse
oasis 0.4.6 Architecture for building OCaml libraries and a
ocaml-data-notation 0.0.11 Store data using OCaml notation
ocamlbuild 0 Build system distributed with the OCaml compile
ocamlfind 1.6.2 A library manager for OCaml
ocamlify 0.0.1 Include files in OCaml code
ocamlmod 0.0.8 Generate OCaml modules from source files
ocplib-endian 1.0 Optimised functions to read and write int16/32/
plist 0.1 Create Apple Plists
ppx_core 113.33.03 Standard library for ppx rewriters
ppx_deriving 4.0 Type-driven code generation for OCaml >=4.02
ppx_deriving_yojson 3.0 JSON codec generator for OCaml >=4.02
ppx_driver 113.33.03 Feature-full driver for OCaml AST transformers
ppx_fields_conv 113.33.03 Generation of accessor and iteration functions
ppx_optcomp 113.33.03 Optional compilation for OCaml
ppx_sexp_conv 113.33.03 Generation of S-expression conversion functions
ppx_tools 5.0+4.02.0 Tools for authors of ppx rewriters and other sy
ppx_type_conv 113.33.03 Support Library for type-driven code generators
re 1.6.1 RE is a regular expression library for OCaml
result 1.2 Compatibility Result module
sexplib 113.33.03 Library for serializing OCaml values to and fro
stringext 1.4.2 Extra string functions for OCaml
type_conv 113.00.02 Library for building type-driven syntax extensi
uri 1.9.2 RFC3986 URI/URL parsing library
usbmux 1.3.2 (pinned) Control port remapping for iOS devices
uutf 0.9.4 Non-blocking streaming Unicode codec for OCaml
yojson 1.3.2 Yojson is an optimized parsing and printing lib
I am starting to suspect that this might have something to do with the root installation. Like maybe that one is using a different set of libraries? Not sure, looking around.
from ocaml-usbmux.
$ opam switch working -A 4.03.0
$ eval `opam config env`
$ opam install usbmux
usbmux.1.1.1 installed successfully
But I want build ocaml-usbmux from source. And make
not work.
from ocaml-usbmux.
wait, just to be clear, you're not supposed to invoke make
yourself. You're supposed to be using opam pin add usbmux . -y
in the directory.
from ocaml-usbmux.
To pin, do opam pin add usbmux https://github.com/fxfactorial/ocaml-usbmux.git
so opam
can detect that it is a Git repository.
from ocaml-usbmux.
oh doh!
from ocaml-usbmux.
#opam pin add usbmux https://github.com/fxfactorial/ocaml-usbmux.git
usbmux.1.3.2 installed successfully
What about install from source with make
? Still don't work.
from ocaml-usbmux.
if opam pin
works, that building from source should work as well (because that's what opam does). Can you post the command you use and your error message?
from ocaml-usbmux.
~/gandalf_src/ocaml-usbmux# ./configure
W: File src/lib/META has changed, doing a backup in src/lib/META.bak
Configuration:
ocamlfind: ........................................... /root/.opam/usbmux/bin/ocamlfind
ocamlc: .............................................. /root/.opam/usbmux/bin/ocamlc.opt
ocamlopt: ............................................ /root/.opam/usbmux/bin/ocamlopt.opt
ocamlbuild: .......................................... /root/.opam/usbmux/bin/ocamlbuild
Package name: ........................................ usbmux
Package version: ..................................... 1.3.1
os_type: ............................................. Unix
system: .............................................. linux
architecture: ........................................ amd64
ccomp_type: .......................................... cc
ocaml_version: ....................................... 4.02.3
standard_library_default: ............................ /root/.opam/usbmux/lib/ocaml
standard_library: .................................... /root/.opam/usbmux/lib/ocaml
standard_runtime: .................................... /root/.opam/usbmux/bin/ocamlrun
bytecomp_c_compiler: ................................. gcc -O -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -O -fPIC
native_c_compiler: ................................... gcc -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
model: ............................................... default
ext_obj: ............................................. .o
ext_asm: ............................................. .s
ext_lib: ............................................. .a
ext_dll: ............................................. .so
default_executable_name: ............................. a.out
systhread_supported: ................................. true
Install architecture-independent files dir: .......... /usr/local
Install architecture-dependent files in dir: ......... $prefix
User executables: .................................... $exec_prefix/bin
System admin executables: ............................ $exec_prefix/sbin
Program executables: ................................. $exec_prefix/libexec
Read-only single-machine data: ....................... $prefix/etc
Modifiable architecture-independent data: ............ $prefix/com
Modifiable single-machine data: ...................... $prefix/var
Object code libraries: ............................... $exec_prefix/lib
Read-only arch-independent data root: ................ $prefix/share
Read-only architecture-independent data: ............. $datarootdir
Info documentation: .................................. $datarootdir/info
Locale-dependent data: ............................... $datarootdir/locale
Man documentation: ................................... $datarootdir/man
Documentation root: .................................. $datarootdir/doc/$pkg_name
HTML documentation: .................................. $docdir
DVI documentation: ................................... $docdir
PDF documentation: ................................... $docdir
PS documentation: .................................... $docdir
findlib_version: ..................................... 1.6.2
is_native: ........................................... true
suffix_program: ......................................
Remove a file.: ...................................... rm -f
Remove a directory.: ................................. rm -rf
Turn ocaml debug flag on: ............................ true
Turn ocaml profile flag on: .......................... false
Compiler support generation of .cmxs.: ............... true
OCamlbuild additional flags: .........................
Create documentations: ............................... true
Compile tests executable and library and run them: ... false
ocamldoc: ............................................ /root/.opam/usbmux/bin/ocamldoc
pkg_lwt_unix: ........................................ /root/.opam/usbmux/lib/lwt
pkg_lwt_ppx: ......................................... /root/.opam/usbmux/lib/lwt
pkg_plist: ........................................... /root/.opam/usbmux/lib/plist
pkg_yojson: .......................................... /root/.opam/usbmux/lib/yojson
pkg_cohttp_lwt: ...................................... /root/.opam/usbmux/lib/cohttp
pkg_ppx_deriving_yojson: ............................. /root/.opam/usbmux/lib/ppx_deriving_yojson
pkg_lwt_preemptive: .................................. /root/.opam/usbmux/lib/lwt
pkg_threads: ......................................... /root/.opam/usbmux/lib/ocaml
pkg_cmdliner: ........................................ /root/.opam/usbmux/lib/cmdliner
and
~/gandalf_src/ocaml-usbmux# make
ocaml setup.ml -build
W: File src/lib/META has changed, doing a backup in src/lib/META.bak
Finished, 0 targets (0 cached) in 00:00:00.
+ /root/.opam/usbmux/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 plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
File "src/lib/usbmux.ml", line 260, characters 9-336:
Error: This expression has type
(Yojson.Safe.json Lazy.t * ([< `Error of string | `Ok of 'b ] as 'a))
list -> 'b list
but an expression was expected of type
(Yojson.Safe.json Lazy.t *
tunnel Ppx_deriving_yojson_runtime.error_or)
list -> 'c
Type 'a is not compatible with type
tunnel Ppx_deriving_yojson_runtime.error_or =
(tunnel, string) Result.result
Command exited with code 2.
Compilation unsuccessful after building 4 targets (3 cached) in 00:00:00.
E: Failure("Command ''/root/.opam/usbmux/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")
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 1
from ocaml-usbmux.
You performed these from a fresh Git clone?
from ocaml-usbmux.
The above error comes from compiling the tarball https://github.com/onlinemediagroup/ocaml-usbmux/releases — an new release should be made to cope with the latest yojson.
@fxfactorial You should add an upper bound on yojson
in OPAM for this release.
from ocaml-usbmux.
I use fresh gitclone:
git clone https://github.com/onlinemediagroup/ocaml-usbmux
from ocaml-usbmux.
Any news?
from ocaml-usbmux.
Did you issue eval
opam config env`` before compiling? What is the result of ocamlfind list |grep yo
?
/cc @fxfactorial
from ocaml-usbmux.
With
~/gandalf_src/ocaml-usbmux# eval `opam config env`
also not work
~/gandalf_src/ocaml-usbmux# ocamlfind list |grep yo
ppx_deriving_yojson (version: 3.0)
ppx_deriving_yojson.runtime (version: 3.0)
yojson (version: 1.3.2)
yojson.biniou (version: 1.3.2)
from ocaml-usbmux.
You have the right version of yoson
.
Can you display here a few lines before and after File "src/lib/usbmux.ml", line 260
?
from ocaml-usbmux.
~/gandalf_src/ocaml-usbmux# sed -n '260p' src/lib/usbmux.ml
|> List.map ~f:(function
from ocaml-usbmux.
Please paste some lines before and after (we need the context).
from ocaml-usbmux.
Yojson.(
(try Safe.from_string data
with Json_error s -> raise (Mapping_file_error s))
|> fun should_be_array ->
(try
Safe.Util.to_list should_be_array
with
| Safe.Util.Type_error (e, _) ->
let msg =
P.sprintf "Error: %s HINT: Be sure mapping file consists of \
a single JSON array of objects, see man page for examples" e
in
raise (Mapping_file_error msg))
|> List.map ~f:(fun record -> (lazy record, tunnel_of_yojson record))
|> List.map ~f:(function
| (_, `Ok tunnel) -> tunnel
| (need_it, `Error r) ->
let error_msg =
((Lazy.force need_it) |> Safe.pretty_to_string)
|> P.sprintf "Check this needed field: %s, Original Json: %s" r
in
raise (Mapping_file_error error_msg))
|> fun tunnels ->
from ocaml-usbmux.
Try removing ppx_deriving_yojson
?
from ocaml-usbmux.
Not work
~/gandalf_src/ocaml-usbmux# ocamlfind list |grep yo
yojson (version: 1.3.2)
yojson.biniou (version: 1.3.2)
from ocaml-usbmux.
If you remove setup.data
, then configure and build again?
from ocaml-usbmux.
When remove setup.data
./configure
with error
~/gandalf_src/ocaml-usbmux# rm setup.data
~/gandalf_src/ocaml-usbmux# rm setup.data
~/gandalf_src/ocaml-usbmux# ./configure
W: File src/lib/META has changed, doing a backup in src/lib/META.bak
ocamlfind: Package `ppx_deriving_yojson' not found
W: Field 'pkg_ppx_deriving_yojson' is not set: Command ''/root/.opam/usbmux/bin/ocamlfind' query -format %d ppx_deriving_yojson > '/tmp/oasis-907eea.txt'' terminated with error code 2
E: Cannot find findlib package ppx_deriving_yojson (>= 2.4)
E: Failure("1 configuration error")
from ocaml-usbmux.
OK — it was removed from my system because ppx_type_conv
conflicts with ppx_deriving
and I absolutely need the first one. You will have to reinstall it (sorry).
from ocaml-usbmux.
Maybe you want to reinstall the 4.03 compiler — opam switch reinstall 4.03.0
from ocaml-usbmux.
New problem)
~/gandalf_src/ocaml-usbmux# ./configure
W: File src/lib/META has changed, doing a backup in src/lib/META.bak
W: Field 'pkg_lwt_unix_version_ge_2_5_1' is not set: Cannot satisfy version constraint on pkg_lwt_unix: >= 2.5.1 (version: 2.4.5)
ocamlfind: Package `lwt.ppx' not found
W: Field 'pkg_lwt_ppx' is not set: Command ''/root/.opam/working/bin/ocamlfind' query -format %d lwt.ppx > '/tmp/oasis-d2e438.txt'' terminated with error code 2
ocamlfind: Package `cohttp.lwt' not found
W: Field 'pkg_cohttp_lwt' is not set: Command ''/root/.opam/working/bin/ocamlfind' query -format %d cohttp.lwt > '/tmp/oasis-6424ed.txt'' terminated with error code 2
E: Cannot find findlib package cohttp.lwt
E: Cannot find findlib package lwt.ppx
E: Cannot find findlib package lwt.unix (>= 2.5.1)
E: Failure("3 configuration errors")
~/gandalf_src/ocaml-usbmux# opam install lwt.ppx
[WARNING] Running as root is not recommended
[ERROR] No package matches lwt.ppx.
How fix it?
from ocaml-usbmux.
lwt.ppx
is an ocamlfind "package", not an opam one. The dot means (findlib) "subpackage", so lwt.ppx
is provided by lwt
. The easy way is to look to opam/opam
to know which (opam) packages to install.
from ocaml-usbmux.
Problem with 4.03 compiler.
~/gandalf_src/ocaml-usbmux# opam switch 4.02.3
~/gandalf_src/ocaml-usbmux# eval `opam config env`
After this ./configure
work fine, but make
still bad.
from ocaml-usbmux.
@artful88533 I got commit access back to this repo and was able to incorporate @Chris00 's fixes in a previous PR.
Prior to his changes I was getting the same error you got on a linux machine, can you try it again, pull master and then in that repo, opam pin add usbmux . -y
with a fresh switch and the eval
step for reproducibility.
Note that it won't work with 4.03.0 yet because of:janestreet-deprecated/ppx_type_conv#4 so use the 4.02.3
compiler.
from ocaml-usbmux.
Now, with make
install fine. Thanks!
from ocaml-usbmux.
@artful88533 yay!! Thank you so much for sticking through with me on this and all the thanks to @Chris00 for having such amazing patience as well.
@freemanlutsk wanna try again?
from ocaml-usbmux.
Related Issues (15)
- gandalf not found problem HOT 3
- "opam install usbmux" fails HOT 9
- gandalf: option `--mappings': no `etc/mapping' file
- I'm getting connection refused when I try to connect to gandalf with multiple mapping for a device HOT 2
- Brew install usbmux HOT 1
- getting broken pipe error and exiting
- Error: Please report: Unknown exception: Unix.Unix_error(Unix.EADDRINUSE, "bind", "")
- Installation error on opam install usbmux HOT 4
- Disconnect and re-connect device HOT 6
- Lwt lazy value exploding and causing early exit HOT 2
- listen on 0.0.0.0 HOT 24
- Wrong expression type HOT 4
- Only display post installation message on success HOT 2
- Opam fails to install base64(and usbmux) HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocaml-usbmux.