Closed dbhart closed 9 years ago
Hi David, from the output of otool -L it looks like the HDF5 libraries are not linked. Do you have them installed and did you adapt the build system scripts you used?
I was able to finally use CMake to build and link them correctly. CMake would not let me use the HDF5_ROOT environment variable to point to the correct version of the HDF5 libraries (MacPorts only supplies a 64-bit library of HDF5, and to link with VMD it seemed to need a 32-bit version). Consequently, I made some changes to the CMakeLists.txt, and once I changed the extension from .dylib to .so, it finally worked!
Thanks for the help!
Unfortunately I don' t have the possibility to check wether the build systems run under Mac OS.Therefore thanks for the hints regarding Mac OS. I think the Makefiles should also work with the Mac OS specific paths provided.
So, this is not necessarily a Mac specific problem (although I'll write up my notes, if you'd like) as it was the CMake find_package(hdf5) that was causing issues -- no matter what I did or what environment variable I changed (and I looked up the HDF5 and CMake find_package docs), it would always find the version of hdf5 that I didn't want, and ignored my specified build. Anyway, thanks again for the help!
I am not yet familiar with the cmake build system. So far it has been provided by Felix. I would appreciate if you could provide a fix for the situation you mentioned. Thanks already for pointing out the problems.
Just to keep the reference: a solution is sketched here: http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/26094.html
I've been building for Mac with the binary distribution of VMD. I was able to add the -m32 and -arch-i386, but it still looks as if it may not be linking properly (there is currently a discussion on VMD mailing list). The following occurs on VMD startup:
Warning) Unable to open dynamic library '/Applications/VMD.app/Contents/vmd/plugins/MACOSXX86/molfile/h5mdplugin.so'. Warning) dlopen(/Applications/VMD.app/Contents/vmd/plugins/MACOSXX86/molfile/h5mdplugin.so, 2): Library not loaded: libh5md.so Warning) Referenced from: /Applications/VMD.app/Contents/vmd/plugins/MACOSXX86/molfile/h5mdplugin.so Warning) Unable to dlopen '/Applications/VMD.app/Contents/vmd/plugins/MACOSXX86/molfile/h5mdplugin.so': Unable to dlopen plugin file /Applications/VMD.app/Contents/vmd/plugins/MACOSXX86/molfile/h5mdplugin.so Warning) Didn't find the register function in/Applications/VMD.app/Contents/vmd/plugins/MACOSXX86/molfile/libh5md.so; plugin(s) not loaded.
As suggested in mailing list, I ran otool:
$ otool -L h5mdplugin.so h5mdplugin.so: h5mdplugin.so (compatibility version 0.0.0, current version 0.0.0) libh5md.so (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
Is this an issue of not linking properly to the HDF5 libraries, or is this an issue in H5MD plugin?