molds makefile uses -std=c++20, gcc versions before gcc-10 don't understand this but demand -std=c++2a I tried to patch the file and go ahead with gcc-9 just for fun, but that makes it only more angry with stash headers missing errors, which seems like a dead giveaway of incomplete c++20 support in the compiler. from the readme.md: mold is written in C++20, so if you build mold yourself, you need a recent version of a C++ compiler and a C++ standard library. GCC 10.2 or Clang 12.0.0 are recommended.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a8eb5890e84734a4d152d270750406950f278c7 commit 8a8eb5890e84734a4d152d270750406950f278c7 Author: Matthew Smith <matthew@gentoo.org> AuthorDate: 2022-02-22 20:35:50 +0000 Commit: Matthew Smith <matthew@gentoo.org> CommitDate: 2022-02-22 21:06:16 +0000 sys-devel/mold: check compiler version Acked-by: Sam James <sam@gentoo.org> Closes: https://bugs.gentoo.org/831473 Closes: https://github.com/gentoo/gentoo/pull/24321 Signed-off-by: Matthew Smith <matthew@gentoo.org> sys-devel/mold/mold-1.0.3.ebuild | 11 +++++++++++ sys-devel/mold/mold-1.1.ebuild | 11 +++++++++++ sys-devel/mold/mold-9999.ebuild | 11 +++++++++++ 3 files changed, 33 insertions(+)