[visit-users] Making a database reader plugin using a third party library.

Olivier Cessenat cessenat at free.fr
Tue Mar 16 13:54:49 EDT 2010


Thank you Mark, it makes it if the .a library is available.
But I thought of some visit mechanism, that would -at the same time as
it checks the plugin's compatibility with the current VisIt release -
add the plugin's directory to the list of the ldpaths, on the fly.
Cheers,
Olivier.

Le lundi 15 mars 2010 à 09:18 -0700, Mark Miller a écrit :
> Hi Olivier,
> 
> Not sure if someone already answered but the simplest thing to do is to
> link your lib directly into the plugin .so's.
> 
> You can do this by NOT passing '-L<path-to-lib-dir>' and '-l<libname>'
> when linking the plugin's .so's and instead link them by passing the
> path to the lib's .a file itself as in... '/foo/bar/lib/mylib.a'
> 
> I think there may be another way to achieve same end with appropriate
> use of '-static' linker flags (gcc) but have never tried it that way.
> 
> We used to do this will all our HDF5 plugins but then that means each
> instance of an HDF5 plugin loads the WHOLE HDF5 library into memory
> (that lib is pretty big) and is wasteful, so when we have HDF5 lib
> support built in, we include a link to it from our 'lib' directory (I am
> describing pre-2.0 behavior) and do the rpath thing.
> 
> Mark
> 
> On Sat, 2010-03-13 at 10:37, Olivier Cessenat wrote:
> > Hello,
> > 
> > I'm using a database reader plug-in that uses a third party (dynamic)
> > library (tp.so).
> > I can install the third party lib at the same place as the plug-in,
> > typically in a user directory - I do not necessarily have write access
> > to VisIt's installation directory.
> > When visit loads the plug-in, it complains that it cannot find the third
> > party lib :
> > <<
> > Error opening plugin
> > file: /home/cessenat/VISITTRUNK/src/plugins/databases/libMdonDatabase.so
> > (libtp.so: cannot open shared object file: No such file or directory)
> > >>
> > This is rooted in the fact that the LD_LIBRARY_PATH is not set to the
> > plugin directory, only to visit's third party libs directory.
> > On Macos, the DYLD_LIBRARY_PATH in the legacylauncher is set to
> > $ENV{HOME}/.visit/$archdir/plugins, but not to 
> > $ENV{HOME}/.visit/$archdir/plugins/databases.
> > 
> > How can I make VisIt load the third-party lib that lies on the same
> > directory as the used plug-in ? Can I do that in a client/server mode ?
> > Thanks for the hints !
> > 
> > Sincerely,
> > 
> > Olivier Cessenat.
> > 
> > PS: probably an already asked question... sorry.
> > 
> > 
> > 
> > 
> > 
> > --
> > List subscription information: https://*email.ornl.gov/mailman/listinfo/visit-users
> > Searchable list archives: https://*email.ornl.gov/pipermail/visit-users
> > VisIt Users Wiki: http://*visitusers.org/
> > Frequently Asked Questions for VisIt: http://*visit.llnl.gov/FAQ.html





More information about the visit-users mailing list