The problem here is that -n implies -N which instructs ldconfig not to rebuild the cache.
-n
Only process directories specified on the command line. Don't process the trusted directories (/lib and /usr/lib) nor those specified in /etc/ld.so.conf. Implies -N.
-N
Don't rebuild the cache. Unless -X is also specified, links are still updated.
The following files exist in /usr/local/lib:
- file libmy.so.0.0.0
- symlink libmy.so.0 -> libmy.so.0.0.0
- symlink libmy.so -> libmy.so.0.0.0
When I call ldconfig with the verbose flag manually after make install (cache is still not updated), it does not seem to detect all of them:
$ ldconfig -v -n /usr/local/lib
/usr/local/lib:
libmy.so.0 -> libmy.so.0.0.0
In my opinion, ldconfig option -n should not imply -N or at least update the cache according to the changes (added, modified and deleted files).