android-cuttlefish 1.55.4+dfsg.1-1 fails to build with fmtlib
12.2.0+ds1-2 during the fmtlib transition rebuild in sid on arm64:
https://release.debian.org/transitions/html/auto-fmtlib.html
To reproduce, rebuild the unmodified source in a clean sid arm64 build
environment with libfmt-dev and libfmt12 12.2.0+ds1-2 from experimental.
fmt 12.2 makes fmt/core.h lightweight: it includes fmt/base.h rather
than fmt/format.h by default. pci.h includes only fmt/core.h, but uses
std::string and fmt::format. Please include <string> and <fmt/format.h>
explicitly rather than relying on transitive declarations.
https://raw.githubusercontent.com/fmtlib/fmt/12.2.0/include/fmt/core.h
Relevant build-log excerpt:
In file included from cuttlefish/host/libs/vm_manager/pci.cpp:16:
./cuttlefish/host/libs/vm_manager/pci.h:30:8: error: 'string' in namespace 'std' does not name a type
30 | std::string Id() const {
| ^~~~~~
./cuttlefish/host/libs/vm_manager/pci.h:19:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
18 | #include <fmt/core.h>
+++ |+#include <string>
19 |
The observed compiler diagnostic is the missing std::string declaration;
the fmt::format use also needs the explicit formatting header. A patched
consumer build has not been tested.
The full build log is attached.