piiswrong closed pull request #7856: add missing cuda libs to LDFLAGS URL: https://github.com/apache/incubator-mxnet/pull/7856
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/Makefile b/Makefile index 54df33f185..0be8d508e2 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,9 @@ include $(DMLC_CORE)/make/dmlc.mk WARNFLAGS= -Wall -Wsign-compare CFLAGS = -DMSHADOW_FORCE_STREAM $(WARNFLAGS) +# check undefined symbol +LDFLAGS = -Wl,--no-undefined + ifeq ($(DEV), 1) CFLAGS += -g -Werror NVCCFLAGS += -Werror cross-execution-space-call @@ -66,7 +69,7 @@ else CFLAGS += -O3 -DNDEBUG=1 endif CFLAGS += -I$(ROOTDIR)/mshadow/ -I$(ROOTDIR)/dmlc-core/include -fPIC -I$(NNVM_PATH)/include -I$(DLPACK_PATH)/include -Iinclude $(MSHADOW_CFLAGS) -LDFLAGS = -pthread $(MSHADOW_LDFLAGS) $(DMLC_LDFLAGS) +LDFLAGS += -pthread $(MSHADOW_LDFLAGS) $(DMLC_LDFLAGS) ifeq ($(DEBUG), 1) NVCCFLAGS += -std=c++11 -Xcompiler -D_FORCE_INLINES -g -G -O0 -ccbin $(CXX) $(MSHADOW_NVCCFLAGS) else @@ -272,7 +275,7 @@ ALL_DEP = $(OBJ) $(EXTRA_OBJ) $(PLUGIN_OBJ) $(LIB_DEP) ifeq ($(USE_CUDA), 1) CFLAGS += -I$(ROOTDIR)/cub ALL_DEP += $(CUOBJ) $(EXTRA_CUOBJ) $(PLUGIN_CUOBJ) - LDFLAGS += -lcuda -lcufft + LDFLAGS += -lcuda -lcufft -lcublas -lcusolver -lcurand -lcudart SCALA_PKG_PROFILE := $(SCALA_PKG_PROFILE)-gpu else SCALA_PKG_PROFILE := $(SCALA_PKG_PROFILE)-cpu ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services