Skip Menu |

This queue is for tickets about the Compress-Bzip2 CPAN distribution.

Report information
The Basics
Id: 68572
Status: resolved
Priority: 0/
Queue: Compress-Bzip2

People
Owner: RURBAN [...] cpan.org
Requestors: lfmunozmejias [...] gmail.com
Cc: LEONT [...] cpan.org
AdminCc:

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



Subject: Build fails when using non-standard library locations
I have a bunch of Solaris systems that have Perl as shipped by OpenCSW. Thus, the libraries are installed under /opt/csw/lib... In these systems, Compress::Bzip2 fails to resolve the correct libperl or libbz2, and thus everything breaks: $ ldd show_bzversion libperl.so => (file not found) libbz2.so.1.0 => (file not found) libc.so.1 => /lib/libc.so.1 libm.so.2 => /lib/libm.so.2 /platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1 I can solve it by adding "LD_RUN_PATH=/opt/csw/lib" to the make invocation, but that doesn't work for the Makefile.PL, so it always builds its own bz2 stuff, and doesn't fix the tests. For the tests, I'd need to run make test LD_RUN_PATH=/opt/csw/lib And it doesn't work for a CPAN installation, which is a pain. I attach the output of perl -V:.* for better details. And LD_LIBRARY_PATH is not an option. It should rely on the -R /opt/csw/lib that is already present in $Config{ccdldflags}, or in $Config{libpth} or $Config{libspath), but it doesn't and I don't find a good place to instruct Makefile.PL to use it. I already have plenty of modules with shared objects that work and pass their tests perfectly. Thanks.
Subject: perl-info
Download perl-info
application/octet-stream 28k

Message body not shown because it is not plain text.

