anmonteiro / piaf

Web library for OCaml with support for HTTP/1.X / HTTP/2
BSD 3-Clause "New" or "Revised" License
192 stars 21 forks source link

Getting Unbound Module errors when building the binaries #59

Closed jplew closed 4 years ago

jplew commented 4 years ago

Hi there, how do I build the binaries? I cloned the repo and tried some dune build commands, but ended up having to opam install a ton of dependencies. I'm on Mac so I had to brew install pkg-config too. After that I'm still getting these errors:

$ dune build bin/carl.exe
File "lib/openssl.ml", line 72, characters 28-55:
72 |   let verify_error_string = Ssl.get_verify_error_string verify_result in
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound value Ssl.get_verify_error_string
File "lib/piaf.mli", line 539, characters 7-36:
539 |     -> Httpaf_lwt_unix.Server.socket
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound type constructor Httpaf_lwt_unix.Server.socket
File "lib/http1.ml", line 59, characters 21-38:
59 |     (Httpaf_client : Httpaf_lwt.Client)
                          ^^^^^^^^^^^^^^^^^
Error: Unbound module Httpaf_lwt
jplew commented 4 years ago

the solution was to run opam pin . -d. This pins the dependencies based on the piaf.opam file.