Skip to content

Compilation issue with latest Node version? #52

@KarthikJay

Description

@KarthikJay

In file included from ../src/logger.cc:8:
In file included from ../deps/spdlog/include/spdlog/async.h:17:
In file included from ../deps/spdlog/include/spdlog/async_logger.h:17:
In file included from ../deps/spdlog/include/spdlog/logger.h:426:
In file included from ../deps/spdlog/include/spdlog/logger-inl.h:12:
In file included from ../deps/spdlog/include/spdlog/pattern_formatter.h:127:
In file included from ../deps/spdlog/include/spdlog/pattern_formatter-inl.h:10:
../deps/spdlog/include/spdlog/details/fmt_helper.h:105:54: error: call to consteval function 'fmt::basic_format_string<char, int &>::basic_format_string<FMT_COMPILE_STRING, 0>' is not a constant expression
105 | fmt_lib::format_to(std::back_inserter(dest), SPDLOG_FMT_STRING("{:02}"), n);
| ^
../deps/spdlog/include/spdlog/common.h:54:46: note: expanded from macro 'SPDLOG_FMT_STRING'
54 | # define SPDLOG_FMT_STRING(format_string) FMT_STRING(format_string)
| ^
../deps/spdlog/include/spdlog/fmt/bundled/format.h:1772:23: note: expanded from macro 'FMT_STRING'
1772 | #define FMT_STRING(s) FMT_STRING_IMPL(s, fmt::detail::compile_string, )
| ^
../deps/spdlog/include/spdlog/fmt/bundled/format.h:1749:3: note: expanded from macro 'FMT_STRING_IMPL'
1749 | [] {
| ^
../deps/spdlog/include/spdlog/fmt/bundled/core.h:2982:51: note: subexpression not valid in a constant expression
2982 | context_.advance_to(context_.begin() + (begin - &context_.begin()));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~
../deps/spdlog/include/spdlog/fmt/bundled/core.h:2663:15: note: in call to 'handler.on_format_specs(0, &"{:02}"[2], &"{:02}"[5])'
2663 | begin = handler.on_format_specs(adapter.arg_id, begin + 1, end);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/spdlog/include/spdlog/fmt/bundled/core.h:2688:21: note: in call to 'parse_replacement_field<char, fmt::detail::format_string_checker<char, fmt::detail::error_handler, int> &>(&"{:02}"[1], &"{:02}"[5], checker(s, {}))'
2688 | begin = p = parse_replacement_field(p - 1, end, handler);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/spdlog/include/spdlog/fmt/bundled/core.h:3159:7: note: in call to 'parse_format_string<true, char, fmt::detail::format_string_checker<char, fmt::detail::error_handler, int>>({&"{:02}"[0], 5}, checker(s, {}))'
3159 | detail::parse_format_string(str_, checker(s, {}));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/spdlog/include/spdlog/details/fmt_helper.h:105:54: note: in call to 'basic_format_string<FMT_COMPILE_STRING, 0>([] {
struct FMT_COMPILE_STRING : fmt::detail::compile_string {
using char_type [[maybe_unused]] = fmt::remove_cvref_t<decltype("{:02}"[0])>;
[[maybe_unused]] constexpr operator fmt::basic_string_view<char_type>() const {
return fmt::detail_exported::compile_string_to_view<char_type>("{:02}");
}
};
return FMT_COMPILE_STRING();
}())'
105 | fmt_lib::format_to(std::back_inserter(dest), SPDLOG_FMT_STRING("{:02}"), n);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/spdlog/include/spdlog/common.h:54:46: note: expanded from macro 'SPDLOG_FMT_STRING'
54 | # define SPDLOG_FMT_STRING(format_string) FMT_STRING(format_string)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
../deps/spdlog/include/spdlog/fmt/bundled/format.h:1772:23: note: expanded from macro 'FMT_STRING'
1772 | #define FMT_STRING(s) FMT_STRING_IMPL(s, fmt::detail::compile_string, )
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/spdlog/include/spdlog/fmt/bundled/format.h:1749:3: note: expanded from macro 'FMT_STRING_IMPL'
1749 | [] {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1750 | /
Use the hidden visibility as a workaround for a GCC bug (#1973). /
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1751 | /
Use a macro-like name to avoid shadowing warnings. */
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1752 | struct FMT_GCC_VISIBILITY_HIDDEN FMT_COMPILE_STRING : base {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1753 | using char_type FMT_MAYBE_UNUSED = fmt::remove_cvref_t<decltype(s[0])>;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1754 | FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1755 | operator fmt::basic_string_view<char_type>() const {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1756 | return fmt::detail_exported::compile_string_to_view<char_type>(s);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1757 | }
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1758 | };
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1759 | return FMT_COMPILE_STRING();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please let me know if I should provide any further details.
This was during an attempted install on arch-linux via vscodium build recipe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions