From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078724211978.tru64-unix-managers.marc@archive.invalid> From: Jeff Morrow Date: Tue, 20 Oct 1998 17:55:49 +0000 To: tru64-unix-managers Subject: Shared library troubles using NSAPI X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078724211978 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" 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" 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