Gentoo users select a "profile" which sets many default values for building and running applications. The new (still "testing" but soon to be released as "stable") 17.1 profiles remove the lib -> lib64 symlink. A Gentoo bug (https://bugs.gentoo.org/686750) has been filed which reports "ninja: error: '/usr/lib/libgmp.so', needed by 'lib/libkmm_mymoney.so.5.0.4', missing." That library IS present under /usr/lib64. (I have not yet moved to the 1.7.1 profile, so I cannot confirm or test.) Note that this is a build, not a configuration, failure, so I wonder if there is something in how ninja deals with $libdir as set (or not?) by ccmake.
The above error with libgmp.so seems to be resolved by rebuilding libalkimia, but I now get ninja: error: '/usr/lib/libmpir.so', needed by 'lib/libkmm_mymoney.so.5.0.4', missing and no known rule to make it.
Fortunately, it seems that recompiling libalkimia fixed the initial error, and now recompiling again fixes the new issue, probably because it is actually libalkimia calling for libmpir. I'm going to close this as WORKSFORME, and will only reopen if anything new does point back to ninja or cmake.