471,073 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

PlPERL and shared libraries on Suse

Hi,
I have an installation of Postgres 7.4.2 on SuSE 9.1. This version
of SuSE comes with a binary for plperl and several other postgres
procedural languages. All the others, including plpgsql install without
a problem, but executing:
createlang -u postgres plperl template1
produces the result:
createlang: language installation failed: ERROR: could not load library
"/usr/lib/postgresql/plperl.so": libperl.so: cannot open shared object
file: No such file or directory

The file, however, is there:

# ls -l /usr/lib/postgresql/plperl.so
-rwxr-xr-x 1 root root 37097 Apr 5 2004 /usr/lib/postgresql/plperl.so

Some googling gave me the idea that it may be a problem with the way
perl was compiled - i.e, perl is not compiled for shared libraries. Can
anyone confirm this? If so, do I need to rebuild perl, or pl/perl, or
both? Are there any binaries that can resolve this? (yes not wanting
to compile plperl is plain old laziness, but I do have reservations
about recompiling the perl interpreter)

Any ideas would be helpful.

Thanks,

Eric

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
3 3577
On Fri, Oct 22, 2004 at 12:13:12PM -0400, Eric E wrote:
Hi,
I have an installation of Postgres 7.4.2 on SuSE 9.1. This version
of SuSE comes with a binary for plperl and several other postgres
procedural languages. All the others, including plpgsql install without
a problem, but executing:
createlang -u postgres plperl template1
produces the result:
createlang: language installation failed: ERROR: could not load library
"/usr/lib/postgresql/plperl.so": libperl.so: cannot open shared object
file: No such file or directory

The file, however, is there:

# ls -l /usr/lib/postgresql/plperl.so
-rwxr-xr-x 1 root root 37097 Apr 5 2004 /usr/lib/postgresql/plperl.so

Some googling gave me the idea that it may be a problem with the way
perl was compiled - i.e, perl is not compiled for shared libraries. Can
anyone confirm this? If so, do I need to rebuild perl, or pl/perl, or
both? Are there any binaries that can resolve this? (yes not wanting
to compile plperl is plain old laziness, but I do have reservations
about recompiling the perl interpreter)


The error message gives you the hint you need. The missing file isn't
plperl.so - it's libperl.so.

libperl.so is the dynamic library version of perl. It's not usually
installed by most people building perl. (It's also not neccesarily
needed by plperl.so, as libperl.a can be statically linked into
plperl.so, I believe).

I don't know SuSEs package system (I always install from source) but
there may well be another perl package that would provide libperl.so.
Failing that you'll either need to build a perl installation and tell
Configure to build libperl.so, or rebuild plperl.so. It's also
possible that you do have libperl.so somewhere, but it's not on
the standard library search path and not where plperl expects
to find it.

'ldd' is a useful command for tracking down this sort of problem.

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #2
Eric E <wh*******@bonbon.net> writes:
createlang: language installation failed: ERROR: could not load library
"/usr/lib/postgresql/plperl.so": libperl.so: cannot open shared object
file: No such file or directory The file, however, is there: # ls -l /usr/lib/postgresql/plperl.so
-rwxr-xr-x 1 root root 37097 Apr 5 2004 /usr/lib/postgresql/plperl.so


It's complaining that it can't find libperl.so (ie, the Perl interpreter)
not plperl.so. Do you have a libperl.so? Is it in your ldconfig search
path?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #3
Hi Steve and Tom,
Thanks for the tip, I was clearly not reading the error message closely
enough.

I copied libperl.so into /lib, and now everything works.

Many thanks,

Eric

Steve Atkins wrote:
On Fri, Oct 22, 2004 at 12:13:12PM -0400, Eric E wrote:

Hi,
I have an installation of Postgres 7.4.2 on SuSE 9.1. This version
of SuSE comes with a binary for plperl and several other postgres
procedural languages. All the others, including plpgsql install without
a problem, but executing:
createlang -u postgres plperl template1
produces the result:
createlang: language installation failed: ERROR: could not load library
"/usr/lib/postgresql/plperl.so": libperl.so: cannot open shared object
file: No such file or directory

The file, however, is there:

# ls -l /usr/lib/postgresql/plperl.so
-rwxr-xr-x 1 root root 37097 Apr 5 2004 /usr/lib/postgresql/plperl.so

Some googling gave me the idea that it may be a problem with the way
perl was compiled - i.e, perl is not compiled for shared libraries. Can
anyone confirm this? If so, do I need to rebuild perl, or pl/perl, or
both? Are there any binaries that can resolve this? (yes not wanting
to compile plperl is plain old laziness, but I do have reservations
about recompiling the perl interpreter)

The error message gives you the hint you need. The missing file isn't
plperl.so - it's libperl.so.

libperl.so is the dynamic library version of perl. It's not usually
installed by most people building perl. (It's also not neccesarily
needed by plperl.so, as libperl.a can be statically linked into
plperl.so, I believe).

I don't know SuSEs package system (I always install from source) but
there may well be another perl package that would provide libperl.so.
Failing that you'll either need to build a perl installation and tell
Configure to build libperl.so, or rebuild plperl.so. It's also
possible that you do have libperl.so somewhere, but it's not on
the standard library search path and not where plperl expects
to find it.

'ldd' is a useful command for tracking down this sort of problem.

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Joshua D. Drake | last post: by
2 posts views Thread by Christopher Murtagh | last post: by
4 posts views Thread by Ed L. | last post: by
6 posts views Thread by Gianni Mariani | last post: by
1 post views Thread by gilles.rayrat | last post: by
5 posts views Thread by David T. Ashley | last post: by
reply views Thread by rski | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.