#17 Apache compilation module


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

Here is my compilation line :

make fails at the last compilation : httpd :

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

please help me...

Thank you

Florent : superfc@superfc.dyndns.org


  • Logged In: YES

    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

    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:


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

    Logged In: YES

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

    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.