HyperLevelDB
HyperLevelDB copied to clipboard
Error When building with snappy-1.1.0-1ubuntu1
CXXLD db_bench /usr/bin/ld: db/db_bench.o: undefined reference to symbol '_ZN6snappy11RawCompressEPKcmPcPm' //usr/local/lib/libsnappy.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
Built OK with snappy-1.1.0-1 (no ubuntu1) on other computer
Thaanks
I may have duplicated this in #16
bump
i have the same issue but i found a workaround and the origin.
it's a linking error, where the ordering of the arguments is wrong
Workaround:
When invoking make, prepend V=1 so it says:
V=1 make
as soon as the linker runs into this problem copy paste the invoked line, in my case: /bin/bash ./libtool --tag=CXX --mode=link c++ -DLEVELDB_PLATFORM_POSIX -DSNAPPY -fno-builtin-memcmp -fno-builtin-memcmp -Wno-variadic-macros -fPIC -I/tmp/tmp.IZbKHk0deH/lets/c_src/snappy/include -L/tmp/tmp.IZbKHk0deH/lets/c_src/snappy/lib -lsnappy -o leveldbutil db/leveldb_main.o libhyperleveldb.a -lpthread
and append -lsnappy
to the end.
EDIT:
just checked hyperleveldb out again and this time no problems ...
I just had this problem installing from the source linked at http://hyperdex.org/download/ (currently hyperleveldb-1.2.2.tar.gz
). I solved it by adding -lsnappy
to LIBS
in the Makefile.
@jag426 Thank you for your answer! It works for me! :smiley: