Make sure that shared libraries link with the shared libraries built in the build tree, instead of the system provided libraries.
Libraries and executables were linked with the system libraries if present, and possibly using static archives instead of shared libraries.