Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 38217
Status: resolved
Priority: 0/
Queue: PAR

People
Owner: Nobody in particular
Requestors: i386x [...] gmx.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: script looking for libperl.so.5.8, but libperl.so.5.8.8 exists
PAR Packager, version 0.980 SystemRescueCD - all versions ./myapp: error while loading shared libraries: libperl.so.5.8: cannot open shared object file: No such file or directory Workaround: rename libperl.so.5.8.8 to libperl.so.5.8 in /tmp/par-root/.. folder Is it possible to fix? Thanks
From: i386x [...] gmx.de
correction: the executable was build on ubuntu 8.04, then run on systemrescuecd, Fedora 8 Live , grml, puppy-4.00, CentOS-5.2, openSUSE-11.0 - all of them need the workaround with renaming. not affected: knoppix and ubuntu -based distros
Subject: Re: [rt.cpan.org #38217] script looking for libperl.so.5.8, but libperl.so.5.8.8 exists
Date: Wed, 6 Aug 2008 13:18:49 +0200
To: bug-PAR [...] rt.cpan.org
From: "Roderich Schupp" <roderich.schupp [...] googlemail.com>
Show quoted text
> correction: the executable was build on ubuntu 8.04, then run on > systemrescuecd, Fedora 8 Live , grml, puppy-4.00, CentOS-5.2, > openSUSE-11.0 - all of them need the workaround with renaming.
Did you build PAR::Packer yourself or installed it from a distro package? What's probably happend here: When building PAR::Packer it looks for the shared perl library and apparently found /usr/lib/libperl.so.5.8.8. It added it *under this name* into the proto-packed executable (which becomes a part of any "real" PAR-packed executable), hence that is the name which is also used for extraction. Now the proto-packed executable also contains a custom Perl interpreter, linked against said shared library. But it references (and looks for at runtime) the internal soname of the library which is most likely libperl.so.5.8. Looking at the Ubuntu packages I see a possible scenario how this might happen when building PAR:Packer and package libperl5.8_5.8.8-12 is installed, but libperl-dev_5.8.8-12 is *not* installed: - perl_5.8.8-12 has Config{libperl}="libperl.so.5.8.8" - find_file in myldr/Makefile.PL first looks for libperl.so (via DynaLoader::dl_findfile), but doesn't find it (because the symlink /usr/lib/libperl.so is contained in package libperl-dev_5.8.8-12 which isn't installed) - find_file now tries to locate $Config{libperl} in several directories, finds /usr/lib/libperl.so.5.8.8 and returns that If libperl-dev_5.8.8-12 had been installed, find_file would have found /usr/lib/libperl.so, resolved that symlink (once) to /usr/lib/libperl.so.5.8 and used that - that would have worked. But this strategy is also fragile: Why resolve only one level of symlinks - after all (in this case) /usr/lib/libperl.so.5.8 is also a symlink (to /usr/lib/libperl.so.5.8.8) which wouldn't have worked. What if /usr/lib/libperl.so hat directly resolved to /usr/lib/libperl.so.5.8.8? The real solution would be to look for the shared library file (because it has to be included in the proto-executable), but as extraction name use whatever the platform linker stores in the custom Perl interpreter when linking it. However that is highly platform dependent... The alternative would be to link a static version of libperl, but that might not be readily available in your Perl installation. Cheers, Roderich
From: i386x [...] gmx.de
Hello and thanks for your replay On Wed Aug 06 07:19:31 2008, roderich.schupp@googlemail.com wrote: Show quoted text
> Did you build PAR::Packer yourself or installed it from a distro > package?
I build it myself with perl -MCPAN -eshell Show quoted text
> Looking at the Ubuntu packages I see a possible scenario how this > might > happen when building PAR:Packer and package libperl5.8_5.8.8-12 > is installed, but libperl-dev_5.8.8-12 is *not* installed:
the package libperl-dev was installed It all could happened because of my messed install. I'll try to install PAR::Packer from distro package and check again. But before I need to figure out how to remove PAR::Packer builded with CPAN. Many thanks regards
Subject: Re: [rt.cpan.org #38217] script looking for libperl.so.5.8, but libperl.so.5.8.8 exists
Date: Thu, 7 Aug 2008 13:45:23 +0200
To: bug-PAR [...] rt.cpan.org
From: "Roderich Schupp" <roderich.schupp [...] googlemail.com>
On Wed, Aug 6, 2008 at 11:40 PM, eszett via RT <bug-PAR@rt.cpan.org> wrote: Show quoted text
> I build it myself with perl -MCPAN -eshell > the package libperl-dev was installed
OK, here's what you should look for: (1) Where's your shared perl library (on *nix typically named "libperl*.so*") installed and under what names - there could be several symlinks, e.g. (some release of) Debian/Ubuntu has /usr/lib/libperl.so -> /usr/lib/libperl.so.5.8 -> /usr/lib/libperl.so.5.8.8 Note that the leftmost symlink exists only if you have package libperl-dev installed. (2) Note the internal "soname" of said shared library, e.g. $ readelf -d /usr/lib/libperl.so.5.8.8| grep soname 0x0000000e (SONAME) Library soname: [libperl.so.5.8] (3) Note what your Perl knows about the shared Perl library $ perl -MConfig -e 'print $Config{libperl}, "\n"' libperl.so (4) When building PAR::Packer yourself, after running "perl Makefilel.PL", check what the following two lines in myldr/Makefile contain in the LIBPERL position: my_perl.c: $(PERL) F2C LIBPERL $@ load_me_0 LONG_LITERAL CHUNK_SIZE (5) LIBPERL may contain any name of your shared Perl library, but basename(LIBPERL) should be exactly the soname determined in (2), because basename(LIBPERL) is what will be used when the copy of LIBPERL conatined in your PAR-packed executable is extracted. Unfortunately (1)-(5) is _not_ the recipe implemented in myldr/Makefile.PL, but rather some heuristics that may sometimes fail. I'm highly convinced that in your case you ended up with LIBPERL=/usr/lib/libperl.so.5.8.8, but soname=libperl.so.5.8 Show quoted text
> I'll try to install PAR::Packer from distro package and check again. But before I need to > figure out how to remove PAR::Packer builded with CPAN.
It shouldn't be hard as Debian/Ubuntu have configured Perl so that CPAN-built modules will install into /usr/local, instead of messing up /usr/lib etc. BTW, Debian has a package "dh-make-perl" that will (in most cases) automatically take a module from CPAN and turn it into a Debian package (including proper dependencies, registration of installed files with the package system etc). Cheers, Roderich
From: i386x [...] gmx.de
Hello I delete PAR::Packer and install the module 0.976 from the ubuntu repository. Now works fine. Thank you very much for the assistance.