Symlinks and install_name on OS X Libraries

I had a question about the creation of the extra symlinks with version numbers and the embedded information in the dynamic libraries. Here is my issue:

First a listing of the lib directory (partial)
libhdf5.7.3.0.dylib@ -> libhdf5.1.8.9.dylib
libhdf5.dylib@ -> libhdf5.7.3.0.dylib

I see that libhdf5.1.8.9.dylib is the "real" library. So lets take a look at its embedded "install_path"

/Users/Shared/Toolkits/hdf5-1.8.9/lib/libhdf5.7.3.0.dylib (compatibility version 7.3.0, current version 1.8.9)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

So the install_name has this library pointing to another file libhdf5.7.3.0.dylib. But if we look at that "file" it is really a symlink back to the original file. So it appears I have a circular reference. Was this intended? What brings this up is that I was building my app against the 1.8.9 release and Xcode choked on the hdf5 library. Seems in my CMake file the check for HDF5 found libhdf5.1.8.9.dylib which points back to libhdf5.1.8.9.dylib via a symlink but that has an embedded install_name of libhdf5.7.3.0.dylib. So Xcode choked.

Anyone have any thoughts on this issue? Is this something fixable?


Mike Jackson Principal Software Engineer
BlueQuartz Software Dayton, Ohio