X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 017B49DCA69 for ; Tue, 7 Feb 2006 14:20:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13252-06 for ; Tue, 7 Feb 2006 14:20:15 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web32502.mail.mud.yahoo.com (web32502.mail.mud.yahoo.com [68.142.207.212]) by postgresql.org (Postfix) with SMTP id E56239DC8AE for ; Tue, 7 Feb 2006 14:20:12 -0400 (AST) Received: (qmail 43009 invoked by uid 60001); 7 Feb 2006 18:20:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kdth1TpvkLbukgf//TFg0nf++QXbGHcXOW0dqdpMQualJcd3KkjaCDuq01WvyY+Vb2AuCrcsaNrQsmi7oIbLEbECKKBs/AG4d1WMHP6yGiGU7b1eOjwOFupDaY021Oth5FC8qTRirmTk0H5RBSqOhuYAuS6iHSP840olAK24n08= ; Message-ID: <20060207182012.43007.qmail@web32502.mail.mud.yahoo.com> Received: from [216.173.173.66] by web32502.mail.mud.yahoo.com via HTTP; Tue, 07 Feb 2006 10:20:12 PST Date: Tue, 7 Feb 2006 10:20:12 -0800 (PST) From: CG Reply-To: cgg007@yahoo.com Subject: PostgreSQL 8.1 x86_64 and 32bit shared objects To: pgsql-admin@postgresql.org In-Reply-To: <7508.1139328081@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.479 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479] X-Spam-Score: 0.479 X-Spam-Level: X-Archive-Number: 200602/70 X-Sequence-Number: 20491 Let me preface this by disclosing that I'm a novice when it comes to 64bit computing, so please be kind. :) I've wrapped a 32bit closed-source .so library in a C program which exposes it's functionality to PostgreSQL. Compiling the wrapper with gcc64 fails, but compiling the wrapper with gcc32 seems to work fine. PostgreSQL, which was built using the 64bit compiler, won't allow me to reference the library when I create the function: data=# CREATE OR REPLACE FUNCTION getvalue(text,text) data-# returns text data-# as '$libdir/wrapper' data-# language 'C'; ERROR: could not load library "/usr/local/pgsql-8.1.2/lib/wrapper.so": /usr/local/pgsql-8.1.2/lib/wrapper.so: cannot open shared object file: No such file or directory data=# Of course, wrapper.so is in the correct spot. Being the novice that I am, I thought that 32bit and 64bit binary code could be used interchangeably. Is there some incompatibility of which I am unaware? Is there perhaps some type of compatibility flag that I should be using, or a wrapper for my wrapper? It is important that the overall operation of PostgreSQL is as fast and as powerful as possible. While the functionality in the library that I want to use from PostgreSQL is important, it is not mission-critical. Please advise! Thanks! CG __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com