diff options
Diffstat (limited to 'gnu/packages/patches/python-pytorch-runpath.patch')
-rw-r--r-- | gnu/packages/patches/python-pytorch-runpath.patch | 25 |
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}) |