meta-agl-devel: remove meta-agl-wireless-monitor
[AGL/meta-agl-devel.git] / meta-offline-voice-agent / recipes-vosk / vosk-kaldi / vosk-kaldi / 0001-Fixes-for-shared-library-compilation.patch
1 From 4fc5d1df4dca9b7faaf630d43b32a85d80d16eb3 Mon Sep 17 00:00:00 2001
2 From: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
3 Date: Thu, 14 Jul 2022 11:00:07 +0000
4 Subject: [PATCH] Fixes for shared library compilation
5
6 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
7 ---
8  src/configure                   | 2 +-
9  src/fstbin/Makefile             | 3 ++-
10  src/latbin/Makefile             | 3 ++-
11  src/makefiles/linux_openblas.mk | 2 +-
12  src/matrix/Makefile             | 2 +-
13  src/rnnlmbin/Makefile           | 2 +-
14  6 files changed, 8 insertions(+), 6 deletions(-)
15
16 diff --git a/src/configure b/configure
17 index c74d67af8..2aaf541c3 100755
18 --- a/configure
19 +++ b/configure
20 @@ -232,7 +232,7 @@ You need $supported_compiler."
21  
22  function check_for_slow_expf {
23    # We cannot run this test if we are cross compiling.
24 -  if [[ "$TARGET_ARCH" == "`uname -m`" ]] ; then
25 +  if false ; then
26      ( cd probe
27        rm -f exp-test
28        make -f Makefile.slow_expf 1>/dev/null
29 diff --git a/fstbin/Makefile b/fstbin/Makefile
30 index a22c014a7..5a29030c3 100644
31 --- a/fstbin/Makefile
32 +++ b/fstbin/Makefile
33 @@ -26,6 +26,7 @@ TESTFILES =
34  LIBFILE =
35  
36  ADDLIBS = ../decoder/kaldi-decoder.a ../fstext/kaldi-fstext.a \
37 -          ../util/kaldi-util.a ../matrix/kaldi-matrix.a ../base/kaldi-base.a 
38 +          ../util/kaldi-util.a ../matrix/kaldi-matrix.a ../base/kaldi-base.a \
39 +          ../hmm/kaldi-hmm.a ../lat/kaldi-lat.a ../tree/kaldi-tree.a
40  
41  include ../makefiles/default_rules.mk
42 diff --git a/latbin/Makefile b/latbin/Makefile
43 index d5cc4d035..902bf1058 100644
44 --- a/latbin/Makefile
45 +++ b/latbin/Makefile
46 @@ -36,6 +36,7 @@ TESTFILES =
47  ADDLIBS = ../rnnlm/kaldi-rnnlm.a ../nnet3/kaldi-nnet3.a \
48            ../cudamatrix/kaldi-cudamatrix.a ../lat/kaldi-lat.a ../lm/kaldi-lm.a \
49            ../fstext/kaldi-fstext.a ../hmm/kaldi-hmm.a ../tree/kaldi-tree.a \
50 -          ../util/kaldi-util.a ../matrix/kaldi-matrix.a ../base/kaldi-base.a 
51 +          ../util/kaldi-util.a ../matrix/kaldi-matrix.a ../base/kaldi-base.a \
52 +          ../chain/kaldi-chain.a ../decoder/kaldi-decoder.a
53  
54  include ../makefiles/default_rules.mk
55 diff --git a/makefiles/linux_openblas.mk b/makefiles/linux_openblas.mk
56 index 1ac67c355..bb15f84a5 100644
57 --- a/makefiles/linux_openblas.mk
58 +++ b/makefiles/linux_openblas.mk
59 @@ -19,7 +19,7 @@ ifndef OPENBLASLIBS
60  $(error OPENBLASLIBS not defined.)
61  endif
62  
63 -CXXFLAGS = -std=c++17 -I.. -isystem $(OPENFSTINC) -O1 $(EXTRA_CXXFLAGS) \
64 +CXXFLAGS = -std=c++17 -I.. -I $(OPENFSTINC) -O1 $(EXTRA_CXXFLAGS) \
65             -Wall -Wno-sign-compare -Wno-unused-local-typedefs \
66             -Wno-deprecated-declarations -Winit-self \
67             -DKALDI_DOUBLEPRECISION=$(DOUBLE_PRECISION) \
68 diff --git a/matrix/Makefile b/matrix/Makefile
69 index 398179a35..bec14e089 100644
70 --- a/matrix/Makefile
71 +++ b/matrix/Makefile
72 @@ -10,7 +10,7 @@ include ../kaldi.mk
73  
74  # you can uncomment matrix-lib-speed-test if you want to do the speed tests.
75  
76 -TESTFILES = matrix-lib-test sparse-matrix-test numpy-array-test #matrix-lib-speed-test
77 +#TESTFILES = matrix-lib-test sparse-matrix-test numpy-array-test #matrix-lib-speed-test
78  
79  OBJFILES = kaldi-matrix.o kaldi-vector.o packed-matrix.o sp-matrix.o tp-matrix.o \
80             matrix-functions.o qr.o srfft.o compressed-matrix.o \
81 diff --git a/rnnlmbin/Makefile b/rnnlmbin/Makefile
82 index 23a8eba61..d801b90d8 100644
83 --- a/rnnlmbin/Makefile
84 +++ b/rnnlmbin/Makefile
85 @@ -21,6 +21,6 @@ ADDLIBS = ../rnnlm/kaldi-rnnlm.a ../nnet3/kaldi-nnet3.a \
86            ../lat/kaldi-lat.a ../lm/kaldi-lm.a ../fstext/kaldi-fstext.a \
87            ../hmm/kaldi-hmm.a ../transform/kaldi-transform.a ../gmm/kaldi-gmm.a \
88            ../tree/kaldi-tree.a ../util/kaldi-util.a ../matrix/kaldi-matrix.a \
89 -          ../base/kaldi-base.a 
90 +          ../base/kaldi-base.a ../chain/kaldi-chain.a
91  
92  include ../makefiles/default_rules.mk
93 -- 
94 2.33.0
95