GithubHelp home page GithubHelp logo

ocaml-leveldb's People

Contributors

bvaugon avatar chambart avatar julian1 avatar mfp avatar pveber avatar vbmithr avatar zapashcanon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ocaml-leveldb's Issues

Error installing from opam

Hi,

I am not sure if that's something that should be filed to the OPAM guys, but currently it's impossible to install ocaml-leveldb from opam. This is the error I am getting:

=-=-= Installing leveldb.1.0.2 =-=-=
default    Downloading https://opam.ocaml.org/archives/leveldb.1.0.2+opam.tar.gz
Downloading https://opam.ocaml.org/archives/leveldb.1.0.2+opam.tar.gz
Applying link_against_extra_libs.patch.
Building leveldb.1.0.2:
  omake -j9
  omake install prefix=/Users/sergi/.opam/4.01.0dev+trunk
[ERROR] The compilation of leveldb.1.0.2 failed.
Removing leveldb.1.0.2.
  ocamlfind remove leveldb


===== ERROR while installing leveldb.1.0.2 =====
# opam-version 1.1.1
# os           darwin
# command      omake -j9
# path         /Users/sergi/.opam/4.01.0dev+trunk/build/leveldb.1.0.2
# compiler     4.01.0dev+trunk
# exit-code    1
# env-file     /Users/sergi/.opam/4.01.0dev+trunk/build/leveldb.1.0.2/leveldb-12555-2dea01.env
# stdout-file  /Users/sergi/.opam/4.01.0dev+trunk/build/leveldb.1.0.2/leveldb-12555-2dea01.out
# stderr-file  /Users/sergi/.opam/4.01.0dev+trunk/build/leveldb.1.0.2/leveldb-12555-2dea01.err
### stdout ###
# ...[truncated]
# --- Checking for ocamlopt.opt... (found /Users/sergi/.opam/4.01.0dev+trunk/bin/ocamlopt.opt)
# --- Checking whether ocamlc understands the "z" warnings... (yes)
# *** omake: finished reading OMakefiles (0.09 sec)
# --- Checking for gcc... (found /usr/bin/gcc)
# --- Checking for g++... (found /usr/bin/g++)
# --- Checking if ocamldep understands -modules... (yes)
# - scan src leveldb_stubs.o
# + g++ -I. -MM leveldb_stubs.cc
# *** omake: 36/61 targets are up to date
# *** omake: failed (0.31 sec, 6/6 scans, 4/4 rules, 24/129 digests)
### stderr ###
# leveldb_stubs.cc:26:10: fatal error: 'caml/mlvalues.h' file not found
# #include <caml/mlvalues.h>
#          ^
#1 error generated.
# *** omake: targets were not rebuilt because of errors:
#    <scanner src/leveldb_stubs.o>
#       depends on: src/leveldb_stubs.cc

Thanks a lot.

Bytes / string issues with OCaml 4.06.1

I tried to install leveldb via OPAM for OCaml 4.06.1. In OPAM, the leveldb version is 1.1.2.

There are compilation errors that appear to be type mismatches between the bytes and string types in several places.

I started to patch these by hand, changing everything to bytes, not sure if that will work.

I compiled leveldb 1.2 by hand with OCaml 4.06.1, that works fine. So probably the fix is just to update the OPAM package.

More general key-val?

Since LevelDB says that โ€Keys and values are arbitrary byte arrays.โ€, I was wondering whether general (marshallable) values are possible. The idea is to have a functor to "generate" the type specialized functions:

module Make : functor (T : sig type key type value end) -> sig
  type db
  ...
  val get : db -> T.key -> T.value option
  ...
end

(The db type is not shared between generated modules to avoid calling different get function on it.)

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

Missing dependency: "Reference to undefined global `Thread'`"

ubuntu@ip-172-30-1-130:~$ ocaml
        OCaml version 4.04.2

Findlib has been successfully loaded. Additional directives:
<snip>
# #require "leveldb";;
/home/ubuntu/.opam/tezos/lib/leveldb: added to search path
# #require "leveldb";;os/lib/leveldb/leveldb.cma: loaded
Error: Reference to undefined global `Thread'
# 

ubuntu@ip-172-30-1-130:~$ cat .ocamlinit
(* Added by OPAM. *)
let () =
  try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
  with Not_found -> ()
;;

(* ## added by OPAM user-setup for ocamltop / base ## 3ec62baf6f9c219ae06d9814069da862 ## you can edit, but keep this line *)
#use "topfind";;
(* ## end of OPAM user-setup addition for ocamltop / base ## keep this line *)

Error during linking

ocaml pkg/build.ml native=true native-dynlink=true
ocamlfind ocamlopt -linkpkg -g -thread -package core -package leveldb -package scid lib/tick.cmx src/ldb_browser.cmx -o src/ldb_browser.native
+ ocamlfind ocamlopt -linkpkg -g -thread -package core -package leveldb -package scid lib/tick.cmx src/ldb_browser.cmx -o src/ldb_browser.native
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o): In function `ldb_open_native':
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:329: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:330: undefined reference to `leveldb::Status::ToString() const'
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o): In function `ldb_destroy':
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:357: undefined reference to `leveldb::DestroyDB(std::string const&, leveldb::Options const&)'
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o): In function `ldb_repair':
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:368: undefined reference to `leveldb::RepairDB(std::string const&, leveldb::Options const&)'
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o): In function `ldb_get':
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:409: undefined reference to `leveldb::Status::ToString() const'
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o): In function `ldb_put':
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:436: undefined reference to `leveldb::Status::ToString() const'
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o): In function `ldb_delete':
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:461: undefined reference to `leveldb::Status::ToString() const'
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o): In function `ldb_mem':
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:486: undefined reference to `leveldb::Status::ToString() const'
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o): In function `ldb_it_key_unsafe':
/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:623: undefined reference to `leveldb::Status::ToString() const'
/home/vb/.opam/4.02.3/lib/leveldb/libcamlleveldb.a(leveldb_stubs.o):/home/vb/.opam/4.02.3/build/leveldb.1.1.0/src/leveldb_stubs.c:646: more undefined references to `leveldb::Status::ToString() const' follow
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking

compilation error

Hi,
Thanks for this project first of all. I have a compilation issue:

*** omake: reading OMakefiles
*** omake: finished reading OMakefiles (0.02 sec)

  • build src leveldb_stubs.o
  • ocamlc -cc g++ -ccopt -g -ccopt -Wall -ccopt -O2 -ccopt -fPIC -ccopt -pthread -c leveldb_stubs.c
    leveldb_stubs.c:20:24: fatal error: leveldb/db.h : No such file or directory
    compilation ended
    *** omake: 29/71 targets are up to date
    *** omake: failed (0.07 sec, 0/1 scans, 1/1 rules, 0/106 digests)
    *** omake: targets were not rebuilt because of errors:
    src/leveldb_stubs.o
    depends on: src/leveldb_stubs.c
    depends on: src/leveldb_stubs.cc

The dependencies mentioned here are obviously satisfied, and I have installed all 4 requirements.

bigstring support

Would be nice to have this code functorized over either bytes / bigstrings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.