diff --git a/c-deps/builddeps.sh b/c-deps/builddeps.sh new file mode 100755 index 000000000..5f4ac809e --- /dev/null +++ b/c-deps/builddeps.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +cd rocksdb +DEBUG_LEVEL=0 +PORTABLE=1 + +for lib in libbz2.a liblz4.a librocksdb.a libsnappy.a libz.a libzstd.a; do + make $lib +done +strip *.a +cd .. + + diff --git a/rocksdb/db.go b/rocksdb/db.go index 29b1356b4..0008b8b2c 100644 --- a/rocksdb/db.go +++ b/rocksdb/db.go @@ -17,7 +17,7 @@ package rocksdb // #cgo LDFLAGS: -L../c-deps/rocksdb/ -// #cgo LDFLAGS: -lrocksdb +// #cgo LDFLAGS: -l:librocksdb.a -l:libstdc++.a -l:libz.a -l:libbz2.a -l:libsnappy.a -l:libzstd.a -lm // #include "../c-deps/rocksdb/include/rocksdb/c.h" // #include import "C" diff --git a/rocksdb/options.go b/rocksdb/options.go index 396498879..ed2ab8116 100644 --- a/rocksdb/options.go +++ b/rocksdb/options.go @@ -17,7 +17,7 @@ package rocksdb // #cgo LDFLAGS: -L../c-deps/rocksdb/ -// #cgo LDFLAGS: -lrocksdb +// #cgo LDFLAGS: -l:librocksdb.a -l:libstdc++.a -l:libz.a -l:libbz2.a -l:libsnappy.a -l:libzstd.a -lm // #include "../c-deps/rocksdb/include/rocksdb/c.h" import "C"