talonvoice / wav2letter

Facebook AI Research Automatic Speech Recognition Toolkit
Other
23 stars 4 forks source link

Error while building #3

Closed MohitTare closed 4 years ago

MohitTare commented 4 years ago

I am trying to build w2lstream branch for checking out the inference for a TDS model. However getting the below error related to fbgemm. Do we have to specify any additional parameter in cmake to link to fbgemm ?

CMakeFiles/w2lstream.dir/src/libraries/decoder/LexiconFreeSeq2SeqDecoder.cpp.o
[ 90%] Building CXX object CMakeFiles/w2lstream.dir/inference/inference/module/nn/backend/fbgemm/LinearFbGemm.cpp.o
[ 92%] Building CXX object CMakeFiles/w2lstream.dir/inference/inference/module/feature/LogMelFeature.cpp.o
[ 94%] Building CXX object CMakeFiles/w2lstream.dir/src/libraries/lm/ConvLM.cpp.o
[ 96%] Linking CXX shared library libw2lstream.so
/usr/bin/ld: //usr/local/lib/libfbgemm.a(FbgemmFP16.cc.o): relocation R_X86_64_TPOFF32 against `_ZGVZN6fbgemm18cblas_gemm_computeENS_11matrix_op_tEiPKfRKNS_20PackedGemmMatrixFP16EfPfiiE10scratchpad' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: //usr/local/lib/libfbgemm.a(Utils.cc.o): relocation R_X86_64_PC32 against symbol `cpuinfo_isa' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/w2lstream.dir/build.make:1323: recipe for target 'libw2lstream.so' failed
make[2]: *** [libw2lstream.so] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/w2lstream.dir/all' failed
make[1]: *** [CMakeFiles/w2lstream.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
lunixbochs commented 4 years ago

try adding the -fPIC compile flag

MohitTare commented 4 years ago

cool thanks figured it out!