libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More libltdl problems


From: Gary V . Vaughan
Subject: Re: More libltdl problems
Date: Thu, 16 Aug 2001 23:48:57 +0100

On Wednesday 15 August 2001 2:58 am, John Gruenenfelder wrote:
> Hello again.

Hi.

> By following the CVS code, my previous problem of ltdl not being able to
> load my modules (despite them being there) has gone away.  However, the
> next step in the chain is now failing.

Glad to hear it =)O|

> After my program loads a modules, it tries to get the symbol
> "module_definition" out of the module.  This is now failing with an
> "unknown error" message.  By poking around in ltdl.c, I can see that the
> symbol name it is searching for is correctly
> "opc_fitsio_LTX_module_definition", yet it cannot find it.

Perhaps you could download some of the model examples from the Goat Book web 
pages (link in my .sig) and play with them to get a better feel for how this 
stuff all fits together?

> Also of note:  I remember that at the end of the compilation phase, libtool
> would extract symbols for every file I had named with '-dlopen' in the
> Makefile, giving lines like:
>   extracting global C symbols from `../modules/.libs/opc_fitsio.so'
>
> It does not do this anymore.  If I change the Makefile to use -dlpreopen, I
> once again see these lines, but the symbols still cannot be loaded.
>
> Am I doing something wrong, or is libltdl?

Neither.  If you use -dlpreopen, the static version of the named module will 
be linked into the executable (pre-loaded) so that the calls to lt_dlopen 
will work even on static only platforms.  The extraction phase you are seeing 
is some of the plumbing to make this work.

With -dlopen, libtool will fallback on preopening if there are no shared 
components to the modules you name, otherwise it has no effect on module 
loading.

Curiously, in either case (even when the module is preloaded) an appropriate 
.la file needs to be present in the module load path for loading to work.

HTH.

Cheers,
        Gary.
-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]