Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors with gcc 4.5.2 and thrift 0.6.0 #19

Open
gnobal opened this issue May 9, 2011 · 4 comments
Open

Build errors with gcc 4.5.2 and thrift 0.6.0 #19

gnobal opened this issue May 9, 2011 · 4 comments

Comments

@gnobal
Copy link

gnobal commented May 9, 2011

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
Copy link

matkor commented May 12, 2011

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

@gnobal
Copy link
Author

gnobal commented May 12, 2011

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
Copy link

ghost commented Jun 2, 2011

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
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants