Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group