aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-pytorch-runpath.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2022-07-05 16:51:38 +0200
committerLudovic Courtès <ludo@gnu.org>2022-07-05 16:56:04 +0200
commit20f55375dc3ec969c24d39e9d97830d84be345a8 (patch)
tree8bb7bfb811dbaa6f5a6e2185a16fde36673d53c8 /gnu/packages/patches/python-pytorch-runpath.patch
parentb211824f0a43f6ef5cc76c6b9a7486d647a0a663 (diff)
downloadguix-20f55375dc3ec969c24d39e9d97830d84be345a8.tar.gz
guix-20f55375dc3ec969c24d39e9d97830d84be345a8.zip
gnu: python-pytorch: Update to 1.11.0.
* gnu/packages/machine-learning.scm (python-pytorch): Update to 1.11.0. [source](snippet): Remove now unnecessary "caffe2/onnx/backend.cc" substitution. [arguments]: Add 'remove-caffe2-onnx-scripts' phase. * gnu/packages/patches/python-pytorch-runpath.patch, gnu/packages/patches/python-pytorch-system-libraries.patch: Update.
Diffstat (limited to 'gnu/packages/patches/python-pytorch-runpath.patch')
-rw-r--r--gnu/packages/patches/python-pytorch-runpath.patch25
1 files changed, 15 insertions, 10 deletions
diff --git a/gnu/packages/patches/python-pytorch-runpath.patch b/gnu/packages/patches/python-pytorch-runpath.patch
index 6f270ef9b1..7f95b88a2b 100644
--- a/gnu/packages/patches/python-pytorch-runpath.patch
+++ b/gnu/packages/patches/python-pytorch-runpath.patch
@@ -2,6 +2,21 @@ Libraries (such as 'libtorch_cpu.so') and executables (such as 'torch_shm_manage
get installed, quite surprisingly, to 'lib/python3.8/site-packages/{bin,lib}'.
Make sure RUNPATH matches that.
+diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
+index 5b5622f0..30d27e57 100644
+--- a/caffe2/CMakeLists.txt
++++ b/caffe2/CMakeLists.txt
+@@ -1909,7 +1909,7 @@ if(BUILD_PYTHON)
+ if(${BUILDING_WITH_TORCH_LIBS})
+ # site-packages/caffe2/python/caffe2_pybind11_state
+ # site-packages/torch/lib
+- set(caffe2_pybind11_rpath "${_rpath_portable_origin}/../../torch/lib")
++ set(caffe2_pybind11_rpath $ORIGIN/../../torch/lib)
+ endif(${BUILDING_WITH_TORCH_LIBS})
+
+ # Must also include `CMAKE_SHARED_LINKER_FLAGS` in linker flags for
+diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
+index ee9cf410..f190e69b 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -4,7 +4,7 @@ if(APPLE)
@@ -13,13 +28,3 @@ Make sure RUNPATH matches that.
endif(APPLE)
# Use separate rpaths during build and install phases
set(CMAKE_SKIP_BUILD_RPATH FALSE)
-
---- a/caffe2/CMakeLists.txt
-+++ b/caffe2/CMakeLists.txt
-@@ -1797,5 +1797,5 @@ if(BUILD_PYTHON)
- if(${BUILDING_WITH_TORCH_LIBS})
- # site-packages/caffe2/python/caffe2_pybind11_state
- # site-packages/torch/lib
-- set(caffe2_pybind11_rpath "${_rpath_portable_origin}/../../torch/lib")
-+ set(caffe2_pybind11_rpath $ORIGIN/../../torch/lib)
- endif(${BUILDING_WITH_TORCH_LIBS})