Skip to content

Commit

Permalink
[build] Fix error building biglib without CUDA (kaldi-asr#4031)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alex-ht authored Apr 8, 2020
1 parent fa95730 commit ec83d38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec83d38

Please sign in to comment.