I will also add something as I encountered this quite recently.
ldd ... etc. will show you the libraries statically linked (at compile), but there may also be ones dynamically pulled in when (eg) glxinfo is loaded.
If you think this is the case (i.e. you still seem to be missing libraries) you can use strace:
strace -o outfile /usr/X11R6/bin/glxinfo
This will then run glxinfo as above but also output what it's doing to load in modules at runtime.
You can then do:
to view any problems in detail. Look for <module_name>.so.0 etc. Then you just have to figure out which errors matter!