You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build fails on libstdc++/GCC (e.g. Raspberry Pi aarch64): std::setw/setfill used without #include <iomanip> #783
cactus build --python fails to compile the native engine on libstdc++ (e.g. Raspberry Pi) because cactus-engine/src/telemetry_impl.cpp uses std::setw / std::setfill without including <iomanip>. The same latent defect exists in 14 other translation units that currently compile only via a transitive include.
cactus-engine/src/telemetry_impl.cpp:689:24: error: 'setw' is not a member of 'std'
689 | oss << "-" << std::setw(4) << ((a >> 16) & 0xffffULL);
| ^~~~
... repeats for each std::setw / std::setfill use (lines 666-671 and 687-692)
make[2]: *** [CMakeFiles/cactus_engine.dir/build.make:228: CMakeFiles/cactus_engine.dir/src/telemetry_impl.cpp.o] Error 1
Building Cactus for Python... Build failed
Root cause
telemetry_impl.cpp uses std::hex / std::setfill / std::setw (lines 666-671, 687-692) but does not include <iomanip>, and none of its headers pulls it in transitively — it does not include utils.h, the project header that provides <iomanip> elsewhere in the engine. On libc++ (macOS/clang) the symbols are reachable through other standard headers, so macOS CI passed; on libstdc++ (Pi GCC 12.2, aarch64) they are not, and the build breaks.
Scope
Actually broken (reported failure):cactus-engine/src/telemetry_impl.cpp — no transitive <iomanip> path.
Latent (compile today only via a transitive include from utils.h / test_utils.h):cactus-engine/src/complete.cpp plus 13 test TUs (cactus-engine/tests/*, cactus-kernels/tests/*, cactus-graph/tests/test_nn.cpp). Same non-portable reliance.
Both telemetry_impl.cpp and complete.cpp are compiled into the cactus_engine static-lib target (cactus-engine/CMakeLists.txt, ENGINE_SOURCES).
Reproduction (on the failing toolchain)
#include<sstream>intmain(){ std::ostringstream o; o << std::setw(8) << 42u; }
g++ -std=c++20 repro.cpp → error: 'setw' is not a member of 'std'. Adding #include <iomanip> compiles clean. Verified on the Pi's GCC 12.2.0 / libstdc++ / aarch64.
Proposed fix
Add a direct #include <iomanip> to each affected translation unit. See #782.
Opened PR #782 with the fix — adds a direct #include <iomanip> to telemetry_impl.cpp (the actual failure) and to the other 14 translation units that rely on a transitive include. Reproduced the error and verified the fix on the reported toolchain (Raspberry Pi, GCC 12.2.0 / libstdc++ / aarch64).
Activity
nitishagar commentedon Aug 12, 2026
Opened PR #782 with the fix — adds a direct
#include <iomanip>totelemetry_impl.cpp(the actual failure) and to the other 14 translation units that rely on a transitive include. Reproduced the error and verified the fix on the reported toolchain (Raspberry Pi, GCC 12.2.0 / libstdc++ / aarch64).