[ https://issues.apache.org/jira/browse/THRIFT-3043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14363495#comment-14363495 ]
Randy Abernethy commented on THRIFT-3043: ----------------------------------------- Hey Guys, For me 1d1bca2 would not build on Ubuntu 14.04, Centos 6.6 or Centos 7 with autotools or cmake. I tried the Vagrant box in contrib, both Dockerfiles in build/docker and a bare metal Ubuntu 14.04 system that builds recent commits up to 1d1bca2 then ran out of time. The Jenkins Thrift-Compiler-Windows job also failed here. It would be great if we had a reference system everyone could use to test patches/builds. I'm sure 1d1bca2 builds for others in other setups. The last thing I want to do is break someone else's work but without a baseline I don't know if I'm making things better or worse. Can we use the Ubuntu 14.04 contrib/Vagrantfile or the build/docker/Vagrantfile using the ubuntu:latest Dockerfile as a reference platform going forward? On the IDL compiler front, g++ 4.4 (the version provided with Centos 6) does not support the 03 switch. The choices are essentially {noformat}c++98 or gnu++0x{noformat} and 0x is deprecated. Should we stick with Cpp98 or not? As I see it breaking Cpp98 compatibility in the IDL Compiler source adds nothing, but does create a big reduction in build compatibility. If we're going to do Cpp11 let's build a Cpp11 generator and library. That would be a huge user benefit. My vote is to leave the compiler source C++98 compatible. I would change my vote in a heartbeat if there was a material user benefit to changing. {noformat} [root@31ac9c18acc0 /]# g++ --version g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@31ac9c18acc0 /]# g++ -std=c++98 test.cpp [root@31ac9c18acc0 /]# g++ -std=c++03 test.cpp cc1plus: error: unrecognized command line option "-std=c++03" [root@31ac9c18acc0 /]# g++ -std=gnu++03 test.cpp cc1plus: error: unrecognized command line option "-std=gnu++03" [root@31ac9c18acc0 /]# g++ -std=gnu++0x test.cpp [root@31ac9c18acc0 /]# {noformat} Best, Randy > go compiler generator uses non C++98 code > ----------------------------------------- > > Key: THRIFT-3043 > URL: https://issues.apache.org/jira/browse/THRIFT-3043 > Project: Thrift > Issue Type: Bug > Components: Go - Compiler > Affects Versions: 0.9.3 > Reporter: Randy Abernethy > Priority: Blocker > > go compiler generator uses non C++98 code causing builds to fail in Centos 6 > and other environments. > ==> default: src/generate/t_go_generator.cc:415: error: in C++98 > ���commonInitialisms��� must be initialized by constructor, not by ���{...}��� > ==> default: src/generate/t_go_generator.cc:415: error: deducing from > brace-enclosed initializer list requires #include <initializer_list> > ==> default: src/generate/t_go_generator.cc:415: error: deducing from > brace-enclosed initializer list requires #include <initializer_list> > ==> default: src/generate/t_go_generator.cc:415: warning: extended > initializer lists only available with -std=c++0x or -std=gnu++0x > ==> default: src/generate/t_go_generator.cc:415: error: no matching function > for call to ���std::set<std::basic_string<char, std::char_traits<char>, s > td::allocator<char> >, std::less<std::basic_string<char, > std::char_traits<char>, std::allocator<char> > >, > std::allocator<std::basic_string<char, std: > :char_traits<char>, std::allocator<char> > > >::set(<brace-enclosed > initializer list>)��� > ==> default: > /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_set.h:188: > note: candidates are: std::set<_Key, _Compare, _ > Alloc>::set(const std::set<_Key, _Compare, _Alloc>&) [with _Key = > std::basic_string<char, std::char_traits<char>, std::allocator<char> >, > _Compare = s > td::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, _Alloc = std::allocator<std::basic_string<char, std::char_traits<ch > ar>, std::allocator<char> > >] > ==> default: > /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_set.h:136: > note: std::set<_Key, _Compare, _ > Alloc>::set() [with _Key = std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, _Compare = std::less<std::basic_string<char, std::c > har_traits<char>, std::allocator<char> > >, _Alloc = > std::allocator<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >] > ==> default: make[3]: *** [thrift-t_go_generator.o] Error 1 > ==> default: make[3]: Leaving directory `/thrift/compiler/cpp' > ==> default: make[2]: *** [all] Error 2 -- This message was sent by Atlassian JIRA (v6.3.4#6332)