httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: mod_deflate as a DSO on Solaris (perhaps generic?)
Date Sat, 05 Jan 2002 14:03:21 GMT
Albert Chin <new-httpd@thewrittenword.com> writes:

> > Cannot load /export/home/trawick/apacheinst/modules/mod_deflate.so 
> > into server: ld.so.1: httpd: fatal: relocation error: file 
> > /export/home/trawick/apacheinst/modules/mod_deflate.so: symbol 
> > deflateInit2_: referenced symbol not found
> 
> What is the output of:
>   $ ldd /export/home/trawick/apacheinst/modules/mod_deflate.so

% ldd /export/home/trawick/apacheinst/modules/mod_deflate.so
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
%

>   $ elfdump -d /export/home/trawick/apacheinst/modules/mod_deflate.so |\
>   grep RPATH

% elfdump -d /export/home/trawick/apacheinst/modules/mod_deflate.so | grep RPATH
% 

> 
> > I would guess that the problem is that mod_deflate.so wasn't
> > statically linked with this libz.a, but I HAVEN'T TRIED IT YET.
> > Perhaps Solaris ld discarded the libz stuff because it wasn't used by
> > httpd.
> 
> Solaris 8 has /usr/lib/libz.so and it has deflateInit2_:
>   $ nm /usr/lib/libz.so | grep deflateInit
>   [212]   |     11328|     668|FUNC |GLOB |0    |9      |deflateInit2_
>   [203]   |     11280|      48|FUNC |GLOB |0    |9      |deflateInit_
> 
> > (I hit the same problem on AIX but [erroneously] guessed at the time
> > that only AIX would need libz.a statically linked with mod_deflate.so
> > instead of statically linked with httpd.)
> > 
> > How do other folks deal with this?  Always use a shared object libz?
> > Statically linking it with mod_deflate.so seems less error-prone
> > (assuming the build is correct), particularly if you want to run a
> > build on multiple machines.
> 
> Not all systems allow you to link a static library into a shared one
> (HP-UX for example). If httpd doesn't link in libz, you'll have to
> either include the source to libz and make it a libtool convenience
> library that gets linked to mod_deflate or link the "system" libz as a
> shared library.

Can you clarify what you mean by linking the "system" libz as a shared
library?  How is this done since Solaris doesn't seem to provide
libz.a?  (I assume you're talking about /usr/lib/libz.so.)

Thanks a bunch!

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message