Sunday, October 13, 2013

How to install htk on 64 bit machine

before running ./configure, make, sudo make install run the following command:
$linux32 bash
now run
$./configure
$make
$sudo make install

How to find machine is 32 bit or 64 bit:
use following command
$uname -a

it will result output like:
Linux dubhashi 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 i686 i686 i386 GNU/Linux
 
here x86_64  indicates that machine is 64 bit


Tuesday, October 1, 2013

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

Error:
$home/../htk$ make
(cd HTKLib && make HTKLib.a) \
|| case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory `/home/elektronik/Namizje/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/features.h:378,
from /usr/include/stdio.h:28,
from HShell.h:40,
from HGraf.c:54:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[1]: *** [HGraf.o] Error 1
make[1]: Leaving directory `/home/elektronik/Namizje/htk/HTKLib'
make: *** [HTKLib/HTKLib.a] Error 1

Solution:
If you try to install HTK on 64 bits machine, you might get some fatale error like "/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory". Because by default, it try to compile it on 32 bits machine. So you need to install gcc and g++ for 32 bits machine.

On fedora/CentOS:

yum install glibc-devel.i686

On Ubuntu: install the following pakages

g++-multilib
gcc-multilib

2. Personally, when i do "make all" on my machine (fedora 15), I get another fatal error "HGraf.c:73:77: fatal error: X11/Xlib.h: No such file or directory". So I need to install "libX11-devel" by by doing "yum install libX11-devel".


Source: http://quotidianlinux.wordpress.com/2012/01/20/htk-fatal-error/