fmt 10 及以上版本在构建 fmt 时出现编译错误(format.cc)

问题描述 投票:0回答:1

[05:40:03] : [步骤 4/6] [ 4%] 构建 CXX 对象 CMakeFiles/fmt.dir/src/format.cc.o

[05:40:03]:[步骤4/6] /root/usr/bin/g++ -Ifmt/11.0.2/include -fPIC -g -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT CMakeFiles /fmt.dir/src/format.cc.o -MF CMakeFiles/fmt.dir/src/format.cc.o.d -o CMakeFiles/fmt.dir/src/format.cc.o -c fmt/11.0.2/ src/format.cc

[05:40:03]W:[步骤 4/6] 在 fmt/11.0.2/include/fmt/format.h:41:0 包含的文件中,

[05:40:03]W:[步骤 4/6] 来自 fmt/11.0.2/include/fmt/format-inl.h:27,

[05:40:03]W:[步骤 4/6] 来自 fmt/11.0.2/src/format.cc:8:

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:在 'void fmt::v11::detail::check_format_string(S) 的实例化中 [with参数 = {无符号整数&}; S = fmt::v11::formatterfmt::v11::detail::bigint::format(const fmt::v11::detail::bigint&, fmt::v11::format_context&) const::::FMT_COMPILE_STRING;类型名 std::enable_if::value, int>::type = 0]’:

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:2887:41:需要 'fmt::v11::basic_format_string::basic_format_string(const S&) [其中 S = fmt::v11::formatterfmt::v11::detail::bigint::format(const fmt::v11::detail::bigint&, fmt::v11::format_context&) const:: ::FMT_COMPILE_STRING;类型名 std::enable_if<(std::is_convertible::value || (std::is_base_of::value && std::is_constructiblefmt::v11::basic_string_view::value)), int>::type = 0;字符=字符;参数 = {无符号整数&}]’

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/format-inl.h:1387:60:从这里需要

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:2792:56:在 'fmt::v11::detail::parse_format_string 的 constexpr 扩展中>(s,fmt::v11::detail::format_string_checker(s))'

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:2613:44:在 'fmt::v11::detail::parse_replacement_field 的 constexpr 扩展中 &>((p + 18446744073709551615u), 结束, ((fmt::v11::detail::format_string_checker&)handler))'

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:2591:13:在 constexpr 扩展中 '(& handler)->fmt::v11::detail::format_string_checker::on_format_specs(adapter.fmt::v11::detail::parse_replacement_field(const Char*, const Char*, Handler&&) [with Char = char; 处理程序 = fmt::v11::detail::format_string_checker&]::id_adapter::arg_id, (开始 + 1u), 结束)'

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:2763:51:在 '((fmt::v11::detail:: format_string_checker)这个)->fmt::v11::detail::format_string_checker::parse_funcs_[id](((fmt::v11::detail::format_string_checker)这个)->fmt::v11: :detail::format_string_checker::context_)'

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:2677:55:在 'fmt::v11::formatter() 的 constexpr 扩展中。 fmt::v11::formatter::.fmt::v11::detail::native_formatter::parsefmt::v11::detail::compile_parse_context(ctx)'

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:2829:34:在 'fmt::v11::detail::parse_format_specs( (& ctx)->fmt::v11::detail::compile_parse_context::.fmt::v11::basic_format_parse_context::begin(),(& ctx)->fmt::v11::detail::compile_parse_context:: .fmt::v11::basic_format_parse_context::end(), ((fmt::v11::detail::native_formatter*)this)->fmt::v11::detail::native_formatter::specs_, (& ctx)->fmt::v11::detail::compile_parse_context::, (fmt::v11::detail::type)2)'

[05:40:03]W:[步骤 4/6] fmt/11.0.2/include/fmt/base.h:2792:77:内部编译器错误:分段错误

[05:40:03]W:[步骤 4/6] FMT_CONSTEXPR bool error = (parse_format_string(s, checker(s)), true); ^

fmt
1个回答
0
投票

这是编译器中的错误(内部编译器错误):

.../base.h:2792:77: internal compiler error: Segmentation fault

要解决此问题,您可以尝试不同的编译器或库版本。

© www.soinside.com 2019 - 2024. All rights reserved.