python3Packages.jaxlib-build: switch to protobuf 3.20

https://hydra.nixos.org/build/191829110
This commit is contained in:
Vladimír Čunát 2022-09-23 11:21:36 +02:00
parent 74cb4ab8e0
commit a0290a8999
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
2 changed files with 6 additions and 5 deletions

View File

@ -35,6 +35,7 @@
, giflib
, grpc
, libjpeg_turbo
, protobuf
, python
, snappy
, zlib
@ -49,7 +50,6 @@
}:
let
inherit (cudaPackages) cudatoolkit cudnn nccl;
pname = "jaxlib";
@ -120,7 +120,7 @@ let
numpy
openssl
pkgs.flatbuffers
pkgs.protobuf
protobuf
pybind11
scipy
six
@ -158,7 +158,7 @@ let
build --action_env=PYENV_ROOT
build --python_path="${python}/bin/python"
build --distinct_host_configuration=false
build --define PROTOBUF_INCLUDE_PATH="${pkgs.protobuf}/include"
build --define PROTOBUF_INCLUDE_PATH="${protobuf}/include"
'' + lib.optionalString cudaSupport ''
build --action_env CUDA_TOOLKIT_PATH="${cudatoolkit_joined}"
build --action_env CUDNN_INSTALL_PATH="${cudnn}"
@ -268,8 +268,8 @@ let
sed -i 's@-lprotobuf@-l:libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
sed -i 's@-lprotoc@-l:libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
'' else if stdenv.cc.isClang then ''
sed -i 's@-lprotobuf@${pkgs.protobuf}/lib/libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
sed -i 's@-lprotoc@${pkgs.protobuf}/lib/libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
sed -i 's@-lprotobuf@${protobuf}/lib/libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
sed -i 's@-lprotoc@${protobuf}/lib/libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD
'' else throw "Unsupported stdenv.cc: ${stdenv.cc}");
installPhase = ''

View File

@ -4699,6 +4699,7 @@ in {
# pin to `cudaPackages_11_6` instead.
cudaPackages = pkgs.cudaPackages_11_6;
IOKit = pkgs.darwin.apple_sdk_11_0.IOKit;
protobuf = pkgs.protobuf3_20; # jaxlib-build 0.3.15 won't build with protobuf 3.21
};
jaxlib = self.jaxlib-build;