About gencache: a quick search suggests that it's not really viable to get a different version of glibc on your system, since a lot of other stuff depends on it. (And that it's apparently very weird to require a specific version of it?)
Fortunately the gencache code seems really simple, so I've written a Python replacement for it. I haven't tested it much, but it seems to do fine with my own project. Hopefully it helps?
Barring that, you can always try to build gencache yourself, I guess!