alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
900 stars 243 forks source link

make errors #101

Closed ben-8878 closed 3 years ago

ben-8878 commented 3 years ago

g++ -shared -o libkaldi-matrix.so -Wl,--as-needed -Wl,-soname=libkaldi-matrix.so,--whole-archive kaldi-matrix.a -Wl,--no-whole-archive -Wl,-rpath=/opt/kaldi/tools/openfst-1.8.0/lib -rdynamic -Wl,-rpath=/opt/kaldi/src/lib ../base/libkaldi-base.so /opt/kaldi/tools/openfst-1.8.0/lib/libfst.so -L/opt/kaldi/tools/OpenBLAS/install/lib -l:libopenblas.a -l:libblas.a -l:liblapack.a -l:libf2c.a -lm -lpthread -ldl /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(fmt.c.o): relocation R_X86_64_PC32 against symbolfelist' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(sfe.c.o): relocation R_X86_64_PC32 against symbol f__fmtbuf' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(wsfe.c.o): relocation R_X86_64_PC32 against symbolfcursor' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(sig_die.c.o): relocation R_X86_64_PC32 against symbol stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(f77_aloc.c.o): relocation R_X86_64_PC32 against symbolstderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(close.c.o): relocation R_X86_64_PC32 against symbol f__units' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(endfile.c.o): relocation R_X86_64_PC32 against symbolfunits' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(err.c.o): relocation R_X86_64_PC32 against symbol stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(open.c.o): relocation R_X86_64_PC32 against symbolf__buflen' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(wrtfmt.c.o): relocation R_X86_64_PC32 against symbol `fcursor' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /opt/kaldi/tools/OpenBLAS/install/lib/libf2c.a(wref.c.o): relocation R_X86_64_PC32 against symbol f__scale' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: nonrepresentable section on output collect2: error: ld returned 1 exit status make[1]: *** [../makefiles/default_rules.mk:53: libkaldi-matrix.so] Error 1 make[1]: Leaving directory '/opt/kaldi/src/matrix' make: *** [Makefile:136: matrix] Error 2

nshmyrev commented 3 years ago

What is that? Would you be able to provide some details?

ben-8878 commented 3 years ago

@nshmyrev thanks,i have solved it,add codes "set(CMAKE_POSITION_INDEPENDENT_CODE ON) " in the beginging of Cmake file

nshmyrev commented 3 years ago

Ok, great.

I think we have that change already

https://github.com/alphacep/clapack/commit/4be8cb76121e6bd4156cf59d8bdb07ab757d9844