diff --git a/.travis.yml b/.travis.yml index abaa9ca..f551302 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,5 +9,5 @@ install: - go get -u github.com/mattn/goveralls script: -- GO111MODULE="on" go test -v -tags static_rocksdb -coverprofile=coverage.out -- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci + - GO111MODULE="on" go test -v -tags builtin_static -coverprofile=coverage.out + - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci diff --git a/Makefile b/Makefile index 66de5ae..fd8dfe5 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,7 @@ DEST_LIB=$(DEST)/lib DEST_INCLUDE=$(DEST)/include MAKE_FLAGS = -j16 -CFLAGS += ${EXTRA_CFLAGS} -CXXFLAGS += ${EXTRA_CXXFLAGS} -LDFLAGS += $(EXTRA_LDFLAGS) MACHINE ?= $(shell uname -m) -ARFLAGS = ${EXTRA_ARFLAGS} rs STRIPFLAGS = -S -x # Dependencies and Rocksdb @@ -24,6 +20,13 @@ ZSTD_COMMIT = ed65210c9b6635e21e67e60138f86d04a071681f BZ2_COMMIT = 6a8690fc8d26c815e798c588f796eabe9d684cf0 ROCKSDB_COMMIT = d47cdbc1888440a75ecf43646fd1ddab8ebae9be +ROCKSDB_EXTRA_CXXFLAGS := +ifeq ($(GOOS), darwin) + ROCKSDB_EXTRA_CXXFLAGS += -fPIC -O2 -w -I$(DEST_INCLUDE) -DZLIB -DBZIP2 -DSNAPPY -DLZ4 -DZSTD +else + ROCKSDB_EXTRA_CXXFLAGS += -fPIC -O2 -Wno-error=shadow -I$(DEST_INCLUDE) -DZLIB -DBZIP2 -DSNAPPY -DLZ4 -DZSTD +endif + default: prepare zlib snappy bz2 lz4 zstd rocksdb .PHONY: prepare @@ -39,8 +42,6 @@ zlib: $(MAKE) clean && $(MAKE) $(MAKE_FLAGS) all cp libs/zlib/libz.a $(DEST_LIB)/ cp libs/zlib/*.h $(DEST_INCLUDE)/ - cp libs/zlib/libz.a /usr/local/lib/ - cp libs/zlib/*.h /usr/local/include/ .PHONY: snappy snappy: @@ -48,8 +49,9 @@ snappy: cd libs/snappy && git checkout $(SNAPPY_COMMIT) cd libs/snappy && rm -rf build && mkdir -p build && cd build && \ CFLAGS='-O2 ${EXTRA_CFLAGS}' cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. && \ - $(MAKE) clean && $(MAKE) $(MAKE_FLAGS) install + $(MAKE) clean && $(MAKE) $(MAKE_FLAGS) snappy cp libs/snappy/build/libsnappy.a $(DEST_LIB)/ + cp libs/snappy/build/*.h $(DEST_INCLUDE)/ cp libs/snappy/*.h $(DEST_INCLUDE)/ .PHONY: lz4 @@ -59,8 +61,6 @@ lz4: cd libs/lz4 && $(MAKE) clean && $(MAKE) $(MAKE_FLAGS) CFLAGS='-fPIC -O2 ${EXTRA_CFLAGS}' lz4 lz4-release cp libs/lz4/lib/liblz4.a $(DEST_LIB)/ cp libs/lz4/lib/*.h $(DEST_INCLUDE)/ - cp libs/lz4/lib/liblz4.a /usr/local/lib/ - cp libs/lz4/lib/*.h /usr/local/include/ .PHONY: zstd zstd: @@ -69,22 +69,22 @@ zstd: cd libs/zstd/lib && $(MAKE) clean && DESTDIR=. PREFIX= $(MAKE) $(MAKE_FLAGS) CFLAGS='-fPIC -O2 ${EXTRA_CFLAGS}' default install cp libs/zstd/lib/libzstd.a $(DEST_LIB)/ cp libs/zstd/lib/include/*.h $(DEST_INCLUDE)/ - cp libs/zstd/lib/libzstd.a /usr/local/lib/ - cp libs/zstd/lib/include/*.h /usr/local/include/ .PHONY: bz2 bz2: cd libs/bzip2 && $(MAKE) $(MAKEFLAGS) CFLAGS='-fPIC -O2 -g -D_FILE_OFFSET_BITS=64 ${EXTRA_CFLAGS}' AR='ar ${EXTRA_ARFLAGS}' bzip2 cp libs/bzip2/libbz2.a $(DEST_LIB)/ cp libs/bzip2/*.h $(DEST_INCLUDE)/ - cp libs/bzip2/libbz2.a /usr/local/lib/ - cp libs/bzip2/*.h /usr/local/include/ .PHONY: rocksdb rocksdb: git submodule update --remote --init --recursive -- libs/rocksdb cd libs/rocksdb && git checkout $(ROCKSDB_COMMIT) && $(MAKE) clean && \ - CXXFLAGS='-fPIC -O2 -Wno-error=shadow ${EXTRA_CXXFLAGS}' $(MAKE) $(MAKE_FLAGS) static_lib + $(MAKE) $(MAKE_FLAGS) EXTRA_CXXFLAGS='$(ROCKSDB_EXTRA_CXXFLAGS)' EXTRA_LDFLAGS='-L$(DEST_LIB)' static_lib cd libs/rocksdb && strip $(STRIPFLAGS) librocksdb.a cp libs/rocksdb/librocksdb.a $(DEST_LIB)/ cp -R libs/rocksdb/include/rocksdb $(DEST_INCLUDE)/ + +.PHONY: test +test: + go test -v -count=1 -tags builtin_static diff --git a/README.md b/README.md index be7e9a0..784f729 100644 --- a/README.md +++ b/README.md @@ -15,47 +15,44 @@ convention of how/when to free c-mem, thus break the rule of [tecbot/gorocksdb]( ## Install -### Default (Linux, Mac OS) +### Default - Builtin Static (Linux, Mac OS) -`grocksdb` contains built static version of `Rocksdb`. You have to do nothing on your machine. Just install it like other go libraries: +`grocksdb` contains built static version of `Rocksdb` with: +- gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) +- Apple clang version 11.0.0 (clang-1100.0.33.8). + +You have to do nothing on your machine. Just install it like other go libraries: ```bash go get -u github.com/linxGnu/grocksdb -# Build your project with `static_rocksdb` tags: -go build -tags static_rocksdb +# Build your project with `builtin_static` tags: +go build -tags builtin_static ``` ### Static lib (Linux, Mac OS) -If you don't trust my built-ready static version, you could build your own: - -#### For CentOS: - -```bash -sh build_centos.sh -``` - -#### Others: +If you don't trust my builtin/want to build with your compiler/env: ##### Prerequisite - cmake 3.11+ - make -- For linking purpose: - - libsnappy-dev/snappy-devel - - zlib1g-dev/zlib-devel - - libbz2-dev/bzip2-devel - - liblz4-dev/lz4-devel ##### Build Make sure to install libraries for linking before making targets. ```bash +# You could find `Makefile` at root of repository + # build static libs make +``` -# On success, you could remove above linked libraries safely +Then, build your project with tags (same as above): + +``` +go build -tags builtin_static ``` ### Shared lib diff --git a/build_centos.sh b/build_centos.sh deleted file mode 100644 index 165bb03..0000000 --- a/build_centos.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# update sys -yum update -y - -# install tool -yum install -y gcc gcc-c++ git pkg-config make which - -# install temporary build tool -yum install -y cmake - -# build rocksdb -make - -# remove temporary build tool -yum remove -y cmake diff --git a/staticflag_darwin_amd64.go b/builtin_static_darwin_amd64.go similarity index 91% rename from staticflag_darwin_amd64.go rename to builtin_static_darwin_amd64.go index 87a5c41..46fba8c 100644 --- a/staticflag_darwin_amd64.go +++ b/builtin_static_darwin_amd64.go @@ -1,4 +1,4 @@ -// +build static_rocksdb +// +build builtin_static package grocksdb diff --git a/staticflag_linux_amd64.go b/builtin_static_linux_amd64.go similarity index 90% rename from staticflag_linux_amd64.go rename to builtin_static_linux_amd64.go index ef5d22e..288b711 100644 --- a/staticflag_linux_amd64.go +++ b/builtin_static_linux_amd64.go @@ -1,4 +1,4 @@ -// +build static_rocksdb +// +build builtin_static package grocksdb diff --git a/dist/darwin_amd64/include/config.h b/dist/darwin_amd64/include/config.h new file mode 100644 index 0000000..6c303b6 --- /dev/null +++ b/dist/darwin_amd64/include/config.h @@ -0,0 +1,62 @@ +#ifndef THIRD_PARTY_SNAPPY_OPENSOURCE_CMAKE_CONFIG_H_ +#define THIRD_PARTY_SNAPPY_OPENSOURCE_CMAKE_CONFIG_H_ + +/* Define to 1 if the compiler supports __builtin_ctz and friends. */ +#define HAVE_BUILTIN_CTZ 1 + +/* Define to 1 if the compiler supports __builtin_expect. */ +#define HAVE_BUILTIN_EXPECT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have a definition for mmap() in . */ +#define HAVE_FUNC_MMAP 1 + +/* Define to 1 if you have a definition for sysconf() in . */ +#define HAVE_FUNC_SYSCONF 1 + +/* Define to 1 to use the gflags package for command-line parsing. */ +/* #undef HAVE_GFLAGS */ + +/* Define to 1 if you have Google Test. */ +/* #undef HAVE_GTEST */ + +/* Define to 1 if you have the `lzo2' library (-llzo2). */ +/* #undef HAVE_LIBLZO2 */ + +/* Define to 1 if you have the `z' library (-lz). */ +#define HAVE_LIBZ 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_ENDIAN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you target processors with SSSE3+ and have . */ +#define SNAPPY_HAVE_SSSE3 1 + +/* Define to 1 if you target processors with BMI2+ and have . */ +#define SNAPPY_HAVE_BMI2 0 + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef SNAPPY_IS_BIG_ENDIAN */ + +#endif // THIRD_PARTY_SNAPPY_OPENSOURCE_CMAKE_CONFIG_H_ diff --git a/dist/darwin_amd64/include/snappy-stubs-public.h b/dist/darwin_amd64/include/snappy-stubs-public.h new file mode 100644 index 0000000..43cdb66 --- /dev/null +++ b/dist/darwin_amd64/include/snappy-stubs-public.h @@ -0,0 +1,74 @@ +// Copyright 2011 Google Inc. All Rights Reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Various type stubs for the open-source version of Snappy. +// +// This file cannot include config.h, as it is included from snappy.h, +// which is a public header. Instead, snappy-stubs-public.h is generated by +// from snappy-stubs-public.h.in at configure time. + +#ifndef THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_ +#define THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_ + +#include +#include +#include + +#if 1 // HAVE_SYS_UIO_H +#include +#endif // HAVE_SYS_UIO_H + +#define SNAPPY_MAJOR 1 +#define SNAPPY_MINOR 1 +#define SNAPPY_PATCHLEVEL 7 +#define SNAPPY_VERSION \ + ((SNAPPY_MAJOR << 16) | (SNAPPY_MINOR << 8) | SNAPPY_PATCHLEVEL) + +namespace snappy { + +using int8 = std::int8_t; +using uint8 = std::uint8_t; +using int16 = std::int16_t; +using uint16 = std::uint16_t; +using int32 = std::int32_t; +using uint32 = std::uint32_t; +using int64 = std::int64_t; +using uint64 = std::uint64_t; + +#if !1 // !HAVE_SYS_UIO_H +// Windows does not have an iovec type, yet the concept is universally useful. +// It is simple to define it ourselves, so we put it inside our own namespace. +struct iovec { + void* iov_base; + size_t iov_len; +}; +#endif // !HAVE_SYS_UIO_H + +} // namespace snappy + +#endif // THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_ diff --git a/dist/darwin_amd64/lib/libbz2.a b/dist/darwin_amd64/lib/libbz2.a index 6a6b9ba..8e9710d 100644 Binary files a/dist/darwin_amd64/lib/libbz2.a and b/dist/darwin_amd64/lib/libbz2.a differ diff --git a/dist/darwin_amd64/lib/liblz4.a b/dist/darwin_amd64/lib/liblz4.a index 1662588..bf91814 100644 Binary files a/dist/darwin_amd64/lib/liblz4.a and b/dist/darwin_amd64/lib/liblz4.a differ diff --git a/dist/darwin_amd64/lib/librocksdb.a b/dist/darwin_amd64/lib/librocksdb.a index f58068b..47ff900 100644 Binary files a/dist/darwin_amd64/lib/librocksdb.a and b/dist/darwin_amd64/lib/librocksdb.a differ diff --git a/dist/darwin_amd64/lib/libsnappy.a b/dist/darwin_amd64/lib/libsnappy.a index eaf949d..a4338bb 100644 Binary files a/dist/darwin_amd64/lib/libsnappy.a and b/dist/darwin_amd64/lib/libsnappy.a differ diff --git a/dist/darwin_amd64/lib/libz.a b/dist/darwin_amd64/lib/libz.a index 1c54ace..35c17cd 100644 Binary files a/dist/darwin_amd64/lib/libz.a and b/dist/darwin_amd64/lib/libz.a differ diff --git a/dist/darwin_amd64/lib/libzstd.a b/dist/darwin_amd64/lib/libzstd.a index d7abd7b..a626236 100644 Binary files a/dist/darwin_amd64/lib/libzstd.a and b/dist/darwin_amd64/lib/libzstd.a differ diff --git a/dist/linux_amd64/include/config.h b/dist/linux_amd64/include/config.h new file mode 100644 index 0000000..f1a066f --- /dev/null +++ b/dist/linux_amd64/include/config.h @@ -0,0 +1,62 @@ +#ifndef THIRD_PARTY_SNAPPY_OPENSOURCE_CMAKE_CONFIG_H_ +#define THIRD_PARTY_SNAPPY_OPENSOURCE_CMAKE_CONFIG_H_ + +/* Define to 1 if the compiler supports __builtin_ctz and friends. */ +#define HAVE_BUILTIN_CTZ 1 + +/* Define to 1 if the compiler supports __builtin_expect. */ +#define HAVE_BUILTIN_EXPECT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_BYTESWAP_H 1 + +/* Define to 1 if you have a definition for mmap() in . */ +#define HAVE_FUNC_MMAP 1 + +/* Define to 1 if you have a definition for sysconf() in . */ +#define HAVE_FUNC_SYSCONF 1 + +/* Define to 1 to use the gflags package for command-line parsing. */ +/* #undef HAVE_GFLAGS */ + +/* Define to 1 if you have Google Test. */ +/* #undef HAVE_GTEST */ + +/* Define to 1 if you have the `lzo2' library (-llzo2). */ +/* #undef HAVE_LIBLZO2 */ + +/* Define to 1 if you have the `z' library (-lz). */ +/* #undef HAVE_LIBZ */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_ENDIAN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you target processors with SSSE3+ and have . */ +#define SNAPPY_HAVE_SSSE3 0 + +/* Define to 1 if you target processors with BMI2+ and have . */ +#define SNAPPY_HAVE_BMI2 0 + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef SNAPPY_IS_BIG_ENDIAN */ + +#endif // THIRD_PARTY_SNAPPY_OPENSOURCE_CMAKE_CONFIG_H_ diff --git a/dist/linux_amd64/include/snappy-stubs-public.h b/dist/linux_amd64/include/snappy-stubs-public.h new file mode 100644 index 0000000..43cdb66 --- /dev/null +++ b/dist/linux_amd64/include/snappy-stubs-public.h @@ -0,0 +1,74 @@ +// Copyright 2011 Google Inc. All Rights Reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Various type stubs for the open-source version of Snappy. +// +// This file cannot include config.h, as it is included from snappy.h, +// which is a public header. Instead, snappy-stubs-public.h is generated by +// from snappy-stubs-public.h.in at configure time. + +#ifndef THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_ +#define THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_ + +#include +#include +#include + +#if 1 // HAVE_SYS_UIO_H +#include +#endif // HAVE_SYS_UIO_H + +#define SNAPPY_MAJOR 1 +#define SNAPPY_MINOR 1 +#define SNAPPY_PATCHLEVEL 7 +#define SNAPPY_VERSION \ + ((SNAPPY_MAJOR << 16) | (SNAPPY_MINOR << 8) | SNAPPY_PATCHLEVEL) + +namespace snappy { + +using int8 = std::int8_t; +using uint8 = std::uint8_t; +using int16 = std::int16_t; +using uint16 = std::uint16_t; +using int32 = std::int32_t; +using uint32 = std::uint32_t; +using int64 = std::int64_t; +using uint64 = std::uint64_t; + +#if !1 // !HAVE_SYS_UIO_H +// Windows does not have an iovec type, yet the concept is universally useful. +// It is simple to define it ourselves, so we put it inside our own namespace. +struct iovec { + void* iov_base; + size_t iov_len; +}; +#endif // !HAVE_SYS_UIO_H + +} // namespace snappy + +#endif // THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_PUBLIC_H_ diff --git a/dist/linux_amd64/lib/libbz2.a b/dist/linux_amd64/lib/libbz2.a index 59a6f4f..5544213 100644 Binary files a/dist/linux_amd64/lib/libbz2.a and b/dist/linux_amd64/lib/libbz2.a differ diff --git a/dist/linux_amd64/lib/liblz4.a b/dist/linux_amd64/lib/liblz4.a index 5ad9760..10ea557 100644 Binary files a/dist/linux_amd64/lib/liblz4.a and b/dist/linux_amd64/lib/liblz4.a differ diff --git a/dist/linux_amd64/lib/librocksdb.a b/dist/linux_amd64/lib/librocksdb.a index 5eb9cc4..fef6e2a 100644 Binary files a/dist/linux_amd64/lib/librocksdb.a and b/dist/linux_amd64/lib/librocksdb.a differ diff --git a/dist/linux_amd64/lib/libsnappy.a b/dist/linux_amd64/lib/libsnappy.a index 3c28328..66be9de 100644 Binary files a/dist/linux_amd64/lib/libsnappy.a and b/dist/linux_amd64/lib/libsnappy.a differ diff --git a/dist/linux_amd64/lib/libz.a b/dist/linux_amd64/lib/libz.a index 783c073..c0d9480 100644 Binary files a/dist/linux_amd64/lib/libz.a and b/dist/linux_amd64/lib/libz.a differ diff --git a/dist/linux_amd64/lib/libzstd.a b/dist/linux_amd64/lib/libzstd.a index f246736..548b4cd 100644 Binary files a/dist/linux_amd64/lib/libzstd.a and b/dist/linux_amd64/lib/libzstd.a differ diff --git a/static.go b/static.go new file mode 100644 index 0000000..e9a11bb --- /dev/null +++ b/static.go @@ -0,0 +1,6 @@ +// +build static + +package grocksdb + +// #cgo LDFLAGS: -lrocksdb -lstdc++ -lm -ldl -lzstd -llz4 -lz -lsnappy -lbz2 +import "C"