Conversation
8c06e0c to
6676393
Compare
tobim
left a comment
There was a problem hiding this comment.
This is not a good idea because you will also have to build abseil-cpp with c++14, and since that is a propagated input you will also have to build all reverse dependencies that make use of abseil in c++14 mode. Many of those don't even support c++14 any more.
The readme simply makes a poor statement there, it should really say c++14 or later, c++ goes to great lengths to preserve backwards compatibility after all.
|
@tobim To clarify, my comment was why (or how, even) we were compiling protobuf without specifying any C++ version at all, making me assume we're using a pretty old C++ version yet somehow able to compile protobuf. However, I've just looked through the docs of |
It is actually c++17, to which it was bumped with GCC11: https://www.gnu.org/software/gcc/gcc-11/changes.html. You can check your own compiler with |
|
Note that the situation is different in when |
Ah I see, that clears up quite a few things for me, thanks! (I had been looking at the man pages in a nix-shell which wasn't for the right version of g++.) |
6676393 to
f7943be
Compare
|
@tobim I've made the change you suggested, on darwin stdenv.cc defaults to the old clang, so protobuf would build with c++14 by default only on that platform. |
|
I have checked the clang release notes again and found out that all versions from 6 to 15 default to C++14. Sorry for misleading you. I just opened #255979 to allow a somewhat simpler approach to this kind of problem. |
Description of changes
the readme explicitely states that protobuf should be built with c++14.
I was wondering if this was a discussion that was made before.
Is there a reason not to ?
should we use c++17 ? I'm not sure if it will have some impacts downstream ?
(I know that if this is merged, it will have to be merged on staging, but I'm opening this PR to discuss the idea).
@acairncross is the one who noticed it.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)