When I try to compile and install HTK, it produces the following error:

HTK is now ready to be built.

Type "make all" to build the HTK libraries
and tools.

Then "make install" to install them.

The tools will be installed in /usr/local/bin

Build notes: Language Modelling tools will be
built. HDecode will not be built. You can build
it manually later by running 'make hdecode

user@EESBLRP105:~/htk$  make all

(cd HTKLib && make HTKLib.a) \
      || case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory `/home/user/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 /usr/include/stdio.h:27:0,
                 from HShell.h:40,
                 from HGraf.c:54:
/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory
 #  include <sys/cdefs.h>
compilation terminated.
make[1]: *** [HGraf.o] Error 1
make[1]: Leaving directory `/home/user/htk/HTKLib'
make: *** [HTKLib/HTKLib.a] Error 1
  • 1
    HTK-3.4.1 : The time stamp is 2009, long before the new Debian path´s were introduced. Solution for "sys/cdefs.h" : ./configure CFLAGS=-I/usr/include/x86_64-linux-gnu .... – Knud Larsen Feb 28 '18 at 15:16

Several pitfalls when building HTK with e.g. Ubuntu 16.04 - amd64. a) The new path´s. b) HTK is built with gcc -m32 : i386 build prerequisites are required. Much easier if CentOS 6.9 - i386 or CentOS 7 - x86_64.

The package htk-tools_3.4.1-ubuntu14_i386.deb was created on Ubuntu 14.04 - i386, the files are from a HTK-3.4.1 build with CentOS 7.

Link : https://drive.google.com/file/d/1Di29AvqoRBEJ4haW2nusPT1wMPkE14B1/view?usp=sharing → Provides /usr/local/bin/{ 37 tools }.

Ubuntu 16.04 - amd64 : Download, and install :

cd Downloads/
sudo gdebi htk-tools_3.4.1-ubuntu14_i386.deb
            // some 32bits dependencies will be installed too
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.