Package Details: kaldi 5.5.r9264.9af2c5c16-1

Git Clone URL: https://aur.archlinux.org/kaldi.git (read-only, click to copy)
Package Base: kaldi
Description: Speech recognition research toolkit
Upstream URL: https://github.com/kaldi-asr/kaldi
Licenses: Apache
Submitter: petronny
Maintainer: petronny
Last Packager: petronny
Votes: 4
Popularity: 0.010994
First Submitted: 2016-11-01 10:54 (UTC)
Last Updated: 2022-07-23 11:36 (UTC)

Pinned Comments

petronny commented on 2020-09-03 08:21 (UTC)

Prebuilt binaries of this package and its dependencies can be found in the arch4edu repository.

Latest Comments

omega16 commented on 2021-01-24 06:47 (UTC)

The kaldi tools/extra folder has script "check_dependencies.sh" if you run it it would tell you what you need to compile, in my case I can compile kaldi after install :

  • gcc-fortran
  • intel-mkl
  • subversion

rageltman commented on 2021-01-12 04:15 (UTC)

The package is failing to build, throwing:

[2021-01-12T03:57:05.296Z] make -C base
[2021-01-12T03:57:05.296Z] make[1]: Entering directory '/build/kaldi/src/kaldi/src/base'
[2021-01-12T03:57:05.296Z] g++ -std=c++11 -I.. -isystem /opt/kaldi/tools/openfst-1.6.7/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 -pthread -g -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DKALDI_NO_EXPF -D_FORTIFY_SOURCE=2  -c -o kaldi-math.o kaldi-math.cc
[2021-01-12T03:57:05.296Z] g++ -std=c++11 -I.. -isystem /opt/kaldi/tools/openfst-1.6.7/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 -pthread -g -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DKALDI_NO_EXPF -D_FORTIFY_SOURCE=2  -c -o kaldi-error.o kaldi-error.cc
[2021-01-12T03:57:05.296Z] g++ -std=c++11 -I.. -isystem /opt/kaldi/tools/openfst-1.6.7/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 -pthread -g -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DKALDI_NO_EXPF -D_FORTIFY_SOURCE=2  -c -o io-funcs.o io-funcs.cc
[2021-01-12T03:57:05.296Z] g++ -std=c++11 -I.. -isystem /opt/kaldi/tools/openfst-1.6.7/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 -pthread -g -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DKALDI_NO_EXPF -D_FORTIFY_SOURCE=2  -c -o kaldi-utils.o kaldi-utils.cc
[2021-01-12T03:57:05.296Z] g++ -std=c++11 -I.. -isystem /opt/kaldi/tools/openfst-1.6.7/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 -pthread -g -fPIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DKALDI_NO_EXPF -D_FORTIFY_SOURCE=2  -c -o timer.o timer.cc
[2021-01-12T03:57:05.296Z] ar -cr kaldi-base.a kaldi-math.o kaldi-error.o io-funcs.o kaldi-utils.o timer.o
[2021-01-12T03:57:05.296Z] ranlib kaldi-base.a
[2021-01-12T03:57:05.296Z] g++ -shared -o libkaldi-base.so -Wl,--as-needed  -Wl,-soname=libkaldi-base.so,--whole-archive kaldi-base.a -Wl,--no-whole-archive  -Wl,-rpath=/opt/kaldi/tools/openfst-1.6.7/lib -rdynamic -lcblas -llapack -Wl,-rpath=/build/kaldi/src/kaldi/src/lib  /opt/kaldi/tools/openfst-1.6.7/lib/libfst.so /usr/CLAPACK-3.2.1/lapack.a /usr/CLAPACK-3.2.1/libcblaswr.a /usr/CBLAS/lib/cblas.a /usr/f2c_BLAS-3.8.0/blas.a /usr/libf2c/libf2c.a -lm -lpthread -ldl
[2021-01-12T03:57:05.296Z] g++: error: /usr/CLAPACK-3.2.1/lapack.a: No such file or directory
[2021-01-12T03:57:05.296Z] g++: error: /usr/CLAPACK-3.2.1/libcblaswr.a: No such file or directory
[2021-01-12T03:57:05.296Z] g++: error: /usr/CBLAS/lib/cblas.a: No such file or directory
[2021-01-12T03:57:05.296Z] g++: error: /usr/f2c_BLAS-3.8.0/blas.a: No such file or directory
[2021-01-12T03:57:05.296Z] g++: error: /usr/libf2c/libf2c.a: No such file or directory
[2021-01-12T03:57:05.296Z] make[1]: *** [../makefiles/default_rules.mk:53: libkaldi-base.so] Error 1
[2021-01-12T03:57:05.296Z] make[1]: Leaving directory '/build/kaldi/src/kaldi/src/base'
[2021-01-12T03:57:05.296Z] make: *** [Makefile:136: base] Error 2
[2021-01-12T03:57:05.296Z] ==> ERROR: A failure occurred in build().
[2021-01-12T03:57:05.296Z]     Aborting...
script returned exit code 255

simona commented on 2020-09-03 11:04 (UTC)

thx @petronny

petronny commented on 2020-09-03 08:21 (UTC)

Prebuilt binaries of this package and its dependencies can be found in the arch4edu repository.

petronny commented on 2020-09-03 08:20 (UTC) (edited on 2021-02-24 06:42 (UTC) by petronny)

@simona This PKGBUILD is tested in a clean chroot.

If you can't build it yourself, you can use the prebuilt binary.

