最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

gcc - How to fix compat.cc:22:23: fatal error: string_view: No such file or directory #include <string_view> - Sta

programmeradmin0浏览0评论

I'm trying to compile Kaldi with Make under Kaldi/tools, and in the open-fst compilation it's failing and here's the error message:

compat:22:23: fatal error: string_view: No such file or directory
 #include <string_view>
                       ^
compilation terminated.
Makefile:473: recipe for target 'compat.lo' failed
make[3]: *** [compat.lo] Error 1
make[3]: Leaving directory '/tools/kaldi/tools/openfst-1.8.4/src/lib'
Makefile:370: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory '/tools/kaldi/tools/openfst-1.8.4/src'
Makefile:419: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/tools/kaldi/tools/openfst-1.8.4'
Makefile:64: recipe for target 'openfst_compiled' failed
make: *** [openfst_compiled] Error 2
mkhelfi1@b01:/tools/kaldi/tools$ g++ --version
g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkhelfi1@b01:/tools/kaldi/tools$ 
mkhelfi1@b01:/tools/kaldi/tools$ echo '#include <string_view>
> int main() { std::string_view s("test"); return 0; }' > test_sv.cpp
mkhelfi1@b01:/tools/kaldi/tools$ g++ -std=c++17 test_sv.cpp -o test_sv
test_sv.cpp:1:23: fatal error: string_view: No such file or directory
 #include <string_view>
                       ^
compilation terminated.

My GCC version: gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 and I can't update it is there any fix?

I wanted to lower the openfst version but don't know if it will cause compatibility issues.

I'm trying to compile Kaldi with Make under Kaldi/tools, and in the open-fst compilation it's failing and here's the error message:

compat:22:23: fatal error: string_view: No such file or directory
 #include <string_view>
                       ^
compilation terminated.
Makefile:473: recipe for target 'compat.lo' failed
make[3]: *** [compat.lo] Error 1
make[3]: Leaving directory '/tools/kaldi/tools/openfst-1.8.4/src/lib'
Makefile:370: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory '/tools/kaldi/tools/openfst-1.8.4/src'
Makefile:419: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/tools/kaldi/tools/openfst-1.8.4'
Makefile:64: recipe for target 'openfst_compiled' failed
make: *** [openfst_compiled] Error 2
mkhelfi1@b01:/tools/kaldi/tools$ g++ --version
g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mkhelfi1@b01:/tools/kaldi/tools$ 
mkhelfi1@b01:/tools/kaldi/tools$ echo '#include <string_view>
> int main() { std::string_view s("test"); return 0; }' > test_sv.cpp
mkhelfi1@b01:/tools/kaldi/tools$ g++ -std=c++17 test_sv.cpp -o test_sv
test_sv.cpp:1:23: fatal error: string_view: No such file or directory
 #include <string_view>
                       ^
compilation terminated.

My GCC version: gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 and I can't update it is there any fix?

I wanted to lower the openfst version but don't know if it will cause compatibility issues.

Share Improve this question edited Jan 31 at 6:30 CPlus 4,93045 gold badges30 silver badges73 bronze badges asked Jan 30 at 15:55 KHELFI Mohammed AkramKHELFI Mohammed Akram 111 bronze badge 1
  • You need a newer gcc release. – n. m. could be an AI Commented Jan 30 at 16:16
Add a comment  | 

1 Answer 1

Reset to default 0

I just fixed that by asking the IT a newer version of GCC

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论