tecbot / gorocksdb

gorocksdb is a Go wrapper for RocksDB
http://rocksdb.org
MIT License
937 stars 269 forks source link

Failed to build in go1.12 #193

Closed 201341 closed 4 years ago

201341 commented 4 years ago

I build gorocksdb through the command go build, but it gives me the error

# github.com/gorocksdb
./backup.go:112:2: could not determine kind of name for C.rocksdb_backup_engine_create_new_backup_flush
FAIL    github.com/gorocksdb [build failed]

I'm new to this repo, and can't figure it out, Would you give some advice on that? and my go env as follows

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GOPROXY="https://goproxy.cn"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-I/usr/local/rocksdb/include"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-L/usr/local/rocksdb/lib -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build013863011=/tmp/go-build -gno-record-gcc-switches"

By the way, I build the rocksdb5.17.2 through the command make shared_lib.

201341 commented 4 years ago

solve it.

singhguri commented 4 years ago

Hey Everyone, I am facing the same issue. Please help me in solving it. Its really important.

arlottang commented 3 years ago

solve it. How was this problem solved?

LikeTheWindGone commented 4 months ago

could you provide more details about how to solve it? thanks