Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E5400632F5E for ; Thu, 15 Jul 2010 15:58:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 43858-06 for ; Thu, 15 Jul 2010 18:58:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id C9653632A64 for ; Thu, 15 Jul 2010 15:58:08 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 768EE348037; Thu, 15 Jul 2010 11:58:07 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qcr3njRgaMcl; Thu, 15 Jul 2010 11:58:05 -0700 (PDT) Received: from [75.142.153.107] (unknown [75.142.153.107]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id C6100348002; Thu, 15 Jul 2010 11:58:04 -0700 (PDT) Subject: Re: 8.3 to 8.4 - Can't load dynamic shared library From: "Joshua D. Drake" Reply-To: jd@commandprompt.com To: Craig James Cc: pgsql-admin@postgresql.org In-Reply-To: <4C3F583C.50208@emolecules.com> References: <4C3F583C.50208@emolecules.com> Content-Type: text/plain; charset="UTF-8" Organization: Command Prompt, Inc. Date: Thu, 15 Jul 2010 11:58:00 -0700 Message-ID: <1279220280.30528.56.camel@jd-desktop.unknown.charter.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201007/89 X-Sequence-Number: 35108 On Thu, 2010-07-15 at 11:49 -0700, Craig James wrote: > I'm migrating from Postgres 8.3.10 to 8.4.4, and also from Fedora 9 to Ubuntu 10.04. > > On 8.3.10, I have a C extension that worked on 8.3, but now refuses to load on 8.4: > > CREATE OR REPLACE FUNCTION chmoogle_session_id() RETURNS integer > AS '/usr/local/pgsql/lib/libchmoogle.so', 'chmoogle_session_id' > LANGUAGE 'C' VOLATILE; > ERROR: could not load library "/usr/local/pgsql/lib/libchmoogle.so": /usr/local/pgsql/lib/libchmoogle.so: undefined symbol: _ZN9OpenBabel4etabE > > So it finds the first shared library, libchmoogle.so. But the symbol _ZN9OpenBabel4etabE is from a second library, the OpenBabel (chemistry) shared library, which is also located in > > /usr/local/pgsql/lib/libopenbabel.so > > On the Postgres 8.3 system, I simply put libopenbabel.so into the /usr/local/pgsql/lib directory, and everything worked well. On 8.4, I can't seem to get it to load libopenbabel.so. Other programs that use this library have no trouble finding it. > > What (if anything) has changed from 8.3 to 8.4 regarding how it finds and links dynamic libraries? What else should I look for? I'm stumped on this one. > Studid question, but did you recompile the library against 8.4 first? > Thanks, > Craig > -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering