Public bug reported:
When linking to the shared library in librocksdb-dev, the linker is
unable to find symbols in the shared library (for example -- undefined
reference to `typeinfo for rocksdb::Comparator')
This is because the make line needs USE_RTTI=1:
When building rocksdb (at least for this version), the make all target
defaults to using RTTI (and a DEBUG>0), where as make shared does not
use RTTI (-fno-rtti option is passed and DEBUG == 0).
This causes problems for executable which are using rtti (i.e. have not
explicitly specified -fno-rtti)
I believe the debian/rules file should have:
The USE_RTTI=1 is optional for the "make all" part of the target.
override_dh_auto_build:
@echo ARCH=`uname -m`
PORTABLE=1 USE_RTTI=1 make all
PORTABLE=1 USE_RTTI=1 make shared_lib
Here are the typeinfo values in the current .so file:
$ nm --demangle --dynamic librocksdb.so.5.8.8 | grep typeinfo
000000000076e698 V typeinfo for rocksdb::RedisListException
U typeinfo for char const*
000000000076b620 V typeinfo for std::logic_error
000000000076b6e8 V typeinfo for std::future_error
000000000076b650 V typeinfo for std::out_of_range
0000000000767c88 V typeinfo for std::runtime_error
000000000076b638 V typeinfo for std::invalid_argument
0000000000767c78 V typeinfo for std::exception
00000000004ece00 V typeinfo name for rocksdb::RedisListException
00000000004e7db0 V typeinfo name for std::logic_error
00000000004e9170 V typeinfo name for std::future_error
00000000004e7de0 V typeinfo name for std::out_of_range
00000000004ddb60 V typeinfo name for std::runtime_error
00000000004e7dc0 V typeinfo name for std::invalid_argument
00000000004ddb48 V typeinfo name for std::exception
After making the previous change in override_dh_auto_build, the typeinfo values
are:
$ nm --demangle --dynamic ./librocksdb.so|grep typeinfo|grep -i comparator
00000000007855c8 V typeinfo for rocksdb_comparator_t
000000000078bdb0 V typeinfo for rocksdb::Comparator
0000000000787868 V typeinfo for rocksdb::MemTableRep::KeyComparator
0000000000787498 V typeinfo for rocksdb::InternalKeyComparator
00000000007878b0 V typeinfo for rocksdb::MemTable::KeyComparator
00000000004eebb0 V typeinfo name for rocksdb_comparator_t
0000000000501c70 V typeinfo name for rocksdb::Comparator
00000000004f6c20 V typeinfo name for rocksdb::MemTableRep::KeyComparator
00000000004f50c0 V typeinfo name for rocksdb::InternalKeyComparator
00000000004f6ca0 V typeinfo name for rocksdb::MemTable::KeyComparator
** Affects: rocksdb (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1839382
Title:
-frtti inconsistent in build (undefined reference to `typeinfo for
rocksdb::Comparator')
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rocksdb/+bug/1839382/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs