Shared library troubles using NSAPI

From: Jeff Morrow <jmorrow_at_socrates.berkeley.edu>
Date: Tue, 20 Oct 1998 10:55:49 -0700

Hi there. I'm having a problem with a new shared library I'm writing for
use as an NSAPI module. This new module isn't really any different from
the others I've written (it takes some get or post input and saves it into
a MySQL database). But it crashes, and depending on my obj.conf (which
controls load order of the shared libraries), it crashes differently.

When my obj.conf looks like this:

Init fn=load-modules
shlib="/usr/users/jmorrow/nsapi/registerLastAc/registerLastAc.so"
funcs="registerLastAc"
Init fn=load-modules shlib="workingNSAPI.so" funcs="workingNSAPI"
<other working NSAPI defs in here>

the server will not start, giving the following error:

conf_init: Error running init function(late) load-modules: dlopen of
/usr/users/jmorrow/nsapi/registerLastAc/registerLastAc.so failed (dlopen:
Unresolved symbols) Failed to initialize server.

But when my obj.conf looks like this:

Init fn=load-modules shlib="workingNSAPI.so" funcs="workingNSAPI"
<other working NSAPI defs in here>
Init fn=load-modules shlib="/usr/users/jmorrow/nsapi/registerLastAc/
registerLastAc.so" funcs="registerLastAc"

the server will start but will crash as soon as it hits the first MySQL
call. This will also happen if I remove all the working NSAPI calls,
leaving only registerLastAc. This is really puzzling for two reasons. 1)
I know that MySQL calls work because several of my other working NSAPI
modules use MySQL just fine. 2) I know that MySQL symbols are definitely
resolved because a gdb run of the server indicates that
/usr/shlib/libmysqlclient.so is in fact loaded.

In addition, the crashes occur similarly whether libmysqlclient is
statically or dynamically linked. AND a similar program run from the
command line works fine.

I'm really confused here and not sure where to begin. I think it's a
shared library problem of some sort. Why would different behavior happen
depending on load order? Why would other NSAPI modules that use MySQL work
and this one crash? Can anyone help?

My system info: Netscape FastTrack 3.01 running on Digital Unix 4.0D on a Dec
AlphaServer 400.

Thanks.

Jeff Morrow
Received on Tue Oct 20 1998 - 17:55:48 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT