From b8851798674bfb344a6f432243fef709d6ac74d0 Mon Sep 17 00:00:00 2001 From: Yizhi Liu Date: Sun, 25 Aug 2019 16:39:01 -0700 Subject: [PATCH] move rpath to top --- Makefile | 7 ++++--- ci/docker/runtime_functions.sh | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6ceb74884cdc..698c8ef1c53f 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,7 @@ else endif CFLAGS += -I$(TPARTYDIR)/mshadow/ -I$(TPARTYDIR)/dmlc-core/include -fPIC -I$(NNVM_PATH)/include -I$(DLPACK_PATH)/include -I$(TPARTYDIR)/tvm/include -Iinclude $(MSHADOW_CFLAGS) LDFLAGS = -pthread -ldl $(MSHADOW_LDFLAGS) $(DMLC_LDFLAGS) +LDFLAGS += -Wl,-rpath,'$${ORIGIN}' ifeq ($(ENABLE_TESTCOVERAGE), 1) CFLAGS += --coverage @@ -154,7 +155,7 @@ ifeq ($(USE_MKLDNN), 1) LDFLAGS += -L$(MKLROOT)/lib endif CFLAGS += -I$(MKLDNNROOT)/include - LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn -Wl,-rpath,'$${ORIGIN}' + LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn endif # setup opencv @@ -601,7 +602,7 @@ DMLCCORE: ifeq ($(USE_TVM_OP), 1) LIB_DEP += lib/libtvm_runtime.so lib/libtvmop.so CFLAGS += -I$(TVM_PATH)/include -DMXNET_USE_TVM_OP=1 -LDFLAGS += -L$(ROOTDIR)/lib -ltvm_runtime -Wl,-rpath,'$${ORIGIN}' +LDFLAGS += -L$(ROOTDIR)/lib -ltvm_runtime TVM_USE_CUDA := OFF ifeq ($(USE_CUDA), 1) @@ -619,7 +620,7 @@ lib/libtvm_runtime.so: $(MAKE) VERBOSE=1; \ mkdir -p $(ROOTDIR)/lib; \ cp $(TVM_PATH)/build/libtvm_runtime.so $(ROOTDIR)/lib/libtvm_runtime.so; \ - ls $(ROOTDIR); \ + ls $(ROOTDIR)/lib; \ cd $(ROOTDIR) lib/libtvmop.so: lib/libtvm_runtime.so $(wildcard contrib/tvmop/*/*.py contrib/tvmop/*.py) diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index fd8005356ad7..d8e9c21392d3 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -854,6 +854,8 @@ sanity_check() { } unittest_ubuntu_python2_cpu_cython() { + ls ./lib/ + ldd ./lib/libmxnet.so set -ex export PYTHONPATH=./python/ export MXNET_MKLDNN_DEBUG=1