PostgreSQL 8.1 x86_64 and 32bit shared objects

From: CG <cgg007(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: PostgreSQL 8.1 x86_64 and 32bit shared objects
Date: 2006-02-07 18:20:12
Message-ID: 20060207182012.43007.qmail@web32502.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-02-07 18:38:09 Re: PostgreSQL 8.1 x86_64 and 32bit shared objects
Previous Message Tom Lane 2006-02-07 18:16:28 Re: Actual expression of a constraint

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-02-07 18:38:09 Re: PostgreSQL 8.1 x86_64 and 32bit shared objects
Previous Message Tom Lane 2006-02-07 18:19:58 Re: streamlined standby procedure