PostgreSQL 8.1 x86_64 and 32bit shared objects - Mailing list pgsql-admin

From CG
Subject PostgreSQL 8.1 x86_64 and 32bit shared objects
Date
Msg-id 20060207182012.43007.qmail@web32502.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Actual expression of a constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PostgreSQL 8.1 x86_64 and 32bit shared objects
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Actual expression of a constraint
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL 8.1 x86_64 and 32bit shared objects