develooper Front page | perl.perl5.porters | Postings from November 2003

Re: Problems with -z lazyload - was Re: DBD::Sybase and Sybase::CTlib build problems w/ 5.8.1, Solaris, gcc 3.x

Thread Previous
From:
Diab Jerius
Date:
November 1, 2003 03:38
Subject:
Re: Problems with -z lazyload - was Re: DBD::Sybase and Sybase::CTlib build problems w/ 5.8.1, Solaris, gcc 3.x
Message ID:
pan.2003.10.31.18.08.57.634778@cfa.harvard.edu
On Tue, 21 Oct 2003 08:25:58 +0100, Alan Burlison wrote:

> Jonathan Leffler wrote:
> 
>> I'll only comment that one of my problems with DBD::Informix on Solaris 
>> 8 is precisely the presence of -z lazyload; for reasons I do not 
>> understand, it breaks DBD::Informix.  Removing the option pair from the 
>> linking line (twice since it appears twice) fixes the problem.  I dunno 
>> what's up - it is probably an issue somewhere else in practice - but the 
>> way I've got my working Perl at the moment carefully excludes -z lazyload.
>> 
>> I'll take any information...
> 
> Are you sure it is '-z lazyload' and not '-z ignore' that is causing the 
> problem?  As for diagnosis, there are a couple of tools you can use:
> 
> 'dump -Lv' to examine the dependencies in an object file.
> 'ldd -r' to examine the full dependency tree
> 'export LD_DEBUG=files ' to trace the run-time linkers execution

I'm seeing this problem when linking against any shareable object which
itself links against another shareable object.  For example, in my
environment, the PGPLOT package links against a shareable libpng and libz.

I can confirm that in this case, it is the '-z ignore' which causes the
problem:

==============================================

with '-z lazyload -z combreloc':
frrpt% ldd ./blib/arch/auto/PGPLOT/PGPLOT.so
        libpgplot.so =>  /proj/axaf/sun4u-SunOS-5/lib/libpgplot.so
        libpng.so.3 =>   /proj/axaf/sun4u-SunOS-5/lib/libpng.so.3
        libz.so =>       /proj/axaf/sun4u-SunOS-5/lib/libz.so
        libX11.so.4 =>   /usr/lib/libX11.so.4
        libm.so.1 =>     /usr/lib/libm.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libXext.so.0 =>  /usr/openwin/lib/libXext.so.0
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libdga.so.1 =>   /usr/openwin/lib/libdga.so.1
        /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1

frrpt% dump -Lv ./blib/arch/auto/PGPLOT/PGPLOT.so
./blib/arch/auto/PGPLOT/PGPLOT.so:

  **** DYNAMIC SECTION INFORMATION ****
.dynamic:
[INDEX] Tag         Value
[1]     POSFLAG_1       LAZYLOAD 
[2]     NEEDED          libpgplot.so
[3]     POSFLAG_1       LAZYLOAD 
[4]     NEEDED          libpng.so.3
[5]     POSFLAG_1       LAZYLOAD 
[6]     NEEDED          libz.so
[7]     POSFLAG_1       LAZYLOAD 
[8]     NEEDED          libX11.so.4
[9]     POSFLAG_1       LAZYLOAD 
[10]    NEEDED          libm.so.1
[11]    INIT            0x60830
[12]    FINI            0x6083c
[13]    RUNPATH         /proj/axaf/sun4u-SunOS-5/lib:/proj/axaf/sparc-SunOS-5/lib
[14]    RPATH           /proj/axaf/sun4u-SunOS-5/lib:/proj/axaf/sparc-SunOS-5/lib

[...]

==============================================
with '-z ignore -z lazyload -z combreloc':

frrpt% ldd ./blib/arch/auto/PGPLOT/PGPLOT.so                                       libpgplot.so =>  /proj/axaf/sun4u-SunOS-5/lib/libpgplot.so
        libm.so.1 =>     /usr/lib/libm.so.1
        libX11.so.4 =>   /usr/openwin/lib/libX11.so.4
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libXext.so.0 =>  /usr/openwin/lib/libXext.so.0
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libdga.so.1 =>   /usr/openwin/lib/libdga.so.1
        /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1


frrpt% dump -Lv ./blib/arch/auto/PGPLOT/PGPLOT.so                               
./blib/arch/auto/PGPLOT/PGPLOT.so:

  **** DYNAMIC SECTION INFORMATION ****
.dynamic:
[INDEX] Tag         Value
[1]     POSFLAG_1       LAZYLOAD 
[2]     NEEDED          libpgplot.so
[3]     POSFLAG_1       LAZYLOAD 
[4]     NEEDED          libm.so.1
[5]     INIT            0x60810
[6]     FINI            0x6081c
[7]     RUNPATH         /proj/axaf/sun4u-SunOS-5/lib:/proj/axaf/sparc-SunOS-5/lib
[8]     RPATH           /proj/axaf/sun4u-SunOS-5/lib:/proj/axaf/sparc-SunOS-5/lib

[...]

==============================================

Note that libpng.so and libz.so are missing when '-z ignore' is present.

I haven't had a chance to try out the DBD::Sybase module; I'll report on
that when I do.

-- 
Diab Jerius                       djerius at cfa dot harvard dot edu
vox: 617 496 7575                 Harvard-Smithsonian Center for Astrophysics
fax: 617 495 7356                 60 Garden St, MS 70, Cambridge MA 02138 USA



Thread Previous


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