Wednesday, July 13, 2011

[HTK] Compile HTK on 64bit machine

When compile HTK on 64bit machines, by default it will still try to compile the tools to 32bit. Then there will be an error after issue the command "make all":

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

To solve this problem, what we need is to install the multilib package for the gcc and g++. On Ubuntu, install following packages:

and redo "make all".

Posted via email from Troy's posterous


  1. Hey frnd,

    i installed both the packages(g++-multilib and gcc-multilib) then tried 'make all' again.. but i got the error.. plse go through the error msg i got and hlp me..

    root@kkg:/home/kkg/htk# make all
    (cd HTKTools && make all) \
    || case "" in *k*) fail=yes;; *) exit 1;; esac;
    make[1]: Entering directory `/home/kuruvachan/htk/HTKTools'
    make[1]: Warning: File `HSLab.c' has modification time 1.4e+04 s in the future
    if [ ! -d /usr/local/bin -a X_ = X_yes ] ; then mkdir -p /usr/local/bin ; fi
    if [ xHSLab = xHSLab ] ; then \
    gcc -o HSLab -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I../HTKLib HSLab.c ../HTKLib/HTKLib.a -L/usr/X11R6/lib -lm -lX11 ; \
    else \
    gcc -o HSLab -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I../HTKLib HSLab.c ../HTKLib/HTKLib.a -L/usr/X11R6/lib -lm ; fi
    HSLab.c: In function ‘FileExists’:
    HSLab.c:1209:12: warning: variable ‘isEXF’ set but not used [-Wunused-but-set-variable]
    HSLab.c: In function ‘DoSpecial’:
    HSLab.c:1596:13: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
    /usr/bin/ld: cannot find -lX11
    collect2: ld returned 1 exit status
    make[1]: *** [HSLab] Error 1
    make[1]: Leaving directory `/home/kuruvachan/htk/HTKTools'
    make: *** [htktools] Error 1

  2. Yes, I have searched all over the Internet for the same problem. I'd love to get it working!

  3. Hi, have u solved the above problem? I mean this one:
    /usr/bin/ld: cannot find -lX11
    collect2: ld returned 1 exit status