I'm trying to run ePSXe on a multilib system. It requires libtinfo which is now in libncurses so I had to create a symlink /lib32/libtinfo.so.5 -> /lib32/libncurses.so.5.9 but the epsxe executable still cant find it. I think it has something to do with the loader caching it as libncurses.so.5. If I run epsxe with LD_LIBRARY_PATH=/lib32 it works just fine. So my question is, is there any way to get the loader to cache this library correctly? Bellow is the ldd output with and without LD_LIBRARY_PATH=/lib32 as you can see in both cases it loads ncurses but without the LD_LIBRARY_PATH it still tries to load libtinfo as if it doesnt know its already loaded?

To answer your specific question, the ">>> Regenerating /etc/ld.so.cache..." step of emerging any library essentially runs "ldconfig -X", which you can also run manually.

But the cleaner solution is probably to enable ncurses' "tinfo" USE flag, either globally or with "echo sys-libs/ncurses tinfo >> /etc/portage/package.use". (And/or fix the ebuild dependency for that flag, if you are writing an ebuild for ePSXe.) Although see discussions for bug 452532 and bug 487844, and if you haven't switched to USE=amd_x86_32, I'm not sure if emul-linux supplies libtinfo.