GCC 5.5.0 (2017) cannot be built out-of-the-box by g++/GCC 11.3.0 (2022) because g++ 11.x defaults to C++17, whereas GCC 5.5 expects C++11, which apparently has incompatible features/semantics in some places.
Thanks again to the bright minds who pushed for C++ in GCC (and then left).
@civodul is it not possible to pass -std=gnu++11 to g++ if it's v11.x?