Installing HTK on 64-bit Architectures

In the following I again rescued a helpful blog entry from markstoehr.com, which I think needs to be rescued for the future world:

HTK is an important speech recognition tool maintained and founded by the Cambridge University Engineering Department. Once one registers, downloads the code, and unpacks it, the standard recipe for compiling the source on Linux is

./configure
make all

However, on a 64-bit architecture this will fail because of a bug on line 5507 of configure we see that the generated Makefiles will set the call to the C compiler to have the -m32 flag (line 3):

case "$host" in
    *x86_64*linux*)
        CFLAGS="-m64 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH=\"$host_cpu\"' $CFLAGS"
        LDFLAGS="-L/usr/X11R6/lib $LDFLAGS"
        ARCH=linux
        trad_bin_dir=linux
;;

The -m32 flag is meant for an i386 system since it sets “int”, “long”, and pointer types to 32 bits. For x86-64 architectures we want the -m64 flag so we need to change Line 3 above to

CFLAGS="-m64 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH=\"$host_cpu\"' $CFLAGS"

After making this change I was able to compile HTK without any further problems.

This note is for HTK version 3.4.1 and hopefully future versions will include this bug fix.

Advertisements

About Gerhard Hagerer

I am a Computer Science Master. Talk to me!
This entry was posted in Computer Pragmatics. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s