cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.08k stars 3.5k forks source link

Rocksdb: Cosmos SDK 0.46 & 0.47 doesn't build #15421

Closed robert-zaremba closed 10 months ago

robert-zaremba commented 1 year ago

Version

go: 1.19 Rocksdb 7.9 Cosmos SDK v0.46 and v0.47

Proposal

Steps to Reproduce

BUILD_TAGS=rocksdb make build
--> Building...
go build -mod=readonly -tags "netgo ledger rocksdb" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=umee -X github.com/cosmos/cosmos-sdk/version.AppName=umeed -X github.com/cosmos/cosmos-sdk/version.Version=main-079f7d6a81624eb7486c7474967927ab6c283a56 -X github.com/cosmos/cosmos-sdk/version.Commit=079f7d6a81624eb7486c7474967927ab6c283a56 -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,rocksdb" -X github.com/tendermint/tendermint/version.TMCoreSemVer=v0.34.27' -o /home/robert/projects/cosmos/umee/umee/build/ ./...
# github.com/cosmos/gorocksdb
../../../../go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/options.go:759:2: could not determine kind of name for C.rocksdb_options_set_hard_rate_limit
../../../../go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/options.go:498:2: could not determine kind of name for C.rocksdb_options_set_max_mem_compaction_level
../../../../go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/options.go:871:2: could not determine kind of name for C.rocksdb_options_set_purge_redundant_kvs_while_flush
../../../../go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/options.go:767:2: could not determine kind of name for C.rocksdb_options_set_rate_limit_delay_max_milliseconds
../../../../go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/options.go:910:2: could not determine kind of name for C.rocksdb_options_set_skip_log_error_on_recovery
../../../../go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/options.go:750:2: could not determine kind of name for C.rocksdb_options_set_soft_rate_limit
../../../../go/pkg/mod/github.com/cosmos/gorocksdb@v1.2.0/options.go:793:2: could not determine kind of name for C.rocksdb_options_set_table_cache_remove_scan_count_limit
# github.com/tecbot/gorocksdb
../../../../go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/options.go:759:2: could not determine kind of name for C.rocksdb_options_set_hard_rate_limit
../../../../go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/options.go:498:2: could not determine kind of name for C.rocksdb_options_set_max_mem_compaction_level
../../../../go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/options.go:871:2: could not determine kind of name for C.rocksdb_options_set_purge_redundant_kvs_while_flush
../../../../go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/options.go:767:2: could not determine kind of name for C.rocksdb_options_set_rate_limit_delay_max_milliseconds
../../../../go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/options.go:910:2: could not determine kind of name for C.rocksdb_options_set_skip_log_error_on_recovery
../../../../go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/options.go:750:2: could not determine kind of name for C.rocksdb_options_set_soft_rate_limit
../../../../go/pkg/mod/github.com/tecbot/gorocksdb@v0.0.0-20191217155057-f0fad39f321c/options.go:793:2: could not determine kind of name for C.rocksdb_options_set_table_cache_remove_scan_count_limit
facundomedica commented 1 year ago

Some of those flags are deprecated, for some reason we are importing an outdated wrapper for what I understand. Maybe @yihuang can help us on this one?

yihuang commented 1 year ago

gorocksdb can't built with recent rocksdb releases, we were using rocksdb 6.8.x with gorocksdb. Now we use grocksdb binding together with recent rocksdb v7.9.2

cometbft-db PR: https://github.com/cometbft/cometbft-db/pull/42 tm-db branch we are using: https://github.com/crypto-org-chain/tm-db/tree/release/v0.6.x

tac0turtle commented 10 months ago

we were able to get this to work. with older versions of the sdk it requires some massaging but it is better in the latest release. Closing this for now