编译kaldi扩展工具irstlm

版本:Fedora release 25 (Twenty Five)

gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC)

为什么单独拿出来这个说呢?

因为从GCC 6 开始,gcc已经提供cstdlib,这时如果在再使用-isystem,就会报错

In file included from /usr/include/c++/6.3.1/ext/string_conversions.h:41:0,�0�2 �0�2 �0�2 �0�2 �0�2 �0�2

�0�2�0�2 �0�2 from /usr/include/c++/6.3.1/bits/basic_string.h:5402,

�0�2 �0�2 �0�2 �0�2 �0�2 �0�2 �0�2 �0�2 from /usr/include/c++/6.3.1/string:52,�0�2

�0�2�0�2 �0�2 �0�2 �0�2 �0�2 �0�2 �0�2 from /usr/include/c++/6.3.1/bits/locale_classes.h:40,�0�2 �0�2�0�2

�0�2 �0�2 �0�2 �0�2 �0�2 �0�2 from /usr/include/c++/6.3.1/bits/ios_base.h:41,�0�2�0�2

�0�2 �0�2 �0�2 �0�2 �0�2 �0�2 �0�2 from /usr/include/c++/6.3.1/iomanip:40,�0�2 �0�2 �0�2

�0�2�0�2 �0�2 �0�2 �0�2 �0�2 from dictionary.cpp:25:/usr/include/c++/6.3.1/cstdlib:75:25: fatal error: stdlib.h:�0�2

No such file or directory #include_next^

需要修改

irstlm/src/Makefile.am

irstlm/src/Makefile.in

把里面的

AM_CXXFLAGS = -static -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES $(BOOST_CPPFLAGS) -DMYCODESIZE=3

修改为:

AM_CXXFLAGS = -static -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES $(BOOST_CPPFLAGS) -DMYCODESIZE=3

这样再运行脚本 extras/install_irstlm.sh,就可以顺利编译了。

(0)

相关推荐