linxGnu / grocksdb

RocksDB wrapper for Go. Support 9.x, 8.x, 7.x, 6.x, etc
MIT License
315 stars 68 forks source link

bug : v1.6.22 rocksdb 8.9.1 && v1.8.12 rocksdb 8.9.1 #156

Closed sprappcom closed 3 months ago

sprappcom commented 4 months ago

possible to get latest to work with v8.9.1? otherwise how to resolve any of the below?

  1. v1.8.12 + rocksdb 8.9.1

github.com/linxGnu/grocksdb

vendor/github.com/linxGnu/grocksdb/backup.go:44:13: could not determine kind of name for C.rocksdb_backup_engine_open_opts vendor/github.com/linxGnu/grocksdb/backup.go:144:2: could not determine kind of name for C.rocksdb_backup_engine_restore_db_from_backup make: *** [Makefile:20: build] Error 1

  1. v1.6.22 + rocksdb 8.9.1
# command-line-arguments
/root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.4.linux-amd64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /tmp/go-link-2779104706/000039.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_options_set_base_background_compactions':
/tmp/go-build/options.cgo2.c:976:(.text+0x81b): undefined reference to `rocksdb_options_set_base_background_compactions'
/usr/bin/ld: /tmp/go-link-2779104706/000039.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_options_set_hard_rate_limit':
/tmp/go-build/options.cgo2.c:1377:(.text+0xa4d): undefined reference to `rocksdb_options_set_hard_rate_limit'
/usr/bin/ld: /tmp/go-link-2779104706/000039.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_options_set_max_mem_compaction_level':
/tmp/go-build/options.cgo2.c:1704:(.text+0xc0b): undefined reference to `rocksdb_options_set_max_mem_compaction_level'
/usr/bin/ld: /tmp/go-link-2779104706/000039.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_options_set_purge_redundant_kvs_while_flush':
/tmp/go-build/options.cgo2.c:1990:(.text+0xd7c): undefined reference to `rocksdb_options_set_purge_redundant_kvs_while_flush'
/usr/bin/ld: /tmp/go-link-2779104706/000039.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_options_set_rate_limit_delay_max_milliseconds':
/tmp/go-build/options.cgo2.c:2004:(.text+0xd8b): undefined reference to `rocksdb_options_set_rate_limit_delay_max_milliseconds'
/usr/bin/ld: /tmp/go-link-2779104706/000039.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_options_set_skip_log_error_on_recovery':
/tmp/go-build/options.cgo2.c:2085:(.text+0xdec): undefined reference to `rocksdb_options_set_skip_log_error_on_recovery'
/usr/bin/ld: /tmp/go-link-2779104706/000039.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_options_set_soft_rate_limit':
/tmp/go-build/options.cgo2.c:2125:(.text+0xe1d): undefined reference to `rocksdb_options_set_soft_rate_limit'
/usr/bin/ld: /tmp/go-link-2779104706/000039.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_options_set_table_cache_remove_scan_count_limit':
/tmp/go-build/options.cgo2.c:2167:(.text+0xe5b): undefined reference to `rocksdb_options_set_table_cache_remove_scan_count_limit'
/usr/bin/ld: /tmp/go-link-2779104706/000040.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_block_based_options_set_block_cache_compressed':
/tmp/go-build/options_block_based_table.cgo2.c:112:(.text+0x8c): undefined reference to `rocksdb_block_based_options_set_block_cache_compressed'
/usr/bin/ld: /tmp/go-link-2779104706/000040.o: in function `_cgo_57ec7c2f3164_Cfunc_rocksdb_block_based_options_set_hash_index_allow_collision':
/tmp/go-build/options_block_based_table.cgo2.c:249:(.text+0x13c): undefined reference to `rocksdb_block_based_options_set_hash_index_allow_collision'
/usr/bin/ld: /tmp/go-link-2779104706/000064.o: in function `gorocksdb_filterpolicy_create':
/home/ubuntu/Documents/Programs/repo.sprapp.org/org/sprapp/sprapp/gowebac/vendor/github.com/linxGnu/grocksdb/grocksdb.c:31:(.text+0x98): undefined reference to `rocksdb_filterpolicy_create'
collect2: error: ld returned 1 exit status
linxGnu commented 3 months ago

@sprappcom

Each release of grocksdb strongly bound with specific version of rocksdb.

For example: v1.8.15 bound with rocksdb 8.x.

rocksdb 8.9.1 -> you might want to use grocksdb v1.8.12

You should specify grocksdb version in go.mod

sprappcom commented 3 months ago

@linxGnu thx.