mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 20:00:10 +00:00
protobufc: unpin standard version to fix build with gcc 16 (#538023)
This commit is contained in:
@@ -36,6 +36,21 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
zlib
|
||||
];
|
||||
|
||||
# The upstream macro is vendored from a very old autoconf archive:
|
||||
# https://github.com/protobuf-c/protobuf-c/commit/42612b4ba4b11d48b76e3643fa6d42f617e661b6
|
||||
# and the build system appears to arbitrarily require C++17 specifically:
|
||||
# https://github.com/protobuf-c/protobuf-c/blob/4719fdd7760624388c2c5b9d6759eb6a47490626/configure.ac#L72
|
||||
# However, the default standard version used by GCC continues to increase
|
||||
# (e.g. C++20 for GCC 16), and so protobuf-c's dependencies do as well. In
|
||||
# particular, abseil-cpp has headers that protobuf-c includes and are
|
||||
# sensitive to the standard version. While we could override the standard
|
||||
# version used by these dependents, it is simpler to drop the requirement and
|
||||
# allow the compiler default standard to be used.
|
||||
postPatch = ''
|
||||
substituteInPlace configure.ac --replace-fail \
|
||||
"AX_CXX_COMPILE_STDCXX(17, noext, mandatory)" ""
|
||||
'';
|
||||
|
||||
env.PROTOC = lib.getExe buildPackages.protobuf_33;
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user