From ec83d38fcce88cc7c34ff81c857e4e8cb004182c Mon Sep 17 00:00:00 2001 From: AlexHTHung Date: Wed, 8 Apr 2020 13:16:13 +0800 Subject: [PATCH] [build] Fix error building biglib without CUDA (#4031) Error message: g++: error: cudafeat/kaldi-*.a: No such file or directory g++: error: cudadecoder/kaldi-*.a: No such file or directory Makefile:67: recipe for target 'biglib' failed make: *** [biglib] Error 1 --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 07b7947f3b1..c50810297fc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -61,11 +61,11 @@ endif biglib: $(SUBDIRS_LIB) ifeq ($(KALDI_FLAVOR), dynamic) ifeq ($(shell uname), Darwin) - $(CXX) -dynamiclib -o $(KALDILIBDIR)/libkaldi.dylib -install_name @rpath/libkaldi.dylib -framework Accelerate $(LDFLAGS) $(SUBDIRS_LIB:=/*.dylib) + $(CXX) -dynamiclib -o $(KALDILIBDIR)/libkaldi.dylib -install_name @rpath/libkaldi.dylib -framework Accelerate $(LDFLAGS) $(wildcard $(SUBDIRS_LIB:=/*.dylib)) else ifeq ($(shell uname), Linux) #$(warning the following command will probably fail, in that case add -fPIC to your CXXFLAGS and remake all) - $(CXX) -shared -o $(KALDILIBDIR)/$(KALDI_SONAME) -Wl,-soname=$(KALDI_SONAME),--whole-archive $(SUBDIRS_LIB:=/kaldi-*.a) $(LDLIBS) -Wl,--no-whole-archive + $(CXX) -shared -o $(KALDILIBDIR)/$(KALDI_SONAME) -Wl,-soname=$(KALDI_SONAME),--whole-archive $(wildcard $(SUBDIRS_LIB:=/kaldi-*.a)) -Wl,--no-whole-archive $(LDLIBS) else $(error Dynamic libraries not supported on this platform. Run configure with --static flag. ) endif