Discussion:
Build libperl.so shared library from static library or source?
(too old to reply)
DJ Stunks
2007-02-10 04:16:06 UTC
Permalink
Hey all,

I recently installed RHEL4, which included an RPM'd Perl (5.8.5
IIRC). I downloaded the source for Perl 5.8.8 which I managed to
build and install but I didn't opt to build the shared library
libperl.so.

After the newly built Perl seemed happy, I tore out the RPM'd Perl,
and replaced /usr/bin/perl with a link to the new executable.
However, /usr/bin/vim (and probably many other programs) are still
looking for the shared library.

Question: as I'm far from expert in this field, can I somehow build a
shared version of libperl either from libperl.a or from the source
files, or do I need to go through the entire Configure/make/test/
install procedure from scratch making sure I select the shared library
option?

TIA,
-jp
Sherm Pendley
2007-02-10 11:18:47 UTC
Permalink
Post by DJ Stunks
I recently installed RHEL4, which included an RPM'd Perl (5.8.5
IIRC). I downloaded the source for Perl 5.8.8 which I managed to
build and install but I didn't opt to build the shared library
libperl.so.
After the newly built Perl seemed happy, I tore out the RPM'd Perl,
and replaced /usr/bin/perl with a link to the new executable.
However, /usr/bin/vim (and probably many other programs) are still
looking for the shared library.
That's why most admins don't touch the vendor-supplied Perl. Too many things
depend on it, from applications that are linked to libperl to scripts that
haven't been fully tested on other versions.
Post by DJ Stunks
Question: as I'm far from expert in this field, can I somehow build a
shared version of libperl either from libperl.a or from the source
files, or do I need to go through the entire Configure/make/test/
install procedure from scratch making sure I select the shared library
option?
A better idea: Just reinstall the system Perl from RPMs. Seriously. Apps
that link against libperl are only binary-compatible with an identically-
configured libperl with the same minor version number, and even then it's
not a sure thing. There are often problems from one patch release to the
next too - i.e. 5.8.[012] for instance, where the changing hash algorithm
resulted in broken binary compatibility.

In other words, you can't simply plop any random libperl into the directory
where the vendor libperl was, and expect vim et al to be able to deal with
it. It has to be one that's identically configured, and very close to the
same version - and if that were the case, you probably be just as well off
using the vendor Perl anyway.

It's far more reliable, and far easier, to simply install your customized
Perl in an out-of-the-way location, and begin your scripts with a shebang
line that points to it, such as #!/usr/local/bin/perl.

sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Loading...