I normally have MAKEOPTS=-j5 set on a Core i5 4690K box. While updating the system this morning, the MariaDB ebuild kept failing. When building sql/sql_digest.cc, it would complain that lex_token.h was missing. I found this in the MariaDB bug tracker: https://mariadb.atlassian.net/browse/MDEV-8556 This would suggest that perhaps parallel make should be disabled for this package. I commented out MAKEOPTS in my make.conf (and FEATURES, too, which had parallel-fetch and ccache enabled) and ran the build again. This time, it worked.
Please attach your build.log and emerge --info.
I didn't save a failed build log from earlier, and now that it has been successfully installed, I can't get it to fail. MAKEOPTS is set to -j5 and I've disabled ccache, yet it's just gone 2 for 2 on successful builds.
Created attachment 435988 [details] emerge --info
Created attachment 435990 [details] emerge --info
I'm closing for now, if it happens again, please re-open and attach the build log. Thanks!