› Forums › Technical support › Linux › How to compile HTK
- This topic has 2 replies, 2 voices, and was last updated 3 years, 10 months ago by Eric D.
-
AuthorPosts
-
-
September 21, 2020 at 17:17 #11911
-
September 21, 2020 at 21:31 #11915
Instructions for stable release 3.4.1, Ubuntu 18.04 (September 2020)
1. Register with HTK and accept the license agreement.
2. Once you’ve received the email with your password (should be instant), download the stable release source code
3. Extract contents and navigate into the decompressed directory. The README contains specific installation instructions for Linux/OS X/Cygwin and Windows.
$ tar -xvf <FILENAME.tar.gz>
$ cd htk4. Install the “new” way (default)
$ ./configure
$ make allThe following are obstacles I faced at this step when installing version 3.4.1 on Ubuntu 18.04 in September 2020. You may have other dependency issues/missing header files that I did not experience. Googling the relevant error (ex. “Makefile:96: recipe for target ‘HTKLib/HTKLib.a’ failed”) was usually enough to find a top result that solved my problem.
Error #1: missing header file.
(cd HTKLib && make HTKLib.a) \
|| case “” in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory ‘/home/eric/Downloads/htk/HTKLib’
gcc -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D’ARCH=”x86_64″‘ -Wall -Wno-switch -g -O2 -I. -DPHNALG -c -o HGraf.o HGraf.c
In file included from HShell.h:40:0,
from HGraf.c:54:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
#include <bits/libc-header-start.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
<builtin>: recipe for target ‘HGraf.o’ failed
make[1]: *** [HGraf.o] Error 1
make[1]: Leaving directory ‘/home/eric/Downloads/htk/HTKLib’
Makefile:96: recipe for target ‘HTKLib/HTKLib.a’ failed
make: *** [HTKLib/HTKLib.a] Error 1Solution:
$ sudo apt-get install gcc-multilib
Add the following line to /etc/apt/sources.list (requires sudo)
deb http://ftp.de.debian.org/debian sid main$ sudo apt install gcc-multilib
Source: https://stackoverflow.com/questions/59942715/htk-32bit-issue-apt-get-install-gcc-multilib-package-gcc-multilib-has-nError #2: missing dependency.
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible //usr/lib/x86_64-linux-gnu/libX11.a when searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
Makefile:56: recipe for target ‘HSLab’ failed
make[1]: *** [HSLab] Error 1
make[1]: Leaving directory ‘/home/eric/Downloads/htk/HTKTools’
Makefile:108: recipe for target ‘htktools’ failed
make: *** [htktools] Error 1Solution: I already had this library installed, but needed to install it specifically for 32-bit systems.
$ sudo apt-get install libx11-dev:i386
Source: https://stackoverflow.com/questions/40451054/cant-install-htk-on-linux
Error #3: missing tab character.
(cd HLMTools && make all) \
|| case “” in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory ‘/home/eric/Downloads/htk/HLMTools’
Makefile:77: *** missing separator. Stop.
make[1]: Leaving directory ‘/home/eric/Downloads/htk/HLMTools’
Makefile:111: recipe for target ‘hlmtools’ failed
make: *** [hlmtools] Error 1Solution: Just replace the 8-space indent on line 77 of HLMTools/Makefile with a TAB character.
Source: https://github.com/SouthAfricaDigitalScience/htk-deploy/issues/525. Install
$ sudo make install
6. Remove the .tar file and htk directory. The program has been installed in /usr/local/bin/ unless specified otherwise in the ./configure step.
-
-
AuthorPosts
- You must be logged in to reply to this topic.