編譯kaldi擴(kuò)展工具irstlm

版本:Fedora release 25 (Twenty Five)

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

為什么單獨(dú)拿出來這個說呢?

因?yàn)閺腉CC 6 開始,gcc已經(jīng)提供cstdlib,這時如果在再使用-isystem,就會報錯

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

?? ? from /usr/include/c++/6.3.1/bits/basic_string.h:5402,

? ? ? ? ? ? ? ? from /usr/include/c++/6.3.1/string:52,?

?? ? ? ? ? ? ? from /usr/include/c++/6.3.1/bits/locale_classes.h:40,? ??

? ? ? ? ? ? from /usr/include/c++/6.3.1/bits/ios_base.h:41,??

? ? ? ? ? ? ? from /usr/include/c++/6.3.1/iomanip:40,? ? ?

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

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

這樣再運(yùn)行腳本 extras/install_irstlm.sh,就可以順利編譯了。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容