Skip to content

Compilation on Linux fails with building with clang / clang++ #250970

@etna

Description

@etna

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: Git, cloned with --branch 1.100.3 --single-branch
  • OS Version: Debian 13 RC, self-built LLVM20 and clang / clang++

Steps to Reproduce:

  1. Clone the VScode repo
  2. Build with clang and clang++

Build fails with the following error:

npm error In file included from ../src/main.cc:8:
npm error In file included from ../src/logger.h:12:
npm error In file included from ../deps/spdlog/include/spdlog/spdlog.h:12:
npm error In file included from ../deps/spdlog/include/spdlog/common.h:50:
npm error In file included from ../deps/spdlog/include/spdlog/fmt/fmt.h:27:
npm error In file included from ../deps/spdlog/include/spdlog/fmt/bundled/core.h:3321:
npm error ../deps/spdlog/include/spdlog/fmt/bundled/format.h:4168:27: warning: identifier '_a' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
npm error  4168 | constexpr auto operator"" _a(const char* s, size_t) -> detail::udl_arg<char> {
npm error       |                ~~~~~~~~~~~^~
npm error       |                operator""_a
npm error In file included from ../src/main.cc:8:
npm error In file included from ../src/logger.h:12:
npm error In file included from ../deps/spdlog/include/spdlog/spdlog.h:13:
npm error In file included from ../deps/spdlog/include/spdlog/details/registry.h:122:
npm error In file included from ../deps/spdlog/include/spdlog/details/registry-inl.h:12:
npm error In file included from ../deps/spdlog/include/spdlog/logger.h:426:
npm error In file included from ../deps/spdlog/include/spdlog/logger-inl.h:12:
npm error In file included from ../deps/spdlog/include/spdlog/pattern_formatter.h:127:
npm error In file included from ../deps/spdlog/include/spdlog/pattern_formatter-inl.h:10:
npm error ../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
npm error   105 |         fmt_lib::format_to(std::back_inserter(dest), SPDLOG_FMT_STRING("{:02}"), n);
npm error       |                                                      ^
npm error ../deps/spdlog/include/spdlog/common.h:54:46: note: expanded from macro 'SPDLOG_FMT_STRING'
npm error    54 | #    define SPDLOG_FMT_STRING(format_string) FMT_STRING(format_string)
npm error       |                                              ^
npm error ../deps/spdlog/include/spdlog/fmt/bundled/format.h:1772:23: note: expanded from macro 'FMT_STRING'
npm error  1772 | #define FMT_STRING(s) FMT_STRING_IMPL(s, fmt::detail::compile_string, )
npm error       |                       ^
npm error ../deps/spdlog/include/spdlog/fmt/bundled/format.h:1749:3: note: expanded from macro 'FMT_STRING_IMPL'
npm error  1749 |   [] {                                                                        \
npm error       |   ^
npm error ../deps/spdlog/include/spdlog/fmt/bundled/core.h:2982:51: note: subexpression not valid in a constant expression
npm error  2982 |     context_.advance_to(context_.begin() + (begin - &*context_.begin()));
npm error       |                                             ~~~~~~^~~~~~~~~~~~~~~~~~~~
npm error ../deps/spdlog/include/spdlog/fmt/bundled/core.h:2663:15: note: in call to 'handler.on_format_specs(0, &"{:02}"[2], &"{:02}"[5])'
npm error  2663 |       begin = handler.on_format_specs(adapter.arg_id, begin + 1, end);
npm error       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../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, {}))'
npm error  2688 |         begin = p = parse_replacement_field(p - 1, end, handler);
npm error       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../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, {}))'
npm error  3159 |       detail::parse_format_string<true>(str_, checker(s, {}));
npm error       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../deps/spdlog/include/spdlog/details/fmt_helper.h:105:54: note: in call to 'basic_format_string<FMT_COMPILE_STRING, 0>([] {
npm error     struct FMT_COMPILE_STRING : fmt::detail::compile_string {
npm error         using char_type [[maybe_unused]] = fmt::remove_cvref_t<decltype("{:02}"[0])>;
npm error         [[maybe_unused]] constexpr operator fmt::basic_string_view<char_type>() const {
npm error             return fmt::detail_exported::compile_string_to_view<char_type>("{:02}");
npm error         }
npm error     };
npm error     return FMT_COMPILE_STRING();
npm error }())'
npm error   105 |         fmt_lib::format_to(std::back_inserter(dest), SPDLOG_FMT_STRING("{:02}"), n);
npm error       |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../deps/spdlog/include/spdlog/common.h:54:46: note: expanded from macro 'SPDLOG_FMT_STRING'
npm error    54 | #    define SPDLOG_FMT_STRING(format_string) FMT_STRING(format_string)
npm error       |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../deps/spdlog/include/spdlog/fmt/bundled/format.h:1772:23: note: expanded from macro 'FMT_STRING'
npm error  1772 | #define FMT_STRING(s) FMT_STRING_IMPL(s, fmt::detail::compile_string, )
npm error       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../deps/spdlog/include/spdlog/fmt/bundled/format.h:1749:3: note: expanded from macro 'FMT_STRING_IMPL'
npm error  1749 |   [] {                                                                        \
npm error       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1750 |     /* Use the hidden visibility as a workaround for a GCC bug (#1973). */    \
npm error       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1751 |     /* Use a macro-like name to avoid shadowing warnings. */                  \
npm error       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1752 |     struct FMT_GCC_VISIBILITY_HIDDEN FMT_COMPILE_STRING : base {              \
npm error       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1753 |       using char_type FMT_MAYBE_UNUSED = fmt::remove_cvref_t<decltype(s[0])>; \
npm error       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1754 |       FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit                                 \
npm error       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1755 |       operator fmt::basic_string_view<char_type>() const {                    \
npm error       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1756 |         return fmt::detail_exported::compile_string_to_view<char_type>(s);    \
npm error       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1757 |       }                                                                       \
npm error       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1758 |     };                                                                        \
npm error       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1759 |     return FMT_COMPILE_STRING();                                              \
npm error       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error  1760 |   }()
npm error       |   ~~~
npm error 1 warning and 1 error generated.
npm error make: *** [spdlog.target.mk:130: Release/obj.target/spdlog/src/main.o] Error 1
npm error gyp ERR! build error 
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/home/etna/Runtime/Deps/node-v22.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
npm error gyp ERR! System Linux 6.12.25
npm error gyp ERR! command "/home/etna/Runtime/Deps/node-v22.15.1/bin/node" "/home/etna/Runtime/Deps/node-v22.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /home/etna/BrowserCache/vscode/node_modules/@vscode/spdlog
npm error gyp ERR! node -v v22.15.1
npm error gyp ERR! node-gyp -v v11.0.0
npm error gyp ERR! not ok

Any help will be greatly appreciated. By the way, the build succeeds with GCC.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions