summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-pytorch-runpath.patch
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-08-12 00:30:27 +0200
committerMarius Bakke <marius@gnu.org>2021-08-12 00:30:27 +0200
commitc4133c43c7cfe2476ebfae87f9e4d10d96de9bc7 (patch)
tree47bd773d2f434384b54e56916c1a287dd8e51511 /gnu/packages/patches/python-pytorch-runpath.patch
parentffa01e68859bb7a6daa9fcffdc8d77ca35db4bc0 (diff)
parent4eb0a5146ae5a195a29c79f586fcc1e58f7fa69b (diff)
downloadguix-patches-c4133c43c7cfe2476ebfae87f9e4d10d96de9bc7.tar
guix-patches-c4133c43c7cfe2476ebfae87f9e4d10d96de9bc7.tar.gz
Merge branch 'master' into core-updates-frozen
Conflicts: gnu/packages/algebra.scm gnu/packages/games.scm gnu/packages/golang.scm gnu/packages/kerberos.scm gnu/packages/mail.scm gnu/packages/python.scm gnu/packages/ruby.scm gnu/packages/scheme.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm
Diffstat (limited to 'gnu/packages/patches/python-pytorch-runpath.patch')
-rw-r--r--gnu/packages/patches/python-pytorch-runpath.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-pytorch-runpath.patch b/gnu/packages/patches/python-pytorch-runpath.patch
new file mode 100644
index 0000000000..6f270ef9b1
--- /dev/null
+++ b/gnu/packages/patches/python-pytorch-runpath.patch
@@ -0,0 +1,25 @@
+Libraries (such as 'libtorch_cpu.so') and executables (such as 'torch_shm_manager')
+get installed, quite surprisingly, to 'lib/python3.8/site-packages/{bin,lib}'.
+Make sure RUNPATH matches that.
+
+--- a/cmake/Dependencies.cmake
++++ b/cmake/Dependencies.cmake
+@@ -4,7 +4,7 @@ if(APPLE)
+ set(CMAKE_MACOSX_RPATH ON)
+ set(_rpath_portable_origin "@loader_path")
+ else()
+- set(_rpath_portable_origin $ORIGIN)
++ set(_rpath_portable_origin $ORIGIN/../lib)
+ 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})