Eyescale/Equalizer

perf-persistentMap (Lunchbox) does not link; missing leveldb library in linker

Closed this issue · 5 comments

Ubuntu 14.04.3.
Current Equalizer from today.
Running
cmake ..
make

Linking CXX executable perf-persistentMap
/usr/bin/ld: CMakeFiles/perf-persistentMap.dir/persistentMap.cpp.o: undefined reference to symbol '_ZNK7leveldb6Status8ToStringEv'
//usr/lib/x86_64-linux-gnu/libleveldb.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Lunchbox/tests/perf-persistentMap] Error 1
make[1]: *** [Lunchbox/tests/CMakeFiles/perf-persistentMap.dir/all] Error 2
make: *** [all] Error 2

Possibly due to a wrong order of the linked libraries, or a missing library, according to
http://stackoverflow.com/questions/19901934/strange-linking-error-dso-missing-from-command-line

adding the following option (link against libleveldb.so) works. Please fix the CMakeLists.txt. Thanks!
-lleveldb
to the offending line, so that it ends as
/usr/bin/c++ -Wall -Wextra -Winvalid-pch -Winit-self -Wno-unknown-pragmas -Werror -Wshadow -fmax-errors=5 -Wnon-virtual-dtor -Wsign-promo -Wvla -fno-strict-aliasing -std=c++11 -fopenmp -g CMakeFiles/perf-persistentMap.dir/persistentMap.cpp.o -o perf-persistentMap -rdynamic ../../lib/libLunchbox.so.1.12.0 -lboost_regex -lboost_serialization -lboost_filesystem -lboost_system -lboost_thread -lboost_unit_test_framework -lpthread /usr/lib/openmpi/lib/libmpi_cxx.so /usr/lib/openmpi/lib/libmpi.so -ldl -lhwloc ../../lib/libServus.so.1.1.0 -Wl,-rpath,/home/rgarcia/lrz/equalizer/Equalizer/build/lib:/usr/lib/openmpi/lib -lleveldb

Once that is fixed, the rest of the build works perfectly.

Current git (Fri Nov 13 12:51:49 CET 2015) is still affected.

Closing for now, as I cannot reproduce it after recloning. However, it may be hidden by bug
#514
and it may reappear once that is fixed.

Definitely closed, I compiled Equalizer successfully.