Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5135

Thrift compiler can't be compiled by CMAKE on OSX

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 0.14.0
    • Fix Version/s: None
    • Component/s: Compiler (General)
    • Labels:
      None

      Description

      Log:

      cd /.../thrift/compiler/cpp
       /.../thrift/compiler/cpp/src/thrift/generate/t_d_generator.cc:754:31: error: non-aggregate type 'vector<std::__1::string>' (aka 'vector<basic_string<char, char_traits<char>,
       allocator<char> > >') cannot be initialized with an initializer list
       vector<string> t_d_generator::d_reserved_words = {
       ^ ~
       1 error generated.
       * 
       ** BUILD FAILED **
      

      Stackoverflow  suggest to enable C++11.

      PR: https://github.com/apache/thrift/pull/2051 – this enables C+11 only on mac. Since the code indeed uses C+ (std::vector initializer list, see https://en.cppreference.com/w/cpp/language/list_initialization), it might be appropriate to enable it for all targets (remove the if() and endif() lines).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emmenlau Mario Emmenlauer
                Reporter:
                janosvitok Jano Svitok
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h