#17 Apache compilation module

mod_gzip-1.3.26.1a
open
None
5
2003-09-05
2003-07-22
Anonymous
No

Apache cant compile due to the mod_gzip.c (1.26.***)

Here is my compilation line :
./configure
--prefix=/usr/local/apache
--activate-module=src/modules/php4/libphp4.a
--enable-suexec
--suexec-caller=nobody
--suexec-userdir=www
--suexec-docroot=/home
--suexec-logfile=/usr/local/apache/logs/cgi.log
--suexec-uidmin=99
--suexec-gidmin=99
--suexec-safepath=/usr/local/bin:/usr/bin:/bin
--enable-module=so
--enable-module=rewrite
--add-module=src/modules/extra/mod_gzip.c
--enable-module=ssl
--enable-module=vhost_alias
--add-module=src/modules/extra/mod_bandwidth.c

make fails at the last compilation : httpd :

modules/extra/libextra.a(mod_gzip.o): In function
`mod_gzip_encode_and_transmit':
mod_gzip.o(.text+0x5968): undefined reference to `gzp_main'
modules/extra/libextra.a(mod_gzip.o): In function
`mod_gzip_compress_file':
mod_gzip.o(.text+0x62a7): undefined reference to `gzp_main'

please help me...

Thank you

Florent : superfc@superfc.dyndns.org

Discussion

  • Logged In: YES
    user_id=773328

    I had the problem too. Seems like you have to build mod_gzip_compress.c by hand. Here is what I did, adapt to your environment:

    find the line that compiles mod_gzip.c in the output of make; it will look somehow like that:

    gcc -c -I../../os/unix -I../../include -DLINUX=22 -I/usr/include/db1 -DMOD_SSL=208115 -I/root/src/php/php-4.2.3 -I/root/src/php/php-4.2.3/main -I/root/src/php/php-4.2.3/main -I/root/src/php/php-4.2.3/Zend -I/root/src/php/php-4.2.3/Zend -I/root/src/php/php-4.2.3/TSRM -I/root/src/php/php-4.2.3/TSRM -I/root/src/php/php-4.2.3 -DEAPI `../../apaci` mod_gzip.c

    go to the modules/extra directory and repeat the SAME line but using mod_gzip_compress.c instead of mod_gzip.c (maybe you'll have to copy it from the mod_gzip tree)

    then, in the same directory, adapt the next lines in the Makefile output (following the line you found earlier):
    rm -f libextra.a
    ar cr libextra.a mod_gzip.o [maybe more .o]
    ranlib libextra.a

    add mod_gzip_compress.o to the ar line

    return to the apache's base directory and type "make". The build process should continue.

    Hope it helps!

     
  • Logged In: YES
    user_id=329823

    What OS are you using?

    You should copy the mod_gzip sources to src/modules/gzip and you should
    use the following line to activate mod_gzip:

    --activate-module=src/modules/gzip/mod_gzip.a

     
    • assigned_to: nobody --> ckruse
     
  • Jeff Barr
    Jeff Barr
    2004-01-01

    Logged In: YES
    user_id=122167

    ptaff's method to create mod_gzip_compress.o is correct but
    laborious.

    A simpler way to do it is to copy the mod_gzip_compress.c
    file into the modules/extra directory if needed, and to find
    the following line in the Makefile in that directory:

    OBJS=mod_throttle.o mod_gzip.o

    Change it to read:

    OBJS=mod_throttle.o mod_gzip.o mod_gzip_compress.o

    And then make; make clean in that directory.

    return to the apache's base directory and type "make".
    The build process should continue.