You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Mario Emmenlauer <ma...@emmenlauer.de> on 2016/04/01 16:51:04 UTC

thrift 0.9.3 (and newer) compile problem with cmake on Linux

Dear All,

there is an issue compiling thrift 0.9.3 (and newer, I've tested
trunk from today) using cmake on Ubuntu 15.10. The build fails with
the following error:

[ 47%] Building CXX object
lib/cpp/test/CMakeFiles/AllProtocolsTest.dir/AllProtocolTests.cpp.o
Linking CXX executable ../../../bin/AllProtocolsTest
../../libthrift.so.1.0.0: undefined reference to `dladdr'
../../libthrift.so.1.0.0: undefined reference to `dlopen'
../../libthrift.so.1.0.0: undefined reference to `dlclose'
../../libthrift.so.1.0.0: undefined reference to `dlerror'
../../libthrift.so.1.0.0: undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
lib/cpp/test/CMakeFiles/AllProtocolsTest.dir/build.make:98: recipe for target
'bin/AllProtocolsTest' failed
make[4]: *** [bin/AllProtocolsTest] Error 1

I had the same problem with autotools, not only with cmake. But for
autotools, I could work around the issue by simply setting
   LDLIBS="-lcrypto -ldl"
for configure. I'm sorry but I don't understand cmake well enough to
fix the issue for cmake :-(

All the best,

    Mario