hshski 2020-08-17 17:21 采纳率: 0%
浏览 401

求助!fatal error: 'string_view' file not found

最近在编译chromium,在运行runhooks的时候出现以下错误:

running action "['python', '-u', 'scripts/rungn.py', '--refresh']" in /home/zsm/vivaldi-source
ninja: Entering directory `/home/zsm/vivaldi-source/outgn/bootstrap_Release'
[1/185] CXX src/base/command_line.o
FAILED: src/base/command_line.o 
clang++ -MMD -MF src/base/command_line.o.d -I../../thirdparty/gn/src -I. -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -std=c++17 -c ../../thirdparty/gn/src/base/command_line.cc -o src/base/command_line.o
In file included from ../../thirdparty/gn/src/base/command_line.cc:5:
../../thirdparty/gn/src/base/command_line.h:21:10: fatal error: 'string_view' file not found
#include <string_view>
         ^~~~~~~~~~~~~
1 error generated.
[2/185] CXX src/gn/group_target_generator.o
FAILED: src/gn/group_target_generator.o 
clang++ -MMD -MF src/gn/group_target_generator.o.d -I../../thirdparty/gn/src -I. -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -std=c++17 -c ../../thirdparty/gn/src/gn/group_target_generator.cc -o src/gn/group_target_generator.o
In file included from ../../thirdparty/gn/src/gn/group_target_generator.cc:5:
In file included from ../../thirdparty/gn/src/gn/group_target_generator.h:9:
In file included from ../../thirdparty/gn/src/gn/target_generator.h:12:
In file included from ../../thirdparty/gn/src/gn/label_ptr.h:12:
In file included from ../../thirdparty/gn/src/gn/label.h:12:
../../thirdparty/gn/src/gn/source_dir.h:12:10: fatal error: 'string_view' file not found
#include <string_view>
         ^~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
ninja: Entering directory `/home/zsm/vivaldi-source/outgn/bootstrap_Release'
[1/185] CXX src/base/command_line.o
FAILED: src/base/command_line.o 
clang++ -MMD -MF src/base/command_line.o.d -I../../thirdparty/gn/src -I. -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -std=c++17 -c ../../thirdparty/gn/src/base/command_line.cc -o src/base/command_line.o
In file included from ../../thirdparty/gn/src/base/command_line.cc:5:
../../thirdparty/gn/src/base/command_line.h:21:10: fatal error: 'string_view' file not found
#include <string_view>
         ^~~~~~~~~~~~~
1 error generated.
[2/185] CXX src/gn/group_target_generator.o
FAILED: src/gn/group_target_generator.o 
clang++ -MMD -MF src/gn/group_target_generator.o.d -I../../thirdparty/gn/src -I. -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -std=c++17 -c ../../thirdparty/gn/src/gn/group_target_generator.cc -o src/gn/group_target_generator.o
In file included from ../../thirdparty/gn/src/gn/group_target_generator.cc:5:
In file included from ../../thirdparty/gn/src/gn/group_target_generator.h:9:
In file included from ../../thirdparty/gn/src/gn/target_generator.h:12:
In file included from ../../thirdparty/gn/src/gn/label_ptr.h:12:
In file included from ../../thirdparty/gn/src/gn/label.h:12:
../../thirdparty/gn/src/gn/source_dir.h:12:10: fatal error: 'string_view' file not found
#include <string_view>
         ^~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
ninja: Entering directory `/home/zsm/vivaldi-source/outgn/bootstrap_Release'
[1/185] CXX src/base/command_line.o
FAILED: src/base/command_line.o 
clang++ -MMD -MF src/base/command_line.o.d -I../../thirdparty/gn/src -I. -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -std=c++17 -c ../../thirdparty/gn/src/base/command_line.cc -o src/base/command_line.o
In file included from ../../thirdparty/gn/src/base/command_line.cc:5:
../../thirdparty/gn/src/base/command_line.h:21:10: fatal error: 'string_view' file not found
#include <string_view>
         ^~~~~~~~~~~~~
1 error generated.
[2/185] CXX src/gn/group_target_generator.o
FAILED: src/gn/group_target_generator.o 
clang++ -MMD -MF src/gn/group_target_generator.o.d -I../../thirdparty/gn/src -I. -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -std=c++17 -c ../../thirdparty/gn/src/gn/group_target_generator.cc -o src/gn/group_target_generator.o
In file included from ../../thirdparty/gn/src/gn/group_target_generator.cc:5:
In file included from ../../thirdparty/gn/src/gn/group_target_generator.h:9:
In file included from ../../thirdparty/gn/src/gn/target_generator.h:12:
In file included from ../../thirdparty/gn/src/gn/label_ptr.h:12:
In file included from ../../thirdparty/gn/src/gn/label.h:12:
../../thirdparty/gn/src/gn/source_dir.h:12:10: fatal error: 'string_view' file not found
#include <string_view>
         ^~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "scripts/runhooks_android.py", line 174, in <module>
    RunHooks(hooks, cwd=workdir, prefix_name=prefix_name)
  File "scripts/runhooks_android.py", line 139, in RunHooks
    raise BaseException("Hook failed")
BaseException: Hook failed

提示找不到string_view头文件,实在不明白什么原因,恳求大佬帮助。

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-08-17 21:01
    关注

    C++17才有string_view,你的编译器是不是太老不支持。

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?