[GH-ISSUE #205] Building fails in Linux #23

Closed
opened 2026-02-27 21:04:11 +03:00 by kerem · 6 comments
Owner

Originally created by @Shoegzer on GitHub (Jun 18, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/205

From the build log:

/home/testing/Desktop/shadPS4/src/common/logging/backend.cpp: In member function ‘void Common::Log::{anonymous}::Impl::PushEntry(Common::Log::Class, Common::Log::Level, const char*, unsigned int, const char*, std::string)’:
/home/testing/Desktop/shadPS4/src/common/logging/backend.cpp:173:40: error: ‘format’ is not a member of ‘std’; did you mean ‘fmt::v10::format’?
  173 |             const auto& msg_str = std::format("[{}] {}", GetLogClassName(log_class), message);
      |                                        ^~~~~~
In file included from /home/testing/Desktop/shadPS4/src/common/logging/backend.cpp:8:
/home/testing/Desktop/shadPS4/externals/fmt/include/fmt/format.h:4365:13: note: ‘fmt::v10::format’ declared here
 4365 | inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
      |             ^~~~~~
  • OS: Linux Mint 21.3 / kernel 6.5
  • CPU: Intel i7-10870h
  • Compiler: gcc-12.3.0
  • Commit tested: d9f2758850
  • Full build log: build.log
Originally created by @Shoegzer on GitHub (Jun 18, 2024). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/205 From the build log: ``` /home/testing/Desktop/shadPS4/src/common/logging/backend.cpp: In member function ‘void Common::Log::{anonymous}::Impl::PushEntry(Common::Log::Class, Common::Log::Level, const char*, unsigned int, const char*, std::string)’: /home/testing/Desktop/shadPS4/src/common/logging/backend.cpp:173:40: error: ‘format’ is not a member of ‘std’; did you mean ‘fmt::v10::format’? 173 | const auto& msg_str = std::format("[{}] {}", GetLogClassName(log_class), message); | ^~~~~~ In file included from /home/testing/Desktop/shadPS4/src/common/logging/backend.cpp:8: /home/testing/Desktop/shadPS4/externals/fmt/include/fmt/format.h:4365:13: note: ‘fmt::v10::format’ declared here 4365 | inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args) | ^~~~~~ ``` * OS: Linux Mint 21.3 / kernel 6.5 * CPU: Intel i7-10870h * Compiler: gcc-12.3.0 * Commit tested: d9f2758850a36f2fd05e2c3d7baf39eca168f9bb * Full build log: [build.log](https://github.com/user-attachments/files/15893539/build.log)
kerem closed this issue 2026-02-27 21:04:11 +03:00
Author
Owner

@raphaelthegreat commented on GitHub (Jun 18, 2024):

Try replacing std::format with fmt::format

<!-- gh-comment-id:2177234908 --> @raphaelthegreat commented on GitHub (Jun 18, 2024): Try replacing std::format with fmt::format
Author
Owner

@Shoegzer commented on GitHub (Jun 19, 2024):

Thanks, that seems to clear that particular issue but then more errors of various types appear, such as:

/home/testing/Desktop/shadPS4/src/core/linker.h:45:30: error: ‘contains’ is not a member of ‘std::ranges’
   45 |             if (std::ranges::contains(imports, m->name, &ModuleInfo::name)) {
      |                              ^~~~~~~~

To me this seems to be part of a larger build issue.

<!-- gh-comment-id:2177348150 --> @Shoegzer commented on GitHub (Jun 19, 2024): Thanks, that seems to clear that particular issue but then more errors of various types appear, such as: ``` /home/testing/Desktop/shadPS4/src/core/linker.h:45:30: error: ‘contains’ is not a member of ‘std::ranges’ 45 | if (std::ranges::contains(imports, m->name, &ModuleInfo::name)) { | ^~~~~~~~ ``` To me this seems to be part of a larger build issue.
Author
Owner

@raphaelthegreat commented on GitHub (Jun 19, 2024):

It seems to me like your compiler/libstdc++ version is too old. We use C++23 features and std::ranges::contains was added in GCC 13

<!-- gh-comment-id:2178598400 --> @raphaelthegreat commented on GitHub (Jun 19, 2024): It seems to me like your compiler/libstdc++ version is too old. We use C++23 features and std::ranges::contains was added in GCC 13
Author
Owner

@Shoegzer commented on GitHub (Jun 19, 2024):

You nailed it, thanks. Updating to gcc-13 indeed fixes this as expected. Closing.

<!-- gh-comment-id:2179463408 --> @Shoegzer commented on GitHub (Jun 19, 2024): You nailed it, thanks. Updating to gcc-13 indeed fixes this as expected. Closing.
Author
Owner

@deadmeu commented on GitHub (Aug 21, 2024):

Would be good to update https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-linux.md to include gcc-13.

<!-- gh-comment-id:2301817480 --> @deadmeu commented on GitHub (Aug 21, 2024): Would be good to update https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-linux.md to include gcc-13.
Author
Owner

@Kineforce commented on GitHub (Aug 22, 2024):

Would be good to update https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-linux.md to include gcc-13.

+1, it happened to me using Debian Bookworm (by default comes with gcc 12)

<!-- gh-comment-id:2304568057 --> @Kineforce commented on GitHub (Aug 22, 2024): > Would be good to update https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-linux.md to include gcc-13. +1, it happened to me using Debian Bookworm (by default comes with gcc 12)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#23
No description provided.