the Bitcoin autogen'ed makefile compiles a static binary, i.e. all dependencies are a part of the final binary executable.
you must have changed something in configure.ac or the makefile, or deleted the bundled 3rd party libs. An untouched bitcoin.git doesn't behave how you're describing, and never has AFAIK
start again, delete the directory and
git clone https://github/bitcoin/bitcoin.gitalso, use
strip bitcoin* on all exectuables you compile to reduce the size of the binaries. They
still won't be byte-for-byte identical to the official binaries, you need to use gitian (or guix in future) to get precisely the same binaries as the official ones.
strip will only reduce the binary size to a similar value.
all functionality is the same, regardless of whether you use the strip command or not.
but, using different version of the 3rd party libraries than those bundled with the Bitcoin repo will result in different behaviour, some 3rd party libs are forks maintained specifically for the Bitcoin project, while others are frozen to an old version to maintain consistent behaviour between Bitcoin nodes of differing versionsif you use different 3rd party libraries, you
cannot expect such a Bitcoin node to function correctly (arguably, it isn't even a proper Bitcoin node when you use the wrong 3rd party libs to compile bitcoin source code)