use dynamic linking instead of dlopen on all Linux distros

- also document the need for "librocksdb-dev" on Debian
This commit is contained in:
Ștefan Talpalaru 2018-12-25 11:56:20 +01:00 committed by zah
parent d8cfc392bc
commit 3c0ab43e1e
2 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,10 @@ A Nim wrapper for [Facebook's RocksDB](https://github.com/facebook/rocksdb), a p
Nim-RocksDB currently provides a wrapper for the low-level functions of RocksDB Nim-RocksDB currently provides a wrapper for the low-level functions of RocksDB
## Requirements
A RocksDB installation that provides `librocksdb.so`. This means that on Debian, and possibly on other Linux distros, you need "librocksdb-dev", not just a versioned "librocksdbX.Y" package that only provides `librocksdb.so.X.Y.Z`.
## Usage ## Usage
See [simple_example](examples/simple_example.nim) See [simple_example](examples/simple_example.nim)

View File

@ -47,9 +47,7 @@ else:
proc shouldUseNativeLinking(): bool {.compileTime.} = proc shouldUseNativeLinking(): bool {.compileTime.} =
when defined(linux): when defined(linux):
let uname = staticExec("uname -a") return true
if uname.find("ARCH") != -1: # Arch linux
return true
template rocksType(T) = template rocksType(T) =
type T* = distinct pointer type T* = distinct pointer