Skip to content

Build errors with gcc 4.5.2 and thrift 0.6.0 #19

@gnobal

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions