The antlr-cpp runtime library (from dev-cpp/antlr-cpp-4.11.1) is not backward compatible with the code generated by antlr (from dev-java/antlr-4.9.3). Creating a local ebuild for dev-cpp/antlr-cpp-4.9.3 and downgrading to it fixed all previously encountered errors. Encountered compiling github.com/chipsalliance/Surelog.git with cmake options -DSURELOG_USE_HOST_ALL=ON -DSURELOG_USE_HOST_UHDM=OFF -DANTLR_LIBRARY=/usr/lib64/libantlr4-runtime.so this requires the packages dev-cpp/antlr-cpp dev-java/antlr dev-python/orderedmultidict dev-libs/capnproto dev-cpp/gtest dev-cpp/nlohmann_json