> > Hi All, > > I am trying to compile thrift-0.9.2 but am getting the following > compilation > errors: > <snip> > make[4]: Entering directory '/home/sterlite/src/thrift/lib/cpp' > depbase=`echo src/thrift/transport/TSSLSocket.lo | sed > 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ > /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I../.. -I../../lib/cpp/src/thrift -I/usr/include -I./src -Wall > -Wextra -pedantic -g -O2 -MT src/thrift/transport/TSSLSocket.lo -MD -MP -MF > $depbase.Tpo -c -o src/thrift/transport/TSSLSocket.lo > src/thrift/transport/TSSLSocket.cpp &&\ > mv -f $depbase.Tpo $depbase.Plo > libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. > -I../../lib/cpp/src/thrift -I/usr/include -I./src -Wall -Wextra -pedantic > -g -O2 -MT src/thrift/transport/TSSLSocket.lo -MD -MP -MF > src/thrift/transport/.deps/TSSLSocket.Tpo -c > src/thrift/transport/TSSLSocket.cpp -fPIC -DPIC -o > src/thrift/transport/.libs/TSSLSocket.o > src/thrift/transport/TSSLSocket.cpp: In function ‘void > apache::thrift::transport::initializeOpenSSL()’: > src/thrift/transport/TSSLSocket.cpp:99:39: error: expected > primary-expression before ‘(’ token > mutexes = boost::shared_array<Mutex>(new Mutex[::CRYPTO_num_locks()]); > ^ > In file included from /usr/include/openssl/bio.h:20:0, > from /usr/include/openssl/err.h:21, > from src/thrift/transport/TSSLSocket.cpp:33: > src/thrift/transport/TSSLSocket.cpp:99:52: error: expected id-expression > before ‘(’ token > mutexes = boost::shared_array<Mutex>(new Mutex[::CRYPTO_num_locks()]); > ^ > src/thrift/transport/TSSLSocket.cpp: In function ‘void > apache::thrift::transport::cleanupOpenSSL()’: > src/thrift/transport/TSSLSocket.cpp:130:21: warning: ‘void > ERR_remove_state(long unsigned int)’ is deprecated > [-Wdeprecated-declarations] > ERR_remove_state(0); > ^ > In file included from /usr/include/openssl/e_os2.h:13:0, > from /usr/include/openssl/err.h:13, > from src/thrift/transport/TSSLSocket.cpp:33: > /usr/include/openssl/err.h:260:1: note: declared here > DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid)) > ^ > src/thrift/transport/TSSLSocket.cpp: In constructor > ‘apache::thrift::transport::SSLContext::SSLContext(const > apache::thrift::transport::SSLProtocol&)’: > src/thrift/transport/TSSLSocket.cpp:146:24: error: ‘SSLv3_method’ was not > declared in this scope > ctx_ = SSL_CTX_new(SSLv3_method()); > ^~~~~~~~~~~~ > src/thrift/transport/TSSLSocket.cpp:146:24: note: suggested alternative: > ‘SSLv23_method’ > ctx_ = SSL_CTX_new(SSLv3_method()); > ^~~~~~~~~~~~ > SSLv23_method > src/thrift/transport/TSSLSocket.cpp:150:37: warning: ‘const SSL_METHOD* > TLSv1_method()’ is deprecated [-Wdeprecated-declarations] > ctx_ = SSL_CTX_new(TLSv1_method()); > ^ > In file included from /usr/include/openssl/e_os2.h:13:0, > from /usr/include/openssl/err.h:13, > from src/thrift/transport/TSSLSocket.cpp:33: > /usr/include/openssl/ssl.h:1852:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /* > TLSv1.0 */ > ^ > src/thrift/transport/TSSLSocket.cpp:154:39: warning: ‘const SSL_METHOD* > TLSv1_1_method()’ is deprecated [-Wdeprecated-declarations] > ctx_ = SSL_CTX_new(TLSv1_1_method()); > ^ > In file included from /usr/include/openssl/e_os2.h:13:0, > from /usr/include/openssl/err.h:13, > from src/thrift/transport/TSSLSocket.cpp:33: > /usr/include/openssl/ssl.h:1858:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* > TLSv1.1 */ > ^ > src/thrift/transport/TSSLSocket.cpp:158:39: warning: ‘const SSL_METHOD* > TLSv1_2_method()’ is deprecated [-Wdeprecated-declarations] > ctx_ = SSL_CTX_new(TLSv1_2_method()); > ^ > In file included from /usr/include/openssl/e_os2.h:13:0, > from /usr/include/openssl/err.h:13, > from src/thrift/transport/TSSLSocket.cpp:33: > /usr/include/openssl/ssl.h:1864:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* > TLSv1.2 */ > ^ > src/thrift/transport/TSSLSocket.cpp: In member function ‘virtual void > apache::thrift::transport::TSSLSocket::close()’: > src/thrift/transport/TSSLSocket.cpp:269:23: warning: ‘void > ERR_remove_state(long unsigned int)’ is deprecated > [-Wdeprecated-declarations] > ERR_remove_state(0); > ^ > In file included from /usr/include/openssl/e_os2.h:13:0, > from /usr/include/openssl/err.h:13, > from src/thrift/transport/TSSLSocket.cpp:33: > /usr/include/openssl/err.h:260:1: note: declared here > DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid)) > ^ > src/thrift/transport/TSSLSocket.cpp: In member function ‘virtual void > apache::thrift::transport::TSSLSocket::authorize()’: > src/thrift/transport/TSSLSocket.cpp:407:55: warning: ‘unsigned char* > ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations] > char* data = (char*)ASN1_STRING_data(name->d.ia5); > ^ > In file included from /usr/include/openssl/e_os2.h:13:0, > from /usr/include/openssl/err.h:13, > from src/thrift/transport/TSSLSocket.cpp:33: > /usr/include/openssl/asn1.h:554:1: note: declared here > DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x)) > ^ > src/thrift/transport/TSSLSocket.cpp: At global scope: > src/thrift/transport/TSSLSocket.cpp:87:13: warning: ‘void > apache::thrift::transport::dyn_destroy(CRYPTO_dynlock_value*, const char*, > int)’ defined but not used [-Wunused-function] > static void dyn_destroy(struct CRYPTO_dynlock_value* lock, const char*, > int) { > ^~~~~~~~~~~ > src/thrift/transport/TSSLSocket.cpp:75:13: warning: ‘void > apache::thrift::transport::dyn_lock(int, CRYPTO_dynlock_value*, const > char*, int)’ defined but not used [-Wunused-function] > static void dyn_lock(int mode, > ^~~~~~~~ > src/thrift/transport/TSSLSocket.cpp:71:30: warning: ‘CRYPTO_dynlock_value* > apache::thrift::transport::dyn_create(const char*, int)’ defined but not > used [-Wunused-function] > static CRYPTO_dynlock_value* dyn_create(const char*, int) { > ^~~~~~~~~~ > src/thrift/transport/TSSLSocket.cpp:57:13: warning: ‘void > apache::thrift::transport::callbackLocking(int, int, const char*, int)’ > defined but not used [-Wunused-function] > static void callbackLocking(int mode, int n, const char*, int) { > ^~~~~~~~~~~~~~~ > Makefile:1181: recipe for target 'src/thrift/transport/TSSLSocket.lo' > failed > make[4]: *** [src/thrift/transport/TSSLSocket.lo] Error 1 > make[4]: Leaving directory '/home/sterlite/src/thrift/lib/cpp' > Makefile:1454: recipe for target 'all-recursive' failed > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory '/home/sterlite/src/thrift/lib/cpp' > Makefile:505: recipe for target 'all-recursive' failed > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory '/home/sterlite/src/thrift/lib' > Makefile:542: recipe for target 'all-recursive' failed > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory '/home/sterlite/src/thrift' > Makefile:464: recipe for target 'all' failed > make: *** [all] Error 2 >
I have the latest g++ compiler on my system. I tried downgrading g++ also but still the same issue is there. Can anyone please help me on this ? > Thanks and Regards.