I wrote a C program last year, debugged all stuff you mention with Valgrind and that's it. This program will run for years, even decades to come.
I prefer this approach instead of endlessly fixing everbreaking dependencies, at least for my own programs, for which I don't get money for maintenance.