Compiling HTK 3.4 on Mac OS 10.5

Compiling HTK 3.4 on Mac OS 10.5


HTK 3.4 does not compile out of the box on my MacBook (OS 10.5.7, 64-bit Intel Core 2 Duo).  There are two problems, one in the configure file, and one in the file HTKLib/strarr.c.

1) After unpacking the source code and running:

$ ./configure
$ make all

I get the following error during compilation:

gcc  -Wall -Wno-switch -g -O2 -I.    -c -o esignal.o esignal.c
esignal.c: In function ‘ReadHeader’:
esignal.c:974: error: ‘ARCH’ undeclared (first use in this function)
esignal.c:974: error: (Each undeclared identifier is reported only once
esignal.c:974: error: for each function it appears in.)
esignal.c: In function ‘WriteHeader’:
esignal.c:1184: error: ‘ARCH’ undeclared (first use in this function)
make[1]: *** [esignal.o] Error 1
make: *** [HTKLib/HTKLib.a] Error 1

After looking into the configure file, I see that the variable ARCH should be defined for my system on line 4983. However, this code isn’t executed, because the host variable isn’t being set. My solution was to add the following code:

i386)
host=darwin
trad_bin_dir=$host
;;

to the case “$host_cpu” in statement on line 4937.

2) After making this change and re-running:

$ ./configure
$ make all

I get the following error:

gcc -ansi -g -O2 -DNO_AUDIO -D’ARCH=”darwin”‘ -Wall -Wno-switch -g -O2 -I. -c -o strarr.o strarr.c
strarr.c:21:20: error: malloc.h: No such file or directory
make[1]: *** [strarr.o] Error 1
make: *** [HTKLib/HTKLib.a] Error 1

To fix this bug, I changed line 21 of HTKLib/strarr.c to:

#include <malloc/malloc.h>

After making this change, compilation completed successfully, and HTK was ready to be installed and used on my system.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值