You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2018/01/05 19:27:00 UTC

[incubator-mxnet] branch master updated: Prepend LD_LIBRARY_PATH to dll_path in find_lib_path (#9311)

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new b596cf6  Prepend LD_LIBRARY_PATH to dll_path in find_lib_path (#9311)
b596cf6 is described below

commit b596cf65def4c1f29c1e19ecba864d7e505cc5a0
Author: Can Balioglu <cb...@users.noreply.github.com>
AuthorDate: Fri Jan 5 14:26:56 2018 -0500

    Prepend LD_LIBRARY_PATH to dll_path in find_lib_path (#9311)
    
    The paths contained in the LD_LIBRARY_PATH environment variable
    should have the highest priority while searching for shared
    libraries.
---
 python/mxnet/libinfo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/mxnet/libinfo.py b/python/mxnet/libinfo.py
index fc7c16e..555a15a 100644
--- a/python/mxnet/libinfo.py
+++ b/python/mxnet/libinfo.py
@@ -43,7 +43,7 @@ def find_lib_path():
             dll_path.append(os.path.join(curr_path, '../../build', vs_configuration))
             dll_path.append(os.path.join(curr_path, '../../windows', vs_configuration))
     elif os.name == "posix" and os.environ.get('LD_LIBRARY_PATH', None):
-        dll_path.extend([p.strip() for p in os.environ['LD_LIBRARY_PATH'].split(":")])
+        dll_path[0:0] = [p.strip() for p in os.environ['LD_LIBRARY_PATH'].split(":")]
     if os.name == 'nt':
         os.environ['PATH'] = os.path.dirname(__file__) + ';' + os.environ['PATH']
         dll_path = [os.path.join(p, 'libmxnet.dll') for p in dll_path]

-- 
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].