Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails, kaldi.mk: No such file or directory #3395

Closed
wclr opened this issue Jun 16, 2019 · 8 comments
Closed

Build fails, kaldi.mk: No such file or directory #3395

wclr opened this issue Jun 16, 2019 · 8 comments
Labels

Comments

@wclr
Copy link

wclr commented Jun 16, 2019

I'm trying to build a gentle aligner based on kaldi
lowerquality/gentle#224

Recently authors were not very responsive, so I'm asking about the problem here.

I'm building the docker image (you may see what prereq are installed in unbuntu 18.04)
https://github.com/lowerquality/gentle/blob/master/Dockerfile

The image build fails while building kaldi. There used a specific commit of kaldi, I tried with the recent version, a like result.

Script used to build kaldi (https://github.com/lowerquality/gentle/blob/master/ext/install_kaldi.sh):

#!/bin/bash

# Prepare Kaldi
cd kaldi/tools
make clean
make
./extras/install_openblas.sh
cd ../src
make clean
./configure --static --static-math=yes --static-fst=yes --use-cuda=no --openblas-root=../tools/OpenBLAS/install
make depend
cd ../../

Build takes quite a while, but completes with an error:

make[2]: Leaving directory '/gentle/ext/kaldi/tools/OpenBLAS/exports'

 OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)

  OS               ... Linux
  Architecture     ... x86_64
  BINARY           ... 64bit
  C compiler       ... GCC  (command line : cc)
  Fortran compiler ... GFORTRAN  (command line : gfortran)
  Library Name     ... libopenblas_nehalem-r0.3.7.dev.a (Single threaded)

To install the library, you can run "make PREFIX=/path/to/your/installation install".

make -j 2 -f Makefile.install install
make[2]: Entering directory '/gentle/ext/kaldi/tools/OpenBLAS'
make[2]: warning: -jN forced in submake: disabling jobserver mode.
Generating openblas_config.h in /gentle/ext/kaldi/tools/OpenBLAS/install/include
Generating f77blas.h in /gentle/ext/kaldi/tools/OpenBLAS/install/include
Generating cblas.h in /gentle/ext/kaldi/tools/OpenBLAS/install/include
Copying LAPACKE header files to /gentle/ext/kaldi/tools/OpenBLAS/install/include
Copying the static library to /gentle/ext/kaldi/tools/OpenBLAS/install/lib
Copying the shared library to /gentle/ext/kaldi/tools/OpenBLAS/install/lib
Generating openblas.pc in /gentle/ext/kaldi/tools/OpenBLAS/install/lib/pkgconfig
Generating OpenBLASConfig.cmake in /gentle/ext/kaldi/tools/OpenBLAS/install/lib/cmake/openblas
Generating OpenBLASConfigVersion.cmake in /gentle/ext/kaldi/tools/OpenBLAS/install/lib/cmake/openblas
Install OK!
make[2]: Leaving directory '/gentle/ext/kaldi/tools/OpenBLAS'
make[1]: Leaving directory '/gentle/ext/kaldi/tools/OpenBLAS'
Makefile:30: kaldi.mk: No such file or directory
kaldi.mk does not exist; you have to run ./configure
Makefile:96: recipe for target 'kaldi.mk' failed
make: *** [kaldi.mk] Error 1
Configuring KALDI to use OPENBLAS
Configuring ...
Checking compiler g++ ...
Checking OpenFst library in  ...
***configure failed: Could not find file /include/fst/fst.h:
  you may not have installed OpenFst. See ../tools/INSTALL ***
Makefile:30: kaldi.mk: No such file or directory
kaldi.mk does not exist; you have to run ./configure
Makefile:96: recipe for target 'kaldi.mk' failed
make: *** [kaldi.mk] Error 1
Makefile:5: kaldi/src/kaldi.mk: No such file or directory
Not building with cuda!!!
make: *** No rule to make target 'kaldi/src/kaldi.mk'.  Stop.
The command '/bin/sh -c export MAKEFLAGS=' -j8' &&  cd /gentle/ext &&   ./install_kaldi.sh &&   make depend && make && rm -rf kaldi *.o' returned a non-zero code: 2

image

@wclr wclr added the bug label Jun 16, 2019
@danpovey
Copy link
Contributor

danpovey commented Jun 16, 2019 via email

@wclr
Copy link
Author

wclr commented Jun 16, 2019

Well I change it too:

#!/bin/bash

# Prepare Kaldi
cd kaldi/tools
make
./extras/install_openblas.sh
cd ../src
./configure --static --static-math=yes --static-fst=yes --use-cuda=no --openblas-root=../tools/OpenBLAS/install
make clean
make depend
cd ../../ 

But result is the same.

@danpovey
Copy link
Contributor

I recommend that you follow kaldi's own install instructions rather than that setup.
Anyway you have to do "make" after "make depend".

@wclr
Copy link
Author

wclr commented Jun 17, 2019

I've managed to build on google cloud 1vCPU vm, with no j8 make param. with j8 it hanged the machine.

@Disenmas
Copy link

I found an answer in another forum which tells that OpenFst official changed their route,
they added /src before /install and it leads to a lot of problem.

@96fps
Copy link

96fps commented Oct 4, 2019

I unsucessfully tried editing their ext/install_kaldi.sh as follows gentle's sudo ./install.sh :

#!/bin/bash

# Prepare Kaldi
#!/bin/bash

# Prepare Kaldi
cd kaldi/tools
./extras/install_openblas.sh
cd ../src
# make clean (sometimes helpful after upgrading upstream?)
./configure --static --static-math=yes --static-fst=yes --use-cuda=no --openblas-ro$make clean
make depend
make
cd ../../

this failed, so I'm trying to build kaldi manually and will see if I can get gentle to use that.

@96fps
Copy link

96fps commented Oct 4, 2019

I ran out of memory on my VPS... virtual memory exhausted: Cannot allocate memory, so I'll have to put this on hold for now.

@danpovey
Copy link
Contributor

danpovey commented Oct 4, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants