2016-06-09 95 views
1

我想安装HTS 2.3,但是当我试图让我得到这个错误INSTALL HTS 2.3 HTK 3.4.1在Ubuntu 16.04有错误

> (cd HTKLib && make HTKLib.a) \ || case "" in *k*) fail=yes;; *) exit 
> 1;; esac; make[1]: Entering directory '/home/ahad/Desktop/htk/HTKLib' 
> gcc -Wall -Wno-switch -g -O2 -I. -DPHNALG -c -o esignal.o esignal.c 
> In file included from /usr/include/string.h:630:0, 
>     from esignal.h:34, 
>     from esignal.c:29: esignal.c: In function ‘ReadHeader’: esignal.c:974:29: error: ‘ARCH’ undeclared (first use in 
> this function) 
>  if (strcmp(architecture, ARCH) == 0) /* native architecture */ 
>       ^esignal.c:974:29: note: each undeclared identifier is reported only once for each function it appears in 
> esignal.c: In function ‘WriteHeader’: esignal.c:1184:25: error: ‘ARCH’ 
> undeclared (first use in this function) 
>   architecture = ARCH; 
>      ^esignal.c: In function ‘GetLine’: esignal.c:1760:4: warning: ignoring return value of ‘fgets’, declared 
> with attribute warn_unused_result [-Wunused-result] 
>  fgets(buf, len+1, file); 
> ^esignal.c: In function ‘GetLong’: esignal.c:1808:4: warning: ignoring return value of ‘fgets’, declared with attribute 
> warn_unused_result [-Wunused-result] 
>  fgets(buf, len+1, file); 
> ^<builtin>: recipe for target 'esignal.o' failed make[1]: *** [esignal.o] Error 1 make[1]: Leaving directory 
> '/home/ahad/Desktop/htk/HTKLib' Makefile:141: recipe for target 
> 'HTKLib/HTKLib.a' failed make: *** [HTKLib/HTKLib.a] Error 1 

是什么问题?

我已经安装了libx11-dev。

回答

2

为解决此两条错误我指定的./configure的ARCH是这样的:

./configure CFLAGS="-DARCH=linux" 

它为我工作。

% tar -zxvf HTK-3.4.1.tar.gz 
    % tar -zxvf HDecode-3.4.1.tar.gz 

    % cd htk 
    % patch -p1 -d . < HTS-2.3_for_HTK-3.4.1.patch 
    % sudo apt-get install g++-4.7 
    % export CC=gcc-4.7 CXX=g++-4.7 
    % ./configure CFLAGS="-DARCH=linux" 
    % make all 
    % make hlmtools install-hlmtools 
    % make hdecode install-hdecode 
    % sudo make install 
1

Ubuntu的16.04和2014年代码HTK-3.4.1,等:

的HTS2.3修补HTK-3.4.1(HTKLib /)不能与默认的gcc = GCC编译-5。

解决方案:sudo apt-get install g++-4.7

cd htk/ 
export CC=gcc-4.7 CXX=g++-4.7 
./configure 
make all 

+0

它有错误再次 –

+0

化妆[1]:进入目录 '/家/阿哈德/桌面/ HTK/HTKLib' GCC-

我喜欢通过这个步骤作为克努兹拉森指令做到这一步4.7 -Wall -Wno-switch -g -O2 -I。 -DPHNALG -c -o esignal.o esignal.c esignal.c:在函数'ReadHeader'中: esignal.c:974:8:错误:'ARCH'未声明(首次在此函数中使用) esignal.c: 974:8:注意:每个未声明的标识符仅对其出现的每个函数报告一次 esignal.c:974:8:警告:逗号表达式的左侧操作数不起作用[-Wunused-value] –

+0

esignal.c :函数'WriteHeader': esignal.c:1184:25:错误:'ARCH'未声明(首次在此函数中使用) esignal.c:函数'GetLine': esignal.c:1760:9:warning :忽略'fgets'的返回值,用属性声明warn_unused_result [-Wunused-result] esignal.c:函数'GetLong': esignal。 c:1808:9:警告:忽略'fgets'的返回值,声明属性为warn_unused_result [-Wunused-result] :目标'esignal.o'的配方失败 –