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

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17096686#comment-17096686 ] 

Jano Svitok commented on THRIFT-5135:
-------------------------------------

Can this be merged?

Do we want to create travis job that builds compiler on OS X?

> 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
>            Priority: Major
>          Time Spent: 10m
>  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)