From: CG <cgg007@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: PostgreSQL 8.1 x86_64 and 32bit shared objects
Date: Tue, 7 Feb 2006 10:20:12 -0800 (PST)
Message-ID: <20060207182012.43007.qmail@web32502.mail.mud.yahoo.com> (raw)
In-Reply-To: <7508.1139328081@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: cgg007@yahoo.com
Subject: Re: PostgreSQL 8.1 x86_64 and 32bit shared objects
In-Reply-To: <20060207182012.43007.qmail@web32502.mail.mud.yahoo.com>
References: <7508.1139328081@sss.pgh.pa.us> <20060207182012.43007.qmail@web32502.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox