From 7f6e1d5d5957ba3221dc34d481a320c021572cd4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 18 Nov 2025 01:15:24 +0100 Subject: [PATCH] protobuf: add version alignment hint The version is important to match, as long as the default tensorflow package we consume is a binary wheel that ships with a statically linked protobuf version. A mismatch of protobuf versions in a single process can lead to memory corruption, because of ABI incompatibilities between protobuf versions. --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92c42ad95310..a6e86008719d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8240,6 +8240,8 @@ with pkgs; prospector = callPackage ../development/tools/prospector { }; + # this version should align with the static protobuf version linked into python3.pkgs.tensorflow + # $ nix-shell -I nixpkgs=$(git rev-parse --show-toplevel) -p python3.pkgs.tensorflow --run "python3 -c 'import google.protobuf; print(google.protobuf.__version__)'" protobuf = protobuf_32; inherit