mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Add set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,--no-as-needed") to CMakeLists.txt (#25445)
Summary: This is a fix for a rare build issue on Ubuntu: `symbol lookup error: miniconda3/envs/pytorch-py3.7/lib/libmkl_intel_lp64.so: undefined symbol: mkl_blas_dsyrk` https://software.intel.com/en-us/articles/symbol-lookup-error-when-linking-intel-mkl-with-gcc-on-ubuntu Pull Request resolved: https://github.com/pytorch/pytorch/pull/25445 Differential Revision: D17151458 Pulled By: pbelevich fbshipit-source-id: a0f3e86a05ac408b95446560f42fc16fbff2d7af
This commit is contained in:
parent
817f4502fb
commit
738303ba43
1 changed files with 7 additions and 0 deletions
|
|
@ -191,6 +191,13 @@ cmake_dependent_option(
|
|||
|
||||
set(ONNX_NAMESPACE "onnx_torch" CACHE STRING "A namespace for ONNX; needed to build with other frameworks that share ONNX.")
|
||||
|
||||
# This is a fix for a rare build issue on Ubuntu:
|
||||
# symbol lookup error: miniconda3/envs/pytorch-py3.7/lib/libmkl_intel_lp64.so: undefined symbol: mkl_blas_dsyrk
|
||||
# https://software.intel.com/en-us/articles/symbol-lookup-error-when-linking-intel-mkl-with-gcc-on-ubuntu
|
||||
if(LINUX)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-as-needed")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
foreach(flag_var
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
|
|
|
|||
Loading…
Reference in a new issue