caffe: fix build with protobuf 3.18+
This commit is contained in:
parent
759c4c9da1
commit
e12802213e
@ -91,7 +91,11 @@ stdenv.mkDerivation rec {
|
|||||||
inherit (python.sourceVersion) major minor; # Should be changed in case of PyPy
|
inherit (python.sourceVersion) major minor; # Should be changed in case of PyPy
|
||||||
});
|
});
|
||||||
|
|
||||||
postPatch = lib.optionalString (cudaSupport && lib.versionAtLeast cudatoolkit.version "9.0") ''
|
postPatch = ''
|
||||||
|
substituteInPlace src/caffe/util/io.cpp --replace \
|
||||||
|
'SetTotalBytesLimit(kProtoReadBytesLimit, 536870912)' \
|
||||||
|
'SetTotalBytesLimit(kProtoReadBytesLimit)'
|
||||||
|
'' + lib.optionalString (cudaSupport && lib.versionAtLeast cudatoolkit.version "9.0") ''
|
||||||
# CUDA 9.0 doesn't support sm_20
|
# CUDA 9.0 doesn't support sm_20
|
||||||
sed -i 's,20 21(20) ,,' cmake/Cuda.cmake
|
sed -i 's,20 21(20) ,,' cmake/Cuda.cmake
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user