Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -std=c++11 for python setup on kokoro #4527

Merged
merged 1 commit into from
May 3, 2018

Conversation

BSBandme
Copy link
Contributor

Kokoro is using c++ 4.8, which needs explicitly declare "-std=c++11" arg

@xfxyjwf xfxyjwf removed their request for review April 17, 2018 21:18
@xfxyjwf
Copy link
Contributor

xfxyjwf commented Apr 23, 2018

Jie, can you review this change?

@anandolee
Copy link
Contributor

Do you know why our tests on Kokoro can pass without "-std=c++11" arg

@BSBandme
Copy link
Contributor Author

BSBandme commented May 2, 2018

some part of the log:

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I../src -I/usr/include/python2.7 -c google/protobuf/pyext/message_factory.cc -o build/temp.linux-x86_64-2.7/google/protobuf/pyext/message_factory.o -Wno-write-strings -Wno-invalid-offsetof -Wno-sign-compare
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /usr/include/c++/4.8/type_traits:35:0,
                 from ../src/google/protobuf/message.h:115,
                 from ../src/google/protobuf/dynamic_message.h:45,
                 from google/protobuf/pyext/message_factory.cc:33:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
In file included from ../src/google/protobuf/arena.h:51:0,
                 from ../src/google/protobuf/message.h:118,
                 from ../src/google/protobuf/dynamic_message.h:45,
                 from google/protobuf/pyext/message_factory.cc:33:
../src/google/protobuf/arena_impl.h:311:3: warning: identifier ‘static_assert’ is a keyword in C++11 [-Wc++0x-compat]
   static_assert(kBlockHeaderSize % 8 == 0,
   ^

I think it's because of on kokoro c++ is 4.8, which g++ doesn't support C++11 features by default.

@anandolee anandolee merged commit 4a09836 into protocolbuffers:master May 3, 2018
@xfxyjwf xfxyjwf added the python label Jun 22, 2018
hpohl pushed a commit to pley-games/protobuf that referenced this pull request Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants