Обсуждение: getting libperl.so
I'd like to write some functions in embedded perl. I have installed Mandrake from the RPMS recommended on this list a few days ago ( They worked great, by the way). I have also downloaded the source so I can compile plperl.so. But I can't because appearantly libperl.so is not configured properly on my machine. I'm using Mandrake 7.0, and the only copy of libperl.so that I can find is in: /usr/lib/apache (thanks to the mod-perl rpm). How do I get libperl.so so I can compile plperl? Thanks, ---------------------------------------------------------------- Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer ----------------------------------------------------------------
Travis Bauer <trbauer@indiana.edu> writes: > compile plperl.so. But I can't because appearantly libperl.so is not > configured properly on my machine. I'm using Mandrake 7.0, and the only > copy of libperl.so that I can find is in: /usr/lib/apache (thanks to the > mod-perl rpm). Probably your main perl installation is not using a shared libperl? You may have to pull down the perl source distribution and configure/compile/install it yourself. Should be pretty painless, really (certainly nothing to fear if you can build Postgres from source ;-)). Don't forget to say "yes" when the configure script asks you if you want a shared libperl. You can probably default all the other answers, except maybe for the location you want the perl directory tree placed ... regards, tom lane PS: be careful not to lose any Perl modules you may have installed that don't come with the source distribution.
> > Tom Lane wrote: > > > > > Travis Bauer <trbauer@indiana.edu> writes: > > > > compile plperl.so. But I can't because appearantly libperl.so is not > > > > configured properly on my machine. I'm using Mandrake 7.0, and the only > > > > copy of libperl.so that I can find is in: /usr/lib/apache (thanks to the > > > > mod-perl rpm). > > > > > > Probably your main perl installation is not using a shared libperl? > > > > > > You may have to pull down the perl source distribution and > > > configure/compile/install it yourself. Should be pretty painless, > > > really (certainly nothing to fear if you can build Postgres from > > > source ;-)). Don't forget to say "yes" when the configure script asks > > > you if you want a shared libperl. You can probably default all the > > > other answers, except maybe for the location you want the perl directory > > > tree placed ... > > > > > > regards, tom lane > > > > > > PS: be careful not to lose any Perl modules you may have installed > > > that don't come with the source distribution. or 'ar -a libperl.a' into a directory then gcc the resulting .o files into a single libperl.so You will have to run ldconfig and tweak the makefile because perl won't know that .so is available, but I've used this just fine on RedHat, which also doesn't include a shared libperl. Karl DeBisschop www.infoplease.com
Tom Lane wrote: > Karl DeBisschop <kdebisschop@h00a0cc3b7988.ne.mediaone.net> writes: > > or 'ar -a libperl.a' into a directory then gcc the resulting .o files into a > > single libperl.so > > That will only work on platforms where code is compiled > position-independent by default. Yes. Such seems to be the case for RedHat (and I believe all other x86 linux) > In any case, it won't persuade the existing plperl Makefile that libperl > is a .so file, because the Makefile looks at the build-time config data > that's recorded in some Perl module or other :-( I thought I had mentioned that as well - but the mods to the makefile are not difficult - just lop out the part where Makefile.PL checks for the .so - you just manually installed it, so you know it's there. And then make sure the .so is referenced on the subsequent gcc invocation Karl