This is fact an EUMM bug, LDDLFLAGS missing CCDLFLAGS. I wonder how solaris or systems which rely on proper rpath's managed to install anything at all. I've fixed it in our Makefile.PL and added an EUMM bug https://rt.cpan.org/Ticket/Display.html?id=84345 On Tue May 31 12:48:40 2011, lfmunoz wrote: Show quoted text
> I have a bunch of Solaris systems that have Perl as shipped by OpenCSW. > Thus, the libraries are installed under /opt/csw/lib... In these > systems, Compress::Bzip2 fails to resolve the correct libperl or libbz2, > and thus everything breaks: > > $ ldd show_bzversion > libperl.so => (file not found) > libbz2.so.1.0 => (file not found) > libc.so.1 => /lib/libc.so.1 > libm.so.2 => /lib/libm.so.2 > /platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1 > > I can solve it by adding "LD_RUN_PATH=/opt/csw/lib" to the make > invocation, but that doesn't work for the Makefile.PL, so it always > builds its own bz2 stuff, and doesn't fix the tests. For the tests, I'd > need to run > > make test LD_RUN_PATH=/opt/csw/lib > > And it doesn't work for a CPAN installation, which is a pain. I attach > the output of perl -V:.* for better details. And LD_LIBRARY_PATH is not > an option. > > It should rely on the -R /opt/csw/lib that is already present in > $Config{ccdldflags}, or in $Config{libpth} or $Config{libspath), but it > doesn't and I don't find a good place to instruct Makefile.PL to use it. > > I already have plenty of modules with shared objects that work and pass > their tests perfectly. > > Thanks.
-- Reini Urban
Fixed in 2.11, thanks! -- Reini Urban
From: ppisar [...] redhat.com
Dne Út 31.Květen.2011 12:48:40, lfmunoz napsal(a): Show quoted text
> $ ldd show_bzversion > libperl.so => (file not found) > libbz2.so.1.0 => (file not found) > libc.so.1 => /lib/libc.so.1 > libm.so.2 => /lib/libm.so.2 > /platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1 >
This is wrongly configured perl. There is no reason why show_bzversion should be linked against perl if the only (non-standard library) symbol it uses is BZ2_bzlibVersion from bzip2. Location of bzip2 library is questionable. I've never used the bundled one, but I use system wide library, so I have no idea where Compress-Bzip2 should put the library to. -- Petr
On Thu Apr 04 02:57:02 2013, ppisar wrote: Show quoted text
> Dne Út 31.Květen.2011 12:48:40, lfmunoz napsal(a):
> > $ ldd show_bzversion > > libperl.so => (file not found) > > libbz2.so.1.0 => (file not found) > > libc.so.1 => /lib/libc.so.1 > > libm.so.2 => /lib/libm.so.2 > > /platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1 > >
> This is wrongly configured perl. There is no reason why show_bzversion > should be linked against perl if the only (non-standard library) > symbol it uses is BZ2_bzlibVersion from bzip2. > > Location of bzip2 library is questionable. I've never used the bundled > one, but I use system wide library, so I have no idea where Compress- > Bzip2 should put the library to.
Hi, Yes, we might link show_bzversion against libperl.so because we do not do a whole configure dance just to show the version of the linked bz2 library, and we need the perl configuration for any extra libpaths and rpaths to respect the configuration when perl was being installed, such as -R /opt/csw/lib. If you use the system library the path needs to show up in the perl configuration (lddflags and cccdlflags), so the linker can use it for Bzip2.so and show_bzversion. libperl.so is ignored yes, but must show up via ldd. If not your rpath setting is broken. On my solaris cfg I have with e.g. gcc: rurban@solaris:~/Perl/Compress-Bzip2$ ldd show_bzversion libbz2.so.1 => /usr/lib/libbz2.so.1 libssp.so.0 => /usr/lib/libssp.so.0 libc.so.1 => /lib/libc.so.1 libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 libm.so.2 => /lib/libm.so.2 or with cc: rurban@solaris:~/Perl/Compress-Bzip2$ ldd show_bzversion libbz2.so.1 => /usr/lib/64/libbz2.so.1 libc.so.1 => /lib/64/libc.so.1 libm.so.2 => /lib/64/libm.so.2 -- Reini Urban
On Mon Apr 01 11:27:01 2013, RURBAN wrote: Show quoted text
> This is fact an EUMM bug, > LDDLFLAGS missing CCDLFLAGS.
Not really. EUMM told me it's a wrong perl configuration instead, and it seems right: https://rt.cpan.org/Ticket/Display.html?id=84345 "ccdlflags is what you pass when linking executables, and lddlflags is what you pass when linking loadable-objects/shared-libraries. I suspect the correct solution is not that MakeMaker should add those ccdlflags, but that -R <whatever> should be added to that particular perl's configuration." So LDDLFLAGS is wrong in your perl. Show quoted text
> I wonder how solaris or systems which rely on proper rpath's managed > to install anything at all. > I've fixed it in our Makefile.PL and added an EUMM bug > https://rt.cpan.org/Ticket/Display.html?id=84345 > > On Tue May 31 12:48:40 2011, lfmunoz wrote:
> > I have a bunch of Solaris systems that have Perl as shipped by > > OpenCSW. > > Thus, the libraries are installed under /opt/csw/lib... In these > > systems, Compress::Bzip2 fails to resolve the correct libperl or > > libbz2, > > and thus everything breaks: > > > > $ ldd show_bzversion > > libperl.so => (file not found) > > libbz2.so.1.0 => (file not found) > > libc.so.1 => /lib/libc.so.1 > > libm.so.2 => /lib/libm.so.2 > > /platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1 > > > > I can solve it by adding "LD_RUN_PATH=/opt/csw/lib" to the make > > invocation, but that doesn't work for the Makefile.PL, so it always > > builds its own bz2 stuff, and doesn't fix the tests. For the tests, > > I'd > > need to run > > > > make test LD_RUN_PATH=/opt/csw/lib > > > > And it doesn't work for a CPAN installation, which is a pain. I > > attach > > the output of perl -V:.* for better details. And LD_LIBRARY_PATH is > > not > > an option. > > > > It should rely on the -R /opt/csw/lib that is already present in > > $Config{ccdldflags}, or in $Config{libpth} or $Config{libspath), but > > it > > doesn't and I don't find a good place to instruct Makefile.PL to use > > it. > > > > I already have plenty of modules with shared objects that work and > > pass > > their tests perfectly.
-- Reini Urban
On Tue May 31 12:48:40 2011, lfmunoz wrote: Show quoted text
> I have a bunch of Solaris systems that have Perl as shipped by OpenCSW. > Thus, the libraries are installed under /opt/csw/lib... In these > systems, Compress::Bzip2 fails to resolve the correct libperl or libbz2, > and thus everything breaks: > > $ ldd show_bzversion > libperl.so => (file not found) > libbz2.so.1.0 => (file not found) > libc.so.1 => /lib/libc.so.1 > libm.so.2 => /lib/libm.so.2 > /platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1
AFAICT show_bzversion should be compiled with ccdlflags anyway, that will add the correct -R flag. Show quoted text
> I can solve it by adding "LD_RUN_PATH=/opt/csw/lib" to the make > invocation, but that doesn't work for the Makefile.PL, so it always > builds its own bz2 stuff, and doesn't fix the tests. For the tests, I'd > need to run > > make test LD_RUN_PATH=/opt/csw/lib
All of this raises more questions than it answers. Could you provide the output of a clean make before Reini's fix, that will at least give some idea of what was going on. Show quoted text
> And it doesn't work for a CPAN installation, which is a pain. I attach > the output of perl -V:.* for better details. And LD_LIBRARY_PATH is not > an option.
Agreed. Leon
I agree with LEONT. I've added ccdlflags to show_bzversion also to be able to find non-standard libbz2. Done with 2.18 On Wed Aug 06 18:44:48 2014, LEONT wrote: Show quoted text
> On Tue May 31 12:48:40 2011, lfmunoz wrote:
> > I have a bunch of Solaris systems that have Perl as shipped by > > OpenCSW. > > Thus, the libraries are installed under /opt/csw/lib... In these > > systems, Compress::Bzip2 fails to resolve the correct libperl or > > libbz2, > > and thus everything breaks: > > > > $ ldd show_bzversion > > libperl.so => (file not found) > > libbz2.so.1.0 => (file not found) > > libc.so.1 => /lib/libc.so.1 > > libm.so.2 => /lib/libm.so.2 > > /platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1
> > AFAICT show_bzversion should be compiled with ccdlflags anyway, that > will add the correct -R flag. >
> > I can solve it by adding "LD_RUN_PATH=/opt/csw/lib" to the make > > invocation, but that doesn't work for the Makefile.PL, so it always > > builds its own bz2 stuff, and doesn't fix the tests. For the tests, > > I'd > > need to run > > > > make test LD_RUN_PATH=/opt/csw/lib
> > All of this raises more questions than it answers. Could you provide > the output of a clean make before Reini's fix, that will at least give > some idea of what was going on. >
> > And it doesn't work for a CPAN installation, which is a pain. I > > attach > > the output of perl -V:.* for better details. And LD_LIBRARY_PATH is > > not > > an option.
> > Agreed. > > Leon
-- Reini Urban