pl/perl and dynaloader

From: Nicolas Addington <ntype(at)u(dot)washington(dot)edu>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: pl/perl and dynaloader
Date: 2004-04-16 02:35:41
Message-ID: Pine.A41.4.58.0404081837470.19844@dante72.u.washington.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hello,

I'm having trouble loading modules in pl/perl. If I do something as
simple as

create function test () returns integer as '
use DBI;
return 1;
' language 'plperlu';

select test();

I get the following error:

ERROR: creation of function failed: Can't load
'/usr/local/lib/perl5/site_perl/5.6.0/aix/auto/DBI/DBI.so' for module DBI:
readExports: bad magic at /usr/local/lib/perl5/5.6.0/aix/DynaLoader.pm
line 200.
at /usr/local/lib/perl5/site_perl/5.6.0/aix/DBI.pm line 243
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.6.0/aix/DBI.pm line 243.
Compilation failed in require at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.

And it doesn't have to be DBI - any module that uses Dynaloader, that is,
that loads a C library, gives the same error. Now, I don't control the
perl installation on this host, so I'm not able to compile libperl.a as a
shared library, but all code on my platform is position-independent, which
various sources tell me is all I really need. And everything works fine
in pl/perl, except loading modules that use C libraries.

I'm running PostgreSQL 7.4.2, although this has been happening ever since
I started trying, somwhere back in the 7.2's. The host runs AIX 4.3 on an
IBM RS/6000.

Where do I go from here?

Thanks,
Nick Addington

Browse pgsql-interfaces by date

  From Date Subject
Next Message brian plummer 2004-04-19 14:13:09 PostgreSQL: libpq, win32 build
Previous Message Shelby Cain 2004-04-15 04:23:42 Re: Bulk updates/inserts