develooper Front page | perl.perl5.porters | Postings from May 2012

Re: Multiarch support from Debian breaks all my old perls

Thread Previous | Thread Next
From:
Tony Cook
Date:
May 1, 2012 02:25
Subject:
Re: Multiarch support from Debian breaks all my old perls
Message ID:
20120501092518.GB14368@mars.tony.develop-help.com
On Tue, May 01, 2012 at 10:03:58AM +0200, Andreas J. Koenig wrote:
> I have observed it on Debian sid and have not looked at other OSes. I
> used to build my perls with gcc 4.4.5 and since Debian upgraded to gcc
> 4.6.3 and multiarch I encounter dynamic loading problems.
> 
> The pattern is that a perl program tries to use dynamic loading to load
> a system "so" library but does not find it anymore. This happens because
> meanwhile some system update has put the library into directories like
> /lib/x86_64-linux-gnu/ or /usr/lib/x86_64-linux-gnu/ or so. The old perl
> does not know about and does not look into the new-fangled directories
> and the dynamic loading fails.
> 
> The old perl that was built before multiarch support had something like
> this:
> 
> % .../bin/perl -V:libpth  
> libpth='/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib /lib64 /usr/lib64';
> 
> The perls I build now with gcc 4.6.3 have:
> 
> % .../bin/perl -V:libpth
> libpth='/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib';

From reproducing this for Imager, the problem isn't gcc, which returns
the full set of directories even in stable:

tony@mars:~$ gcc --version
gcc (Debian 4.4.5-8) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

tony@mars:~$ gcc -print-search-dirs | grep libraries
libraries: =/usr/lib/gcc/x86_64-linux-gnu/4.4.5/:/usr/lib/gcc/x86_64-linux-gnu/4.4.5/:/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/4.4.5/:/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../x86_64-linux-gnu/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../x86_64-linux-gnu/4.4.5/:/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/:/lib/x86_64-linux-gnu/4.4.5/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/4.4.5/:/usr/lib/../lib/:/usr/lib/x86_64-linux-gnu/x86_64-linux-gnu/4.4.5/:/usr/lib/x86_64-linux-gnu/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../x86_64-linux-gnu/lib/:/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../:/lib/:/usr/lib/:/usr/lib/x86_64-linux-gnu/

Possibly this could be considered a bug from Configure stripping
directories that don't exist, after all, they may exist later.

> The only workaround I found so far is to edit the Config.pm of the old
> perl and add the new installation directories there. This works
> remarkably well but I'm not sure about details like best ordering.
> 
> I wonder if somebody has other solutions short of removing all old perls
> from my disk and recompiling everything?

I don't see a solution beyond rebuilding or mangling Config.pm.

Tony

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About