Saturday, April 19, 2008

Compiling HTK on Mac OS X Leopard

There's no documentation on the HTK website for compiling HTK on Leopard, so after scouring the web and the HTK boards for a little too long, I discovered that there are two tricks necessary for making it work:

1) ./configure --build=i686-apple-macos
this option is necessary for it to properly recognize ARCH:

2) add "-I/usr/include/malloc" to CFLAGS in the Makefile

3) make all; make install; success :)

7 comments:

Unknown said...

I did add those commands and still have the same errors:
signal.c:974: error: 'ARCH' undeclared (first use in this function)
esignal.c:1184: error: 'ARCH' undeclared (first use in this function)
and also the error of the malloc library.
Are you sure that about adding
"-I/usr/include/malloc" to CFLAGS in the Makefile, because when I make the ./configure --build=i686-apple-macos it just erase that line, I also tried to add it in the configure and nothing.
Did you had this problems too? Or it just worked with the change that you post.
Thanks for any help.

Unknown said...

We have the same problem.
It seems like the CFLAGS is not fully parsed.
Does anybody have updates about that ?
Thanks,
Nicolas

polopollo said...

try :
make all CFLAGS=-DARCH='\"darwin\"'" -I/usr/include/malloc -I$PWD/HTKLib -I$PWD/HLMLib -I. -I.. -L/usr/X11/lib"

running-gag said...

Thank you, thank you thank you.

The last option worked a treat!!

Unknown said...

i've tried polopollo's suggestion, no more errors about 'ARCH' happened. But, when i typed in the command:
"make install", the following error occured...

mkdir: /usr/local/bin: Permission denied
make[1]: *** [mkinstalldir] Error 1
make: *** [install-htktools] Error 1


Did I do anything wrong?

beatman said...

I'm having a similar problem on FreeBSD7.1. Would anyone mind helping me out with the exact lines of code I should add there for FreeBSD 7.1 running on x86 32-bit?

It does not seem to be part of the standard build and I can't figure out which adaptations to make for my situation. I've posted on the mailing list and haven't received a reply yet so hoping for some help here.

El Chico Costra said...

Hello, thanks for this article, with your tips I finally could install HTK on my mac.
But I have found a new problem using HSLab, it seems that HSLab can't use the microphone of my mac neither one I have plugged in.
Does anyone knows how to configure the microphone?
Thanks and sorry if my english is not good.