Skip to content

Commit 31b0f08

Browse files
[build] Make build scripts support Arch linux (kaldi-asr#3984)
1 parent 5c6a5bc commit 31b0f08

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

egs/wsj/s5/utils/lang/make_lexicon_fst.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def read_lexiconp(filename):
9292
sys.exit(1)
9393
prons = a[2:]
9494
if pron_prob <= 0.0:
95-
print("{0}: error: invalid pron-prob in line '{1}' of lexicon file {2} ".format(
95+
print("{0}: error: invalid pron-prob in line '{1}' of lexicon file {1} ".format(
9696
sys.argv[0], line.strip(" \t\r\n"), filename), file=sys.stderr)
9797
sys.exit(1)
9898
if len(prons) == 0:

src/configure

+2
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ function linux_configure_mkllibdir {
250250
echo $mklroot/lib/em64t
251251
elif [ -d $mklroot/lib/intel64 ]; then
252252
echo $mklroot/lib/intel64
253+
elif [ -d $mklroot/lib ]; then
254+
echo $mklroot/lib
253255
else
254256
return 1;
255257
fi

tools/extras/install_mkl.sh

+9
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ if [[ ! $distro ]]; then
123123
[[ ! $distro && -f /etc/redhat-release ]] && distro=redhat
124124
[[ ! $distro && -f /etc/SuSE-release ]] && distro=suse
125125
[[ ! $distro && -f /etc/debian_release ]] && distro=debian
126+
[[ ! $distro && -f /etc/arch-release ]] && distro=arch
126127
127128
[[ ! $distro ]] && Fatal "\
128129
Unable to determine package management style.
@@ -132,6 +133,7 @@ Invoke this script with the option '-p <style>', where <style> can be:
132133
fedora -- Fedora 22+, also RedHat-like, but uses dnf instead of yum.
133134
suse -- SUSE-like, uses zypper and rpm.
134135
debian -- Debian-like, uses apt and dpkg.
136+
arch -- Archlinux, uses pacman.
135137
136138
We do not currently support other package management systems. Check the Intel's
137139
documentation at https://software.intel.com/mkl/choose-download for other
@@ -245,6 +247,13 @@ current recommended security practice."
245247
fi
246248
}
247249
250+
Install_arch () {
251+
( set -x
252+
echo y | pacman -Syu intel-mkl && # In pacman we don't specify the version
253+
pacman -Q --info intel-mkl | grep -v None
254+
)
255+
}
256+
248257
# Register MKL .so libraries with the ld.so.
249258
ConfigLdSo() {
250259
[ -d /etc/ld.so.conf.d ] || return 0

0 commit comments

Comments
 (0)