ocaml-leveldb
ocaml-leveldb copied to clipboard
Cannot install it on mac
Hi I cannot install ocaml-leveldb on any of my macs (version 10.15.6). Error: "The packages you requested declare the following system dependencies. Please make sure they are installed before retrying: leveldb"
I have installed leveldb. I am using it with success with Rust for example. So it is not the issue of missing leveldb lib.
Best,
Michal
@the-man-with-a-golden-mind, with the latest version (published on opam) it should work, can you confirm ?
@mfp I believe this can be closed.
I think I am having this problem too. Leveldb is installed with brew install leveldb --build-from-source
building successfully. I'm not sure where that exactly puts the files but I found some in /opt/homebrew/lib (maybe this is a red herring):
$ ls /opt/homebrew/lib | grep level
libleveldb.1.23.0.dylib
libleveldb.1.dylib
libleveldb.a
libleveldb.dylib
Then opam install leveldb
fails with:
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build conf-leveldb 1
ββ
βΆβ No changes have been performed
The packages you requested declare the following system dependencies. Please make sure they are installed before retrying:
leveldb
I also tried cloning this repository and running opam pin leveldb .
within it but got the same error. Also tried adding various paths to the LD_LIBRARY_PATH without success.
I'm on an M1 mac, not sure if that is relevant.
Thanks for any help!
If you clone this repository and then run dune build @all && dune install
doest it work ?
The opam error comes from the conf-leveldb package which is probably not looking in the correct place.
EDIT: I mentioned you in an opam issue which seems related and will probably help you.
Nope :/ It fails with the following:
$ dune build @all && dune install
cc src/leveldb_stubs.o (exit 1)
(cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -g -I /Users/charleschamberlain/.opam/default/lib/ocaml -I /Users/charleschamberlain/.opam/default/lib/ocaml/threads -o leveldb_stubs.o -c leveldb_stubs.cc)
leveldb_stubs.cc:20:10: fatal error: 'leveldb/db.h' file not found
#include <leveldb/db.h>
^~~~~~~~~~~~~~
1 error generated.
Edit: Ah just saw your edit β sounds great, thanks!
Related: https://github.com/ocaml/opam-repository/issues/18167#issuecomment-885459238