[Paraview] dlopen question

Mattijs Janssens m.janssens at opencfd.co.uk
Thu Oct 2 04:13:16 EDT 2008


I tried changing the flags on that. Currently is local scope:

	dlopen(libname, RTLD_LAZY); 

Anyone of 

	return dlopen(libname, RTLD_LAZY|RTLD_GLOBAL);
	return dlopen(libname, RTLD_LAZY|RTLD_DEEPBIND);

makes the paraview crash on start-up! (even without loading any user-defined 
reader).

Guess a testprogram is needed. Bit strange that there is no problem on OSX - 
seems to use the same code.


On Monday 29 September 2008 15:38, Takuya OSHIMA wrote:
> Hi Mattijs,
>
> If I'm not wrong it's in ParaView3/VTK/Utilities/kwsys/DynamicLoader.cxx.
>
> Takuya OSHIMA, Ph.D.
> Faculty of Engineering, Niigata University
> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>
> From: Mattijs Janssens <m.janssens at opencfd.co.uk>
> Subject: Re: [Paraview] dlopen question
> Date: Mon, 29 Sep 2008 10:41:18 +0100
>
> > Thanks Takuya,
> >
> > the thing I picked up from that discussion is to use RTLD_GLOBAL. Do you
> > know which routine is doing the dlopen inside Paraview - would like to
> > trace what is happening.
> >
> > Regards,
> >
> > Mattijs
> >
> > On Wednesday 24 September 2008 04:36, Takuya OSHIMA wrote:
> > > Hi Mattijs,
> > >
> > > Not sure if this helps, but interestingly a VisIt guy had a very
> > > similar problem around a week ago. You can follow the discussion by
> > > searching for "help with dlopen" in
> > > https://email.ornl.gov/pipermail/visit-developers/2008-September/thread
> > >.htm l .
> > >
> > > The caveat is that he says RTLD_LAZY|RTLD_GLOBAL solved the problem
> > > while apparently not in this case...
> > >
> > > Takuya OSHIMA, Ph.D.
> > > Faculty of Engineering, Niigata University
> > > 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
> > >
> > >
> > > From: Mattijs Janssens <m.janssens at opencfd.co.uk>
> > > Subject: [Paraview] dlopen question
> > > Date: Mon, 22 Sep 2008 10:22:49 +0100
> > >
> > > > In our code we use dlopen with RTLD_LAZY|RTLD_GLOBAL to optionally
> > > > load additional libraries.
> > > >
> > > > We noticed that this gives problems in the paraview reader. The same
> > > > code which happily loads when running from the command line now gives
> > > > undefined symbols when used through the reader.
> > > >
> > > > E.g. the additional library libAdditional uses a symbol aaa from
> > > > library libmain which is already a dependency of my application. (so
> > > > 'ldd application' shows up libmain). My application does a dlopen of
> > > > libAdditional and it all works fine.
> > > >
> > > > Now when invoked in a reader (the reader itself I assume is loaded
> > > > using dlopen into Paraview?) the dlopen of libAdditional complains
> > > > about unresolved symbol aaa. Funnily enough it works if we first do a
> > > > dlopen of libmain and then of libAdditional.
> > > >
> > > > Is this related to the flags passed into dlopen? To complicate the
> > > > matter, from what we heard, the problem does not appear on OSX.
> > > >
> > > > Regards,
> > > >
> > > > Mattijs
> >
> > _______________________________________________
> > ParaView mailing list
> > ParaView at paraview.org
> > http://www.paraview.org/mailman/listinfo/paraview
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview


More information about the ParaView mailing list