Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-13597

interface/cassandra.thrift defines VERSION which conflicts with config.h VERSION #define from thrift

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Low
    • Resolution: Unresolved
    • 3.11.x
    • None
    • None
    • Low

    Description

      std::string VERSION conflicts with pound define VERSION in thrift:

      To reproduce:
      thrift -gen cpp /var/opt/cassandra/interface/cassandra.thrift

      Produces gen-cpp directory:
      g++ -Igen-cpp/include -I/usr/include -I/usr/include/thrift -c gen-cpp/cassandra_constants.cpp

      In file included from /usr/include/thrift/thrift-config.h:23:0,
      from /usr/include/thrift/Thrift.h:25,
      from gen-cpp/include/cassandra_types.h:12,
      from gen-cpp/include/cassandra_constants.h:10,
      from gen-cpp/cassandra_constants.cpp:7:
      gen-cpp/include/cassandra_constants.h:18:15: error: expected unqualified-id before string constant

      Investigating:

      g++ -Igen-cpp/include -I/usr/include -I/usr/include/thrift -E -dM gen-cpp/cassandra_constants.cpp | grep VERSION
      ...
      #define VERSION "1.0.0-dev"

      Found file that defines this:
      include/thrift/config.h:
      #define VERSION "1.0.0-dev"

      See also:
      http://grokbase.com/t/thrift/user/108vnzs3ct/cpp-generators-code-will-not-compile-under-autoconf

      Related to tickets:
      CASSANDRA-412
      THRIFT-6

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              PaulSHahn Paul S Hahn
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: