Skip to content

Loading…

Build errors with gcc 4.5.2 and thrift 0.6.0 #19

Open
gnobal opened this Issue · 4 comments

3 participants

@gnobal

When building libcassandra with gcc 4.5.2 (which comes with Ubuntu 11.04) and libthrift 0.6.0 the following errors occur:

In file included from /tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/Thrift.h:42:0,
             from /tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/transport/TTransport.h:23,
             from /tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/protocol/TProtocol.h:23,
             from /tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TProcessor.h:24,
             from libgenthrift/Cassandra.h:9,
             from libgenthrift/Cassandra.cpp:6:
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TLogging.h:69:33: error: anonymous variadic macros were introduced in C99
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TLogging.h:91:35: error: anonymous variadic macros were introduced in C99
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TLogging.h:102:40: error: anonymous variadic macros were introduced in C99
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TLogging.h:113:31: error: anonymous variadic macros were introduced in C99
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TLogging.h:130:37: error: anonymous variadic macros were introduced in C99
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TLogging.h:148:36: error: anonymous variadic macros were introduced in C99
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TLogging.h:173:5: error: "T_GLOBAL_DEBUG_VIRTUAL" is not defined
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TLogging.h:183:7: error: "T_GLOBAL_DEBUG_VIRTUAL" is not defined
In file included from /tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/transport/TTransport.h:23:0,
             from /tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/protocol/TProtocol.h:23,
             from /tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TProcessor.h:24,
             from libgenthrift/Cassandra.h:9,
             from libgenthrift/Cassandra.cpp:6:
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/Thrift.h:168:5: error: "T_GLOBAL_DEBUG_VIRTUAL" is not defined
In file included from libgenthrift/Cassandra.cpp:6:0:
/tmp/cassandra/../thrift/linux64/thrift-0.6.0/include/thrift/TProcessor.h:141:16: error: ‘virtual bool apache::thrift::TProcessor::process(boost::shared_ptr<apache::thrift::protocol::TProtocol>, boost::shared_ptr<apache::thrift::protocol::TProtocol>, void*)’ was hidden [-Woverloaded-virtual]
libgenthrift/Cassandra.h:3315:16: error:   by ‘virtual bool org::apache::cassandra::CassandraProcessor::process(boost::shared_ptr<apache::thrift::protocol::TProtocol>, boost::shared_ptr<apache::thrift::protocol::TProtocol>)’ [-Woverloaded-virtual]

As a workaround to avoid these errors I set CXXFLAGS to run ./configure as follows:

env CXXFLAGS="-DT_GLOBAL_DEBUG_VIRTUAL=0 -Wno-variadic-macros -Wno-overloaded-virtual" ./configure ... 

But this is just a dangerous hack that ignores compile time warnings. I'm not sure what the right way to handle these is.

@matkor

Is it not more bug/feature of thrift ( variadic-macros used in C++, not sure about rest) ?

@gnobal

I guess you're right but I believe thrift compiled without these warnings or errors, which means some compilation switch is on for libcassandra. I may have missed them, though, as I have scripts that do this and I don't always follow the build process.

I do believe libcassandra is the one that needs changing, but I'm not sure. At least I wrote this somewhere so that people can find the workaround if they encounter the same issues.

@ghost

I'm having the same problems on GCC 4.6.The new thrift can't compile (use) the old files. While i can compile by disabling errors I get an undefined symbol _ZTVN6apache6thrift9transport16TFramedTransportE (vtable for apache::thrift::transport::TFramedTransport) when using the lib.

I presume the project is missing the original .thrift file(s) and that all the libgenthrift files are outdate and a regeneration is required. Ideias welcomed.

@khaledblah

I have the same problem on Ubuntu 11.04 with GCC 4.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.