Re: libltdl segfaults on lt_dlsym

2002-12-30 Thread Albert Chin
On Mon, Dec 30, 2002 at 04:42:50PM +1100, Conrad Canterford wrote:
> This is almost certainly a user error, not a libltdl error, but I cannot
> work out how to make this work. I have a .so file which contains my user
> interface. The main program finds the path to it and the names of
> varioius subroutines within it from within its config file. It does an
> lt_dlinit(), and then an lt_dlopen(char */path/to/library). This works
> fine, and I can see the handle returned. However, I next try and do an
> lt_dlsym(handle, char *symname), and it segfaults each and every time.
> Is there some step I'm missing, or something else I'm likely to have
> forgotten to do that is required?

What version of libtool? I think 1.4.3 had some ltdl patches.

-- 
albert chin ([EMAIL PROTECTED])


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



Re: libltdl segfaults on lt_dlsym

2002-12-30 Thread Roger Leigh
Conrad Canterford <[EMAIL PROTECTED]> writes:

> This is almost certainly a user error, not a libltdl error, but I cannot
> work out how to make this work. I have a .so file which contains my user
> interface. The main program finds the path to it and the names of
> varioius subroutines within it from within its config file. It does an
> lt_dlinit(), and then an lt_dlopen(char */path/to/library). This works
> fine, and I can see the handle returned. However, I next try and do an
> lt_dlsym(handle, char *symname), and it segfaults each and every time.
> Is there some step I'm missing, or something else I'm likely to have
> forgotten to do that is required?

Have you named the symbol(s) correctly in the module?  They should be
prefixed with "modulename_LTX_"?

Check with "nm -D":
000af960 D pcl_LTX_stp_module_data
000af944 D pcl_LTX_stp_module_version
(in this case, the module is pcl.la and pcl.so, and the symbols I ask
for with dlsym() are "stp_module_data" and "stp_module_version").

See libtool.info, node "Modules for libltdl".  This had me stumped for
a while, until I found a typo in the module name part of the symbol!


HTH,
Roger

-- 
Roger Leigh

Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848 available on public keyservers


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool