我在编译 Kaldi 时遇到了一些问题wasm
:https ://gitlab.inria.fr/kaldi.web/kaldi-wasm/-/wikis/build_details.md#cpp-bind
我首先按照这些指示编译了 clapack-wasm:https ://prod-gitlab.inria.fr/kaldi.web/clapack-wasm 并得到了以下文件:
(base) marco@pc:~/cpp/kaldi/clapack-wasm/libf2c$ ls -lah | grep libf2c.a
-rw-rw-r-- 1 marco marco 175K mag 10 09:48 libf2c.a
(base) marco@pc:~/cpp/kaldi/clapack-wasm/f2c_BLAS-3.8.0$ ls -lah | grep blas.a
-rw-rw-r-- 1 marco marco 463K mag 10 09:48 blas.a
(base) marco@pc:~/cpp/kaldi/clapack-wasm/CBLAS/lib$ ls -lah
total 180K
drwxrwxr-x 2 marco marco 4,0K mag 10 09:49 .
drwxrwxr-x 7 marco marco 4,0K mag 10 09:48 ..
-rw-rw-r-- 1 marco marco 172K mag 10 09:49 cblas.a
我将 Kaldi 配置为wasm
:
(base) marco@pc:~/cpp/kaldi/src$ emconfigure ./configure --use-cuda=no --static --clapack-root=/home/marco/cpp/kaldi/clapack-wasm --host=WASM
configure: ./configure --use-cuda=no --static --clapack-root=/home/marco/cpp/kaldi/clapack-wasm --host=WASM
Configuring KALDI to use CLAPACK.
Checking compiler /home/marco/emsdk-master/upstream/emscripten/em++ ...
WARNING: Unfamiliar compiler /home/marco/emsdk-master/upstream/emscripten/em++. Use at your risk and peril.
Checking OpenFst library in /home/marco/cpp/kaldi/tools/openfst-1.7.2 ...
Performing OS specific configuration ...
On Linux: Checking for linear algebra header files ...
Using CLAPACK libs from /home/marco/cpp/kaldi/clapack-wasm as the linear algebra library.
Warning (CLAPACK): this part of the configure process is not properly tested and may not work.
Successfully configured for Linux with CLAPACK libs from /home/marco/cpp/kaldi/clapack-wasm
INFO: Configuring Kaldi not to link with Speex. Don't worry, it's only needed if
you intend to use 'compress-uncompress-speex', which is very unlikely.
Kaldi has been successfully configured. To compile:
make -j clean depend; make -j <NCPU>
where <NCPU> is the number of parallel builds you can afford to do. If unsure,
use the smaller of the number of CPUs or the amount of RAM in GB divided by 2,
to stay within safe limits. 'make -j' without the numeric value may not limit
the number of parallel jobs at all, and overwhelm even a powerful workstation,
since Kaldi build is highly parallelized.
(base) marco@pc:~/cpp/kaldi/src$
但是,然后,我得到这些错误:
(base) marco@pc:~/cpp/kaldi/src$ make -j 7 clean depend
make -C base/ depend
make -C matrix/ depend
make -C util/ depend
make -C feat/ depend
make -C cudafeat/ depend
make -C tree/ depend
make -C gmm/ depend
make[1]: Entering directory '/home/marco/cpp/kaldi/src/base'
make[1]: Entering directory '/home/marco/cpp/kaldi/src/matrix'
make[1]: Entering directory '/home/marco/cpp/kaldi/src/util'
make[1]: Entering directory '/home/marco/cpp/kaldi/src/cudafeat'
make[1]: Entering directory '/home/marco/cpp/kaldi/src/tree'
make[1]: Entering directory '/home/marco/cpp/kaldi/src/gmm'
make[1]: Entering directory '/home/marco/cpp/kaldi/src/feat'
rm -f .depend.mk
/home/marco/emsdk-master/upstream/emscripten/em++ -M -std=c++14 -I.. -isystem /home/marco/cpp/kaldi/tools/openfst-1.7.2/include -O1 -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK -I../../tools/CLAPACK -msse -msse2 -g -Wno-mismatched-tags feature-online-batched-cmvn-cuda.cc online-cuda-feature-pipeline.cc feature-online-batched-ivector-cuda.cc feature-online-batched-spectral-cuda.cc online-batched-feature-pipeline-cuda.cc online-ivector-feature-cuda.cc >> .depend.mk
rm -f .depend.mk
/home/marco/emsdk-master/upstream/emscripten/em++ -M -std=c++14 -I.. -isystem /home/marco/cpp/kaldi/tools/openfst-1.7.2/include -O1 -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK -I../../tools/CLAPACK -msse -msse2 -g -Wno-mismatched-tags matrix-lib-test.cc sparse-matrix.cc optimization.cc sparse-matrix-test.cc numpy-array-test.cc kaldi-vector.cc packed-matrix.cc matrix-lib-speed-test.cc kaldi-matrix.cc matrix-functions.cc qr.cc numpy-array.cc tp-matrix.cc sp-matrix.cc srfft.cc compressed-matrix.cc >> .depend.mk
rm -f .depend.mk
/home/marco/emsdk-master/upstream/emscripten/em++ -M -std=c++14 -I.. -isystem /home/marco/cpp/kaldi/tools/openfst-1.7.2/include -O1 -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK -I../../tools/CLAPACK -msse -msse2 -g -Wno-mismatched-tags edit-distance-test.cc kaldi-table-test.cc text-utils-test.cc hash-list-test.cc simple-io-funcs.cc simple-options-test.cc const-integer-set-test.cc kaldi-holder.cc kaldi-table.cc parse-options-test.cc simple-options.cc kaldi-thread-test.cc kaldi-io-test.cc parse-options.cc text-utils.cc stl-utils-test.cc kaldi-thread.cc kaldi-io.cc kaldi-semaphore.cc >> .depend.mk
rm -f .depend.mk
/home/marco/emsdk-master/upstream/emscripten/em++ -M -std=c++14 -I.. -isystem /home/marco/cpp/kaldi/tools/openfst-1.7.2/include -O1 -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK -I../../tools/CLAPACK -msse -msse2 -g -Wno-mismatched-tags feature-sdc-test.cc signal-test.cc feature-fbank-test.cc wave-reader-test.cc feature-plp-test.cc pitch-functions-test.cc feature-functions-test.cc resample-test.cc online-feature.cc feature-mfcc-test.cc signal.cc online-feature-test.cc wave-reader.cc feature-fbank.cc feature-plp.cc pitch-functions.cc feature-functions.cc resample.cc feature-mfcc.cc feature-spectrogram.cc mel-computations.cc feature-window.cc >> .depend.mk
rm -f .depend.mk
rm -f .depend.mk
/home/marco/emsdk-master/upstream/emscripten/em++ -M -std=c++14 -I.. -isystem /home/marco/cpp/kaldi/tools/openfst-1.7.2/include -O1 -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK -I../../tools/CLAPACK -msse -msse2 -g -Wno-mismatched-tags mle-full-gmm.cc mle-am-diag-gmm.cc model-test-common.cc diag-gmm-test.cc full-gmm-test.cc diag-gmm-normal.cc decodable-am-diag-gmm.cc ebw-diag-gmm-test.cc model-common.cc am-diag-gmm.cc full-gmm-normal.cc diag-gmm.cc indirect-diff-diag-gmm.cc am-diag-gmm-test.cc full-gmm.cc mle-diag-gmm-test.cc ebw-diag-gmm.cc mle-full-gmm-test.cc mle-am-diag-gmm-test.cc mle-diag-gmm.cc >> .depend.mk
/home/marco/emsdk-master/upstream/emscripten/em++ -M -std=c++14 -I.. -isystem /home/marco/cpp/kaldi/tools/openfst-1.7.2/include -O1 -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK -I../../tools/CLAPACK -msse -msse2 -g -Wno-mismatched-tags build-tree.cc build-tree-utils-test.cc tree-renderer.cc cluster-utils-test.cc build-tree-questions.cc event-map-test.cc build-tree-utils.cc clusterable-classes.cc context-dep-test.cc cluster-utils.cc build-tree-test.cc event-map.cc context-dep.cc >> .depend.mk
rm -f .depend.mk
em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128!
em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128!
/home/marco/emsdk-master/upstream/emscripten/em++ -M -std=c++14 -I.. -isystem /home/marco/cpp/kaldi/tools/openfst-1.7.2/include -O1 -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Wno-deprecated-declarations -Winit-self -DKALDI_DOUBLEPRECISION=0 -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK -I../../tools/CLAPACK -msse -msse2 -g -Wno-mismatched-tags io-funcs.cc kaldi-math.cc kaldi-error-test.cc kaldi-utils.cc timer-test.cc timer.cc kaldi-error.cc io-funcs-test.cc kaldi-math-test.cc >> .depend.mk
em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128!
../makefiles/default_rules.mk:149: recipe for target 'depend' failed
make[1]: *** [depend] Error 1
make[1]: Leaving directory '/home/marco/cpp/kaldi/src/cudafeat'
Makefile:127: recipe for target 'cudafeat/depend' failed
make: *** [cudafeat/depend] Error 2
make: *** Waiting for unfinished jobs....
em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128!
../makefiles/default_rules.mk:149: recipe for target 'depend' failed
make[1]: *** [depend] Error 1
make[1]: Leaving directory '/home/marco/cpp/kaldi/src/matrix'
Makefile:127: recipe for target 'matrix/depend' failed
make: *** [matrix/depend] Error 2
../makefiles/default_rules.mk:149: recipe for target 'depend' failed
make[1]: *** [depend] Error 1
make[1]: Leaving directory '/home/marco/cpp/kaldi/src/util'
Makefile:127: recipe for target 'util/depend' failed
make: *** [util/depend] Error 2
em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128!
../makefiles/default_rules.mk:149: recipe for target 'depend' failed
make[1]: *** [depend] Error 1
make[1]: Leaving directory '/home/marco/cpp/kaldi/src/feat'
Makefile:127: recipe for target 'feat/depend' failed
make: *** [feat/depend] Error 2
../makefiles/default_rules.mk:149: recipe for target 'depend' failed
make[1]: *** [depend] Error 1
make[1]: Leaving directory '/home/marco/cpp/kaldi/src/tree'
Makefile:127: recipe for target 'tree/depend' failed
make: *** [tree/depend] Error 2
em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128!
../makefiles/default_rules.mk:149: recipe for target 'depend' failed
make[1]: *** [depend] Error 1
make[1]: Leaving directory '/home/marco/cpp/kaldi/src/gmm'
Makefile:127: recipe for target 'gmm/depend' failed
make: *** [gmm/depend] Error 2
em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128!
../makefiles/default_rules.mk:149: recipe for target 'depend' failed
make[1]: *** [depend] Error 1
make[1]: Leaving directory '/home/marco/cpp/kaldi/src/base'
Makefile:127: recipe for target 'base/depend' failed
make: *** [base/depend] Error 2
(base) marco@pc:~/cpp/kaldi/src$
- 操作系统:Ubuntu 18.04.4 桌面
- gcc : gcc 版本 9.3.0 (Ubuntu 9.3.0-11ubuntu0~18.04.1)
如何解决这些错误消息并使其工作?