httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Chin <new-ht...@thewrittenword.com>
Subject Re: mod_deflate as a DSO on Solaris (perhaps generic?)
Date Sun, 06 Jan 2002 00:53:43 GMT
On Sat, Jan 05, 2002 at 05:50:00PM -0600, Albert Chin wrote:
> On Sat, Jan 05, 2002 at 09:03:21AM -0500, Jeff Trawick wrote:
> > 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
> 
> How did mod_deflate.so get linked?

Ok, I just built from CVS and I get the following:
  $ /bin/sh /opt/build/httpd-2.0/srclib/apr/libtool --mode=compile cc  -g
  -mt -DNO_DBM_REWRITEMAP    -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS
  -D_REENTRANT    -I. -I/opt/build/httpd-2.0/os/unix
  -I/opt/build/httpd-2.0/server/mpm/prefork
  -I/opt/build/httpd-2.0/modules/http
  -I/opt/build/httpd-2.0/modules/proxy -I/opt/build/httpd-2.0/include
  -I/opt/build/httpd-2.0/srclib/apr/include
  -I/opt/build/httpd-2.0/srclib/apr-util/include
  -I/opt/TWWfsw/zlib11/include -I/opt/build/httpd-2.0/modules/dav/main
  -prefer-pic -c mod_deflate.c && touch mod_deflate.slo
  $ /bin/sh /opt/build/httpd-2.0/srclib/apr/libtool --mode=link cc  -g -mt
  -DNO_DBM_REWRITEMAP    -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS
  -D_REENTRANT    -I. -I/opt/build/httpd-2.0/os/unix
  -I/opt/build/httpd-2.0/server/mpm/prefork
  -I/opt/build/httpd-2.0/modules/http
  -I/opt/build/httpd-2.0/modules/proxy -I/opt/build/httpd-2.0/include
  -I/opt/build/httpd-2.0/srclib/apr/include
  -I/opt/build/httpd-2.0/srclib/apr-util/include
  -I/opt/TWWfsw/zlib11/include -I/opt/build/httpd-2.0/modules/dav/main
  -export-dynamic -L/opt/TWWfsw/zlib11/lib -R/lib      -o mod_deflate.la
  -rpath /usr/local/apache2/modules -module -avoid-version mod_deflate.lo

You'll note that there is *no* -lz anywhere. So, I don't see how
mod_deflate would ever get loaded. Looking at config.status, -lz is in
EXTRA_LIBS. So:
  $ cat modules/experimental/modules.mk
  mod_deflate.la: mod_deflate.slo
          $(SH_LINK) -rpath $(libexecdir) -module -avoid-version
  mod_deflate.lo
  DISTCLEAN_TARGETS = modules.mk
  static = 
  shared =  mod_deflate.la
  $ grep SH_LINK build/rules.mk
  SH_LINK  = $(SH_LIBTOOL) --mode=link $(COMPILE) $(LT_LDFLAGS)
  $(ALL_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) $(SH_LIBS) -o $@
  $ grep EXTRA_LIBS build/rules.mk
  ALL_LIBS     = $(EXTRA_LIBS) $(NOTEST_LIBS) $(LIBS)
  $ grep ALL_LIBS build/rules.mk
  [nothing]

So, ALL_LIBS isn't getting used anywhere. Should it be in SH_LINK
after $(ALL_LDFLAGS)?

Add it after $(ALL_LDFLAGS) and rebuilding mod_deflate.so gets me:
  $ ldd modules/experimental/.libs/mod_deflate.so
    libm.so.1 =>     /lib/libm.so.1
    libsocket.so.1 =>        /lib/libsocket.so.1
    libnsl.so.1 =>   /lib/libnsl.so.1
    libdl.so.1 =>    /lib/libdl.so.1
    libz.so.2 =>     /opt/TWWfsw/zlib11/lib/libz.so.2
    libexpat.so.0 => /opt/build/httpd-2.0/srclib/apr-util/xml/expat/lib/.libs/libexpat.so.0
    libc.so.1 =>     /lib/libc.so.1
    libmp.so.2 =>    /usr/lib/libmp.so.2
    /usr/platform/SUNW,Ultra-2/lib/libc_psr.so.1

-- 
albert chin (china@thewrittenword.com)

Mime
View raw message