From owner-freebsd-questions Mon Dec 13 14:55:13 1999 Delivered-To: freebsd-questions@freebsd.org Received: from hercules.crossthread.com (hercules.crossthread.com [139.142.137.200]) by hub.freebsd.org (Postfix) with ESMTP id 33DEA14C40 for ; Mon, 13 Dec 1999 14:55:05 -0800 (PST) (envelope-from timp@crossthread.com) Received: from cgytpushor (shl-host1.shl.ca [209.135.106.225]) by hercules.crossthread.com (8.9.3/8.9.3) with SMTP id PAA35743; Mon, 13 Dec 1999 15:54:55 -0700 (MST) Message-ID: <00cc01bf45bc$bb057b10$9828f99f@shl.com> From: "Tim Pushor" To: "Alfred Perlstein" , References: Subject: Re: Apache DSO problems Date: Mon, 13 Dec 1999 15:51:57 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Mon, 13 Dec 1999, Tim Pushor wrote: > > > Hello, > > > > I have compiled apache to use the DSO loading mechanism for modules and all > > is working well. I just tried to compile a 3rd party module as a DSO, and it > > seemed to work, but when apache tries to initialize the module, I get an > > error message: > > > > Syntax error on line 238 of /usr/local/etc/apache/httpd.conf: > > Cannot load /usr/local/libexec/apache/mod_auth_pgsql.so into server: > > /usr/local/libexec/apache/mod_auth_pgsql.so: Undefined symbol "PQexec" > > > > The module is mod_auth_pgsql 0.9.0, and it does support DSO. The symbol that > > the server cannot locate is in an external shared lib - libpg.so. > > > > I have tried various command line incantations while compiling the module as > > well as ensuring the loaders library cache contains the dir that the library > > is in (/usr/local/pgsql/lib). > > > > Reading the apache documentation on the DSO mechanism it suggests that there > > may be problems with this on non ELF architectures (which this is obviously > > not). > > > > Could someone help shed some light on this? For the meantime I will use > > static modules, but would *really* like to use DSO. > > > > As an FYI, I am using the apache13 port on FreeBSD 3.3-RELEASE. > > As a hack I would try to link the DSO with the libpq statically, > ie force it the DSO to link to the .a version of libpq. I did try this, but for some reason apache could not then load the module. It was complaining about not being able to resolve certain interfaces (like the main one :) symbol tables. > > Another way you may be able to fix this is to compile libpq as a > DSO and load it before you load the mod_auth_pgsql.so. > Not sure how I would do this one, but sort of follows something that I was thinking earlier: I could take apart the dynalib into object modules and link them directly into the module. I really don't want to do something like this, as doing upgrades to postgresql or any other dependent library will involve the same re-hackery... Thanks for the advice.. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message