You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mario Emmenlauer (Jira)" <ji...@apache.org> on 2020/05/21 13:04:00 UTC

[jira] [Resolved] (THRIFT-5135) Thrift compiler can't be compiled by CMAKE on OSX

     [ https://issues.apache.org/jira/browse/THRIFT-5135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Emmenlauer resolved THRIFT-5135.
--------------------------------------
      Assignee: Mario Emmenlauer
    Resolution: Cannot Reproduce

Closing this issue until further information is provided. The reason(s) to close:
* The reported issue about the c++ standard can not be reproduced from the code
* The build on MacOSX works for me on macOS 10.13, 10.14 with XCode 9 and 11.

Dear [~janosvitok] please re-open this issue when you can provide additional details.

> Thrift compiler can't be compiled by CMAKE on OSX
> -------------------------------------------------
>
>                 Key: THRIFT-5135
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5135
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (General)
>    Affects Versions: 0.14.0
>            Reporter: Jano Svitok
>            Assignee: Mario Emmenlauer
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Log:
> {code:java}
> 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 **
> {code}
> [Stackoverflow|https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize] [ |https://stackoverflow.com/questions/39022787/error-non-aggregate-type-vectorint-cannot-be-initialized-with-an-initialize]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).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)