kaldi-asr / kaldi

kaldi-asr/kaldi is the official location of the Kaldi project.
http://kaldi-asr.org
Other
14.24k stars 5.32k forks source link

make failed on ubuntu 18.04 LTS #4537

Closed abhishekborse closed 3 years ago

abhishekborse commented 3 years ago

extras/check_dependencies.sh extras/check_dependencies.sh: gfortran is not installed extras/check_dependencies.sh: Intel MKL does not seem to be installed. ... Run extras/install_mkl.sh to install it. Some distros (e.g., Ubuntu 20.04) provide ... a version of MKL via the package manager, but verify that it is up-to-date. ... You can also use other matrix algebra libraries. For information, see: ... http://kaldi-asr.org/doc/matrixwrap.html

OS: Ubuntu 18.04 package already available in system

gfortran/bionic 4:7.3.0-3ubuntu2 amd64

sjtuytc commented 3 years ago

Run extras/install_mkl.sh to install it.

abhishekborse commented 3 years ago

@sjtuytc Thanks for replying I have successfully run extras/install_mkl.sh after that when I run extras/check_dependencies.sh I'm getting this error

extras/check_dependencies.sh 
extras/check_dependencies.sh: gfortran is not installed

but it is already there

apt list gfortran
Listing... Done
gfortran/bionic 4:7.3.0-3ubuntu2 amd64
kkm000 commented 3 years ago

If you peek into the script at the check being performed, you'll see this: https://github.com/kaldi-asr/kaldi/blob/9d235864c3105c3b72feb9f19a219dbae08b3a41/tools/extras/check_dependencies.sh#L75-L78 where the function have is defined as https://github.com/kaldi-asr/kaldi/blob/9d235864c3105c3b72feb9f19a219dbae08b3a41/tools/extras/check_dependencies.sh#L19 It seems that gfortran package is downloaded but not installed, or broken. Try running commands like

$ gfortran --version
$ which -a gfortran
$ type gfortran
$ echo $PATH

and this will give you an idea why it could not be found. You know what your PATH should look like. Check dpkg installation flags: they must show ii for a completely installed and configured package (I'm using gcc as an example--I don't have gfortran), the flags are to the left of package name, line 6 here:

$ dpkg -l gcc
      1 Desired=Unknown/Install/Remove/Purge/Hold
      2 | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      3 |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      4 ||/ Name           Version      Architecture Description
      5 +++-==============-============-============-=================================
      6 ii  gcc            4:8.3.0-1    amd64        GNU C compiler

The meaning of letters in line 6 is explained above. Sometimes packages end up in downloaded but not installed or left in an unconfigured state: apt only downloads packages, but it's the dpkg which is then called to install it. apt list shows that you have downloaded a package; it's not a good source of further info. A misconfigured apt may fail early attempting to install the package. Always use dpkg -l, it's the source of truth what is installed and what requires attention.

If anything is not right, reinstall the package with

$ sudo apt install --reinstall gfortran

Pay close attention to apt errors. Sometimes users have completely dysfunctional apt and keep ignoring its errors. If you encounter errors, https://askubuntu.com is the best place to look for an answer.


I'm closing this issue, because it is a question, not a feature proposal or a defect report. We have a forum that is the best place to ask questions, and getting answers and input from other users as well. We are hanging out there all the time, too. Here, in the issue tracker, we are just too few.

Kaldi help forum: https://groups.google.com/forum/#!forum/kaldi-help

Instructions for joining: http://kaldi-asr.org/forums.html

If you think I misunderstood your intention, please reply, and I'll reopen it.