diff options
Diffstat (limited to 'sci-libs/caffe2/files')
-rw-r--r-- | sci-libs/caffe2/files/caffe2-2.1.2-fix-openmp-link.patch | 15 | ||||
-rw-r--r-- | sci-libs/caffe2/files/caffe2-2.1.2-fix-rpath.patch | 12 |
2 files changed, 27 insertions, 0 deletions
diff --git a/sci-libs/caffe2/files/caffe2-2.1.2-fix-openmp-link.patch b/sci-libs/caffe2/files/caffe2-2.1.2-fix-openmp-link.patch new file mode 100644 index 000000000000..3f2d0ae3c30a --- /dev/null +++ b/sci-libs/caffe2/files/caffe2-2.1.2-fix-openmp-link.patch @@ -0,0 +1,15 @@ +Fix "undefined symbol: omp_get_max_active_levels" in mkl + <nothing else> builds +https://github.com/pytorch/pytorch/issues/116576 +--- a/caffe2/CMakeLists.txt ++++ b/caffe2/CMakeLists.txt +@@ -1575,6 +1575,10 @@ if(BUILD_SHARED_LIBS) + target_link_libraries(torch_global_deps TBB::tbb) + endif() + ++ if(USE_OPENMP) ++ target_link_libraries(torch_global_deps OpenMP::OpenMP_CXX) ++ endif() ++ + install(TARGETS torch_global_deps DESTINATION "${TORCH_INSTALL_LIB_DIR}") + endif() + diff --git a/sci-libs/caffe2/files/caffe2-2.1.2-fix-rpath.patch b/sci-libs/caffe2/files/caffe2-2.1.2-fix-rpath.patch new file mode 100644 index 000000000000..731227fa25ee --- /dev/null +++ b/sci-libs/caffe2/files/caffe2-2.1.2-fix-rpath.patch @@ -0,0 +1,12 @@ +Unset rpath to support blas-lapack-switch +Bug: https://bugs.gentoo.org/921129 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -10,7 +10,6 @@ endif(APPLE) + set(CMAKE_SKIP_BUILD_RPATH FALSE) + # Don't use the install-rpath during the build phase + set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +-set(CMAKE_INSTALL_RPATH "${_rpath_portable_origin}") + # Automatically add all linked folders that are NOT in the build directory to + # the rpath (per library?) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) |