Skip to content

Commit

Permalink
[build] Make build scripts support Arch linux (kaldi-asr#3984)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-alexandre-felipe authored Mar 7, 2020
1 parent 5c6a5bc commit 31b0f08
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion egs/wsj/s5/utils/lang/make_lexicon_fst.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def read_lexiconp(filename):
sys.exit(1)
prons = a[2:]
if pron_prob <= 0.0:
print("{0}: error: invalid pron-prob in line '{1}' of lexicon file {2} ".format(
print("{0}: error: invalid pron-prob in line '{1}' of lexicon file {1} ".format(
sys.argv[0], line.strip(" \t\r\n"), filename), file=sys.stderr)
sys.exit(1)
if len(prons) == 0:
Expand Down
2 changes: 2 additions & 0 deletions src/configure
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ function linux_configure_mkllibdir {
echo $mklroot/lib/em64t
elif [ -d $mklroot/lib/intel64 ]; then
echo $mklroot/lib/intel64
elif [ -d $mklroot/lib ]; then
echo $mklroot/lib
else
return 1;
fi
Expand Down
9 changes: 9 additions & 0 deletions tools/extras/install_mkl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ if [[ ! $distro ]]; then
[[ ! $distro && -f /etc/redhat-release ]] && distro=redhat
[[ ! $distro && -f /etc/SuSE-release ]] && distro=suse
[[ ! $distro && -f /etc/debian_release ]] && distro=debian
[[ ! $distro && -f /etc/arch-release ]] && distro=arch
[[ ! $distro ]] && Fatal "\
Unable to determine package management style.
Expand All @@ -132,6 +133,7 @@ Invoke this script with the option '-p <style>', where <style> can be:
fedora -- Fedora 22+, also RedHat-like, but uses dnf instead of yum.
suse -- SUSE-like, uses zypper and rpm.
debian -- Debian-like, uses apt and dpkg.
arch -- Archlinux, uses pacman.
We do not currently support other package management systems. Check the Intel's
documentation at https://software.intel.com/mkl/choose-download for other
Expand Down Expand Up @@ -245,6 +247,13 @@ current recommended security practice."
fi
}
Install_arch () {
( set -x
echo y | pacman -Syu intel-mkl && # In pacman we don't specify the version
pacman -Q --info intel-mkl | grep -v None
)
}
# Register MKL .so libraries with the ld.so.
ConfigLdSo() {
[ -d /etc/ld.so.conf.d ] || return 0
Expand Down

0 comments on commit 31b0f08

Please sign in to comment.