VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jul 14 2015 - 15:03:05 CDT
Thanks for summarizing your final results for the list. I'm sure that
this will be beneficial for other people compiling plugins on MacOS X
if they have external dependencies, etc.
On Tue, Jul 14, 2015 at 07:52:02PM +0000, Hart, David Blaine wrote:
> It took me a while, but I was able to finally solve this :-) You are right
> on the cause - it was not linking with the HDF5 libraries. That was
> complicated by the fact that, despite overriding the HDF5 library location
> with the 32-bit binaries (to be compatible with VMD), Cmake was not
> recognizing that override and was still trying to link with 64-bit libs ??
> hence why they weren??t linked in properly. I did also change to build with
> 32-bit clang, not gcc (CFLAGS=LDFLAGS=-m32). So if anyone needs a Mac
> 10.10 H5MD-molfile binary, I have one!
> Thank you for the help!
> David Hart
> P.S. making sure .dylib is renamed (or soft linked) to a .so file was also
> necessary for the plugin loader to recognize the plugin at all - I assume
> this is true for any Mac-built plugins.
> On 7/14/15, 1:45 PM, "John Stone" <johns_at_ks.uiuc.edu> wrote:
> > I think that the issue with loading the h5md plugin might be
> >caused by either an unresovled dependency (from the perspective of
> >the h5mdplugin.so shared object at the point when VMD calls dlopen()),
> >or by the MacOS X runtime not searching the directory where the
> >libraries it depends on are located. To get VMD to be completely
> >self-contained, we have to override the normal MacOS X search path
> >by using "otool" to set the search path for things like Tcl so that
> >they are relative to the VMD install folder. If you have compiled
> >h5mdplugin.so against other libraries, MacOS X may or may not do
> >the right thing with resolving dependencies if the libraries it needs
> >aren't already in your framework or dyld search paths.
> >Yet another potential problem might be caused by mixing code compiled
> >via clang vs. code compiled with GNU gcc/g++. All of the existing
> >shipping versions of VMD were compiled using gcc/g++ rather than clang
> >since this produces binaries that will run on any later version of
> >MacOS X. It is possible that clang and gcc are incompatible in various
> >ways and this might explain why h5mdplugin.so doesn't load if you used
> >clang to compile it.
> > John Stone
> > vmd_at_ks.uiuc.edu
> >On Mon, Jul 06, 2015 at 10:26:13PM +0000, Hart, David Blaine wrote:
> >> Hi John,
> >> On 7/6/15, 3:42 PM, "John Stone" <johns_at_ks.uiuc.edu> wrote:
> >> >Hi,
> >> > I'm fairly certain that the issue here is that there are unresolved
> >> >dependencies in the H5MD when VMD calls dlopen()/dlsym() on the
> >> >H5MD plugin shared library file, resulting in dlopen()/dlsym()
> >> >an error, which VMD then reports as a plugin load failure.
> >> >
> >> >What output do you get if you run this command?:
> >> > 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)
> >> >
> >> >Perhaps we should include the H5MD plugin authors on this email
> >> >exchange...
> >> I believe Jonas is the author, and I believe he is on this list;
> >> If I understand correctly, you are suggesting that the
> >> (both created by the plugin) arenšt properly linked to the HDF5-1.5
> >> libraries?
> >> Thanks,
> >> David
> >NIH Center for Macromolecular Modeling and Bioinformatics
> >Beckman Institute for Advanced Science and Technology
> >University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
-- NIH Center for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349 http://www.ks.uiuc.edu/Research/vmd/