Skip to content

Commit ec83d38

Browse files
authored
[build] Fix error building biglib without CUDA (kaldi-asr#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
1 parent fa95730 commit ec83d38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ endif
6161
biglib: $(SUBDIRS_LIB)
6262
ifeq ($(KALDI_FLAVOR), dynamic)
6363
ifeq ($(shell uname), Darwin)
64-
$(CXX) -dynamiclib -o $(KALDILIBDIR)/libkaldi.dylib -install_name @rpath/libkaldi.dylib -framework Accelerate $(LDFLAGS) $(SUBDIRS_LIB:=/*.dylib)
64+
$(CXX) -dynamiclib -o $(KALDILIBDIR)/libkaldi.dylib -install_name @rpath/libkaldi.dylib -framework Accelerate $(LDFLAGS) $(wildcard $(SUBDIRS_LIB:=/*.dylib))
6565
else
6666
ifeq ($(shell uname), Linux)
6767
#$(warning the following command will probably fail, in that case add -fPIC to your CXXFLAGS and remake all)
68-
$(CXX) -shared -o $(KALDILIBDIR)/$(KALDI_SONAME) -Wl,-soname=$(KALDI_SONAME),--whole-archive $(SUBDIRS_LIB:=/kaldi-*.a) $(LDLIBS) -Wl,--no-whole-archive
68+
$(CXX) -shared -o $(KALDILIBDIR)/$(KALDI_SONAME) -Wl,-soname=$(KALDI_SONAME),--whole-archive $(wildcard $(SUBDIRS_LIB:=/kaldi-*.a)) -Wl,--no-whole-archive $(LDLIBS)
6969
else
7070
$(error Dynamic libraries not supported on this platform. Run configure with --static flag. )
7171
endif

0 commit comments

Comments
 (0)