From 1dfd79012b1f7b5c58ba20575948ab902d2c8f1f Mon Sep 17 00:00:00 2001 From: John Gebbie Date: Sun, 5 Feb 2023 12:10:37 +0000 Subject: [PATCH 1/2] vosk-api: update to 0.3.45. --- common/shlibs | 2 +- srcpkgs/vosk-api/template | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/shlibs b/common/shlibs index 59444164928b..bc77277ce8d1 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4213,7 +4213,7 @@ libtracecmd.so.1 libtracecmd-3.1.2_1 libkshark.so.2 libkshark-2.1.1_1 libcpp-hocon.so.0.3.0 cpp-hocon-0.3.0_5 libfst.so.25 openfst-1.8.2_1 -libvosk.so vosk-api-0.3.43_1 +libvosk.so vosk-api-0.3.45_1 libdspy-1.so.1 d-spy-1.4.0_1 libpanel-1.so.1 libpanel-1.0.1_1 libqrtr.so.1 qrtr-ns-1.0_1 diff --git a/srcpkgs/vosk-api/template b/srcpkgs/vosk-api/template index b86c74452b95..41d53e654042 100644 --- a/srcpkgs/vosk-api/template +++ b/srcpkgs/vosk-api/template @@ -1,12 +1,12 @@ # Template file for 'vosk-api' pkgname=vosk-api -version=0.3.43 +version=0.3.45 revision=1 create_wrksrc=yes build_wrksrc="vosk-api-${version}/src" # Vosk is built with their own vendored version of Kaldi which has no releases # of its own, so the commit must be determined by the date of the vosk release. -_kaldi_commit=ecb4b47159501ef0d67888633e65b8fc0c1f79d1 +_kaldi_commit=93ef0019b847272a239fbb485ef97f29feb1d587 build_style=gnu-makefile make_use_env=yes make_build_args="KALDI_ROOT=../../kaldi HAVE_OPENBLAS_NO_F2C=1 HAVE_OPENBLAS_CLAPACK=0" @@ -18,8 +18,8 @@ homepage="https://alphacephei.com/vosk" distfiles="https://github.com/alphacep/vosk-api/archive/v${version}/vosk-api-${version}.tar.gz https://github.com/alphacep/kaldi/archive/${_kaldi_commit}.tar.gz https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip" -checksum="50fa82bfbfe3fc5be868237c84ac180eb55da0b65b1803bf022899673afda024 - 39cadd5a351a5513e3e4e1f71ac4b4f018a592a856a55f1d32c159e22e799f64 +checksum="930fb9cfa6c1b3035d3730feee7d670fb893caa0c71bd2159ee7623102674c26 + f47a996af546884a8e1cb961323b796c5c238c1bbeabaf657bb300b760e431b2 30f26242c4eb449f948e42cb302dd7a686cb29a3423a8367f99ff41780942498" shlib_provides="libvosk.so" patch_args="-Np1 -d ${pkgname}-${version}" From 3714c762f47b91a303def8e9c8608f99c935f9aa Mon Sep 17 00:00:00 2001 From: John Gebbie Date: Sun, 5 Feb 2023 12:59:28 +0000 Subject: [PATCH 2/2] openfst: unrestrict archs --- srcpkgs/openfst/patches/32bit.patch | 71 +++++++++++++++++++++ srcpkgs/openfst/patches/cross-compile.patch | 23 ------- srcpkgs/openfst/template | 5 +- 3 files changed, 72 insertions(+), 27 deletions(-) create mode 100644 srcpkgs/openfst/patches/32bit.patch delete mode 100644 srcpkgs/openfst/patches/cross-compile.patch diff --git a/srcpkgs/openfst/patches/32bit.patch b/srcpkgs/openfst/patches/32bit.patch new file mode 100644 index 000000000000..78953f3afb21 --- /dev/null +++ b/srcpkgs/openfst/patches/32bit.patch @@ -0,0 +1,71 @@ +This removes checks which stops at least i686 natively compiling: +https://github.com/kaldi-asr/kaldi/issues/4808 + +diff --git a/configure.ac b/configure.ac +index a2328ff..ddacaae 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -149,39 +149,6 @@ AC_ARG_WITH([libfstdir], + + AC_SUBST([libfstdir], $with_libfstdir) + +-# Flags may be changed after configuring, so this is checked again by +-# weight_test.cc. The check here is to save time in the common case, +-# or when someone does not run `make check`. +-AC_RUN_IFELSE([AC_LANG_PROGRAM([ +- #include +- +- template +- bool FloatEqIsReflexive(T m) { +- volatile T x = 1.111; +- x *= m; +- +- T y = 1.111; +- y *= m; +- +- return x == y; +- } +- ], [ +- volatile double test_value = 1.1; +- if (!FloatEqIsReflexive(static_cast(test_value))) { +- printf("float FAIL\n"); +- return 1; +- } +- if (!FloatEqIsReflexive(test_value)) { +- printf("double FAIL\n"); +- return 1; +- } +- ])], +- [echo "Float equality is good"], +- [AC_MSG_FAILURE(m4_normalize([ +- Test float equality failed! +- Compile with -msse -mfpmath=sse if using g++. +- ]))]) +- + AC_CHECK_LIB([dl], dlopen, [DL_LIBS=-ldl]) + AC_SUBST([DL_LIBS]) + +diff --git a/src/include/fst/float-weight.h b/src/include/fst/float-weight.h +index 5cf4386..38b7d48 100644 +--- a/src/include/fst/float-weight.h ++++ b/src/include/fst/float-weight.h +@@ -109,6 +109,19 @@ class FloatWeightTpl { + // Single-precision float weight. + using FloatWeight = FloatWeightTpl; + ++template ++constexpr bool operator==(const FloatWeightTpl &w1, ++ const FloatWeightTpl &w2) { ++#if (defined(__i386__) || defined(__x86_64__)) && !defined(__SSE2_MATH__) ++// With i387 instructions, excess precision on a weight in an 80-bit ++// register may cause it to compare unequal to that same weight when ++// stored to memory. This breaks =='s reflexivity, in turn breaking ++// NaturalLess. ++#error "Please compile with -msse -mfpmath=sse, or equivalent." ++#endif ++ return w1.Value() == w2.Value(); ++} ++ + // These seemingly unnecessary overloads are actually needed to make + // comparisons like FloatWeightTpl == float compile. If only the + // templated version exists, the FloatWeightTpl(float) conversion diff --git a/srcpkgs/openfst/patches/cross-compile.patch b/srcpkgs/openfst/patches/cross-compile.patch deleted file mode 100644 index 4014f51dba38..000000000000 --- a/srcpkgs/openfst/patches/cross-compile.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 256f83e52112a5cd37e37a34beff2c4f0eae4660 Mon Sep 17 00:00:00 2001 -From: Nickolay Shmyrev -Date: Tue, 16 Jun 2020 15:22:19 +0200 -Subject: [PATCH] Don't fail on cross-compile - ---- - configure.ac | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index d52ed02..0f53b4d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -180,7 +180,8 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([ - [AC_MSG_FAILURE(m4_normalize([ - Test float equality failed! - Compile with -msse -mfpmath=sse if using g++. -- ]))]) -+ ]))], -+ [echo "Ignoring test for cross-compilation"]) - - AC_CHECK_LIB([dl], dlopen, [DL_LIBS=-ldl]) - AC_SUBST([DL_LIBS]) diff --git a/srcpkgs/openfst/template b/srcpkgs/openfst/template index 1e62d249f83c..aa5385d2187f 100644 --- a/srcpkgs/openfst/template +++ b/srcpkgs/openfst/template @@ -1,10 +1,7 @@ # Template file for 'openfst' pkgname=openfst version=1.8.2 -revision=1 -# Limiting archs until resolved why a test fails when natively compiling i686: -# https://github.com/kaldi-asr/kaldi/issues/4808 -archs="x86_64* aarch64*" +revision=2 build_style=gnu-configure configure_args=" --disable-bin