Cannot find -lhp on Ubuntu or other distributions
Closed this issue · 6 comments
Describe the bug
Possibly pilot error, but failing to complete "Build from source" instructions.
Reproducing
Assuming an appropriate Ubuntu 19.10 installation:
- Install opam (either via apt or from opam's repository using the make cold-install approach)
- opam init
- eval $(opam env)
- opam switch create 4.09.0 4.09.0
- eval $(opam env)
- sudo apt-get install pkg-config libpcre3-dev
- git clone https://github.com/comby-tools/comby
- cd comby && opam install . --deps-only -y
- eval $(opam env)
- make
Observe error output ending in:
/usr/bin/ld: cannot find -lhp
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
make: *** [Makefile:4: build] Error 1
See attached output below for more details.
Expected behavior
The make step completing without error.
Additional context
Output from make step should be attached.
For the version of opam installed via apt:
$ opam --version
2.0.5
After some searching I'm guessing that -lhp
refers to hack_parallel. Does that seem right?
I also tried installation on an Arch-derivative distribution with similar results.
Hey--thanks for the report. I ran into this but haven't had a chance to find out what changed to cause it. But yes, basically the static library for hack_parallel
(lhp
) isn't being picked up (it's not on the path) despite doing eval $(opam env)
on Ubuntu or others (AFAIK this doesn't happen on Mac). So this is something I still need to look into. For now, you can get around this by doing, e.g.:
eval $(opam env)
LIBRARY_PATH=$OPAM_SWITCH_PREFIX/lib/hack_parallel opam exec -- dune build
instead of make
. I'll keep this issue open until I've pinned down a better workaround.
Thanks!
The suggested work-around did it.
It's working well 👍
OK so it turns out that the static library is not being packaged in a way that dune (I think as of v2?) can pick it up. rvantonder/hack_parallel#14 will fix this.
Thanks for the heads up. Good to hear that a fix may be coming 👍
Should be fixed now when building from source, via 46bdbcf.
Unfortunately, I now get this:
$ make
dune build --profile dev
File "lib/language/omega_rule.ml", line 242, characters 4-11:
242 | | Ok rule -> Or_error.return rule
^^^^^^^
Error: This pattern matches values of type ('a, 'b) Stdlib.result
but a pattern was expected which matches values of type
consume:Consume.t -> (expression list, string) Stdlib.result
File "lib/rewriter/rewrite_template.ml", line 22, characters 4-12:
22 | | Ok label -> List.find_map label ~f:ident
^^^^^^^^
Error: This pattern matches values of type ('a, 'b) result
but a pattern was expected which matches values of type
consume:Consume.t -> (string option list, string) result
File "lib/matchers/omega.ml", line 333, characters 12-19:
333 | | Error _ ->
^^^^^^^
Error: This pattern matches values of type ('b, 'c) result
but a pattern was expected which matches values of type
consume:Consume.t -> (Omega.production * 'a, string) result
make: *** [Makefile:4: build] Error 1
I will file another issue.