xguerin / bitstring

OCaml Bitstring - bitstring matching for OCaml
GNU General Public License v2.0
65 stars 8 forks source link

ppx_bitstring install fails due to zstd version mismatch #33

Open buggymcbugfix opened 5 months ago

buggymcbugfix commented 5 months ago

My installation of ppx_bitstring on macOS 14.2.1 is failing due to

# ld: warning: search path '/opt/homebrew/Cellar/zstd/1.5.2/lib' not found
# ld: library 'zstd' not found

(Full output below)

My installed version of zstd is 1.5.5:

$ ls /opt/homebrew/Cellar/zstd/1.5.5/lib 
cmake               libzstd.1.dylib     libzstd.dylib
libzstd.1.5.5.dylib libzstd.a           pkgconfig

Where does the dependency on zstd come from? Is it possible/resonable to install ppx_bitstring with this newer version of the library?

Appendix:

$ opam install ppx_bitstring
Constructing initial basis...
Number of 0-1 knapsack inequalities = 2998
Constructing conflict graph...
Conflict graph has 945 + 493 = 1438 vertices
The following actions will be performed:
  βˆ— install ppx_bitstring 4.1.0

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
⬇ retrieved ppx_bitstring.4.1.0  (cached)
[ERROR] The compilation of ppx_bitstring.4.1.0 failed at "dune build -p ppx_bitstring -j 7 @install".

#=== ERROR while compiling ppx_bitstring.4.1.0 ================================#
# context     2.1.5 | macos/arm64 | ocaml-base-compiler.5.1.1 | https://opam.ocaml.org#fa77046c
# path        ~/.opam/5.1.1/.opam-switch/build/ppx_bitstring.4.1.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ppx_bitstring -j 7 @install
# exit-code   1
# env-file    ~/.opam/log/ppx_bitstring-38979-0e195f.env
# output-file ~/.opam/log/ppx_bitstring-38979-0e195f.out
### output ###
# [...]
# (cd _build/default && /Users/vl200/.opam/5.1.1/bin/ocamlopt.opt -g -w -24 -o .ppx/0224ad3443a846e54f1637fccb074e7d/ppx.exe /Users/vl200/.opam/5.1.1/lib/ocaml/compiler-libs/ocamlcommon.cmxa /Users/vl200/.opam/5.1.1/lib/ocaml-compiler-libs/common/ocaml_common.cmxa /Users/vl200/.opam/5.1.1/lib/ppxlib/astlib/astlib.cmxa /Users/vl200/.opam/5.1.1/lib/stdlib-shims/stdlib_shims.cmxa /Users/vl200/.opa[...]
# ld: warning: search path '/opt/homebrew/Cellar/zstd/1.5.2/lib' not found
# ld: library 'zstd' not found
# clang: error: linker command failed with exit code 1 (use -v to see invocation)
# File "caml_startup", line 1:
# Error: Error during linking (exit code 1)
# -> required by _build/default/.ppx/0224ad3443a846e54f1637fccb074e7d/ppx.exe
# -> required by _build/default/ppx/ppx_bitstring.pp.ml
# -> required by _build/default/ppx/.ppx_bitstring.objs/byte/ppx_bitstring.cmi
# -> required by _build/install/default/lib/ppx_bitstring/ppx_bitstring.cmi
# -> required by _build/default/ppx_bitstring.install
# -> required by alias install

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
β”Œβ”€ The following actions failed
β”‚ Ξ» build ppx_bitstring 4.1.0
└─ 
╢─ No changes have been performed
buggymcbugfix commented 5 months ago

PS: For now ln -s /opt/homebrew/Cellar/zstd/1.5.5 /opt/homebrew/Cellar/zstd/1.5.2 allowed me to complete the installation (not sure if this breaks anything though).

xguerin commented 5 months ago

zstd is not a direct dependency of bitstring. It could be a dependency of a dependency. I'll investigate.