From 28a0ef9522c65128b3afe5a1835bbc9a836c4b71 Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Thu, 21 Jun 2018 16:34:16 +0800 Subject: [PATCH] remove usr local lib when dynamic load lib --- paddle/fluid/platform/dynload/dynamic_loader.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/paddle/fluid/platform/dynload/dynamic_loader.cc b/paddle/fluid/platform/dynload/dynamic_loader.cc index 7b0adf25ac..198d8566b1 100644 --- a/paddle/fluid/platform/dynload/dynamic_loader.cc +++ b/paddle/fluid/platform/dynload/dynamic_loader.cc @@ -80,10 +80,6 @@ static inline void* GetDsoHandleFromDefaultPath(const std::string& dso_path, // default search from LD_LIBRARY_PATH/DYLD_LIBRARY_PATH // and /usr/local/lib path void* dso_handle = dlopen(dso_path.c_str(), dynload_flags); - if (nullptr == dso_handle) { - dso_handle = - dlopen(join("/usr/local/lib/", dso_path).c_str(), dynload_flags); - } // DYLD_LIBRARY_PATH is disabled after Mac OS 10.11 to // bring System Integrity Projection (SIP), if dso_handle @@ -106,7 +102,7 @@ static inline void* GetDsoHandleFromDefaultPath(const std::string& dso_path, if (nullptr == dso_handle) { LOG(WARNING) << "Can not find library: " << dso_path - << ". Please try to set add the lib path to LD_LIBRARY_PATH."; + << ". Please try to add the lib path to LD_LIBRARY_PATH."; } return dso_handle; } -- GitLab