simona commented on 2020-08-31 15:05 (UTC) (edited on 2020-08-31 15:05 (UTC) by simona)

do not compile anymore. require "cub" package? whats is cub? how i can install cub?

aa13q commented on 2020-04-13 13:44 (UTC)

Hello! Thank you for the pkgbuild! Since gcc version 9 is here, maybe use default g++ (without version suffix) and remove gcc7 dependency?

jazztickets commented on 2018-05-23 15:38 (UTC)

subversion needs to be added as a dep

AnySomebody commented on 2017-11-24 16:19 (UTC)

Is openblas-lapack maybe optional? From the projects page: "OpenBLAS: this is an alernative to ATLAS or CLAPACK. The scripts don't use it by default but we provide installation scripts so you can install it if you want to compare it against ATLAS (it's more actively maintained than ATLAS)."

petronny commented on 2017-11-01 05:11 (UTC)

@jprobichaud This package should work now.

jprobichaud commented on 2017-10-31 14:46 (UTC) (edited on 2017-10-31 14:47 (UTC) by jprobichaud)

I just tried to build with yaourt and I'm getting an error while openfst gets built (note that I already installed the aur/openfst package, could that be it?) /bin/sh ../../libtool --tag=CXX --mode=compile g++-5 -DHAVE_CONFIG_H -I./../include -D_FORTIFY_SOURCE=2 -fno-exceptions -funsigned-char -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=c++11 -MT symbol-table-ops.lo -MD -MP -MF $depbase.Tpo -c -o symbol-table-ops.lo symbol-table-ops.cc &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: g++-5 -DHAVE_CONFIG_H -I./../include -D_FORTIFY_SOURCE=2 -fno-exceptions -funsigned-char -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=c++11 -MT symbol-table-ops.lo -MD -MP -MF .deps/symbol-table-ops.Tpo -c symbol-table-ops.cc -fPIC -DPIC -o .libs/symbol-table-ops.o symbol-table-ops.cc: In function 'bool fst::AddAuxiliarySymbols(const string&, int64, int64, fst::SymbolTable*)': symbol-table-ops.cc:114:43: error: 'to_string' is not a member of 'std' if (index != syms->AddSymbol(prefix + std::to_string(i), index)) { ^

imriss commented on 2017-08-08 10:58 (UTC) (edited on 2017-08-08 11:04 (UTC) by imriss)

@petronny thanks, however that is for all the compilers (not just for gcc5). Is it possible to add something like this to the build() part of the PKGBUILD? build () { export CXXFLAGS="$(printf '%s' "$CXXFLAGS" | sed 's/-fno-plt//')"

petronny commented on 2017-08-08 05:24 (UTC)

@imriss this flag is in your /etc/makepkg.conf remove it yourself

imriss commented on 2017-08-08 02:08 (UTC) (edited on 2017-08-08 02:21 (UTC) by imriss)

Any advise: g++-5: error: unrecognized command line option '-fno-plt' Thanks PS. It needs to be removed from CXXFLAGS (https://bugs.archlinux.org/task/54855) PS2. An example for cmake build: -DCMAKE_CXX_FLAGS:STRING="$(printf '%s' "$CXXFLAGS" | sed 's/-fno-plt//')" PS3. It seems the flag is used in openfst build.

johncf commented on 2017-03-25 07:29 (UTC)

@petronny Thanks. I just made a minor change in sed regex to make it slightly simpler. I tested a clean build using this without cuda support. So I wouldn't expect any errors with it either, but to be completely sure I'd suggest doing a cuda build with it before updating it.

petronny commented on 2017-03-25 06:31 (UTC)

@critiqjo Thanks for contribution. I will update the PKGBUILD when I confirm it working.

johncf commented on 2017-03-24 11:17 (UTC)

Here's an updated PKGBUILD with all these issues resolved: https://gist.github.com/critiqjo/191557983133cf9f25965486e4188b1e

johncf commented on 2017-03-23 07:43 (UTC)

Grepping through /opt/kaldi for reference to original install location found 56 files (see http://pastebin.com/FrL0hKU8), first 12 of which are config files and can be ignored, but the rest are important ones, that may need to be properly dealt with. Lastly, /opt/kaldi/tools/kaldi_lm has permissions set as rwxr-x--- making it inaccessible to normal users.

johncf commented on 2017-03-23 07:23 (UTC) (edited on 2017-03-23 07:44 (UTC) by johncf)

Requiring cuda, a humongous package, for a building this is a bad deal. Please make it so that the cuda option is added to ./configure if and only if cuda is already installed, as done in python-tensorflow PKGBUILD (https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-tensorflow#n35), and remove it from make dependencies list.

johncf commented on 2017-03-23 07:20 (UTC) (edited on 2017-03-24 08:23 (UTC) by johncf)

The file installed to /opt/kaldi/tools/env.sh refers to the original directory from where it was installed. Also, there's a symbolic link /opt/kaldi/tools/srilm.tgz that refers to the original location. I believe this file is not needed anymore, and can be removed from installation.

petronny commented on 2016-12-02 07:57 (UTC) (edited on 2016-12-02 07:59 (UTC) by petronny)

But I just compiled it successfully without "-std=c++11" 2 days ago.. PS.you can obtain the complied pacakge from https://github.com/arch4edu/arch4edu

jfsantos commented on 2016-11-30 14:44 (UTC)

"-std=c++11" should be added to CXXFLAGS in order to compile correctly.