tecbot / gorocksdb

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

could not determine kind of name for C.* #222

Closed giskook closed 2 years ago

giskook commented 2 years ago

Hi, I use gorocksdb, but now It can not compile success. My env:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:           18.04
Codename:      bionic
Rocksdb:          6.27.3
Go:            go1.17.6
gorocksdb:       1.2.0

Rocksdb related:

lib:          /usr/lib
include: /usr/include/rocksdb/
version: /usr/include/rocksdb/version.h
#define ROCKSDB_MAJOR 6
#define ROCKSDB_MINOR 27
#define ROCKSDB_PATCH 3

How to reproduce the bug:

run below code in terminal

CGO_CFLAGS="-I/usr/include/" \
CGO_LDFLAGS="-L/usr/lib/ -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd" \
go get github.com/cosmos/gorocksdb

then I got the error:

# github.com/cosmos/gorocksdb
/root/go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/transactiondb.go:257:17: could not determine kind of name for C.rocksdb_optimistictransactiondb_checkpoint_object_create
/root/go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/transactiondb.go:210:12: could not determine kind of name for C.rocksdb_optimistictransactiondb_property_value
/root/go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/transactiondb.go:238:2: could not determine kind of name for C.rocksdb_optimistictransactiondb_write
/root/go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/transactiondb.go:61:12: could not determine kind of name for C.rocksdb_transactiondb_property_value

Am I missing something?I expect the correct result. and how can I help?

lexyblazy commented 1 year ago

Hi @giskook , please how did you solve this problem.

I have been stuck here for days. Any help/pointers will be gladly appreciated. Thanks.