From 50c3632fd9110311f5061e8b9b9073fdd93f5922 Mon Sep 17 00:00:00 2001 From: Tomasz Socha Date: Tue, 8 Nov 2022 02:08:21 +0100 Subject: [PATCH] Fix undefined symbol: shm_open (#47421) * Fix undefined symbol: shm_open * Fix for Windows * Exclude APLLE --- paddle/fluid/memory/allocation/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/fluid/memory/allocation/CMakeLists.txt b/paddle/fluid/memory/allocation/CMakeLists.txt index 8eff7a3fc8..0a5a3b3154 100644 --- a/paddle/fluid/memory/allocation/CMakeLists.txt +++ b/paddle/fluid/memory/allocation/CMakeLists.txt @@ -47,6 +47,10 @@ if(NOT WIN32) endif() endif() +if(UNIX AND NOT APPLE) + list(APPEND ALLOCATOR_DEPS rt) +endif() + if(WITH_ASCEND_CL) list(APPEND ALLOCATOR_SRCS npu_allocator.cc npu_pinned_allocator.cc) list(APPEND ALLOCATOR_DEPS npu_info) -- GitLab