Building mod_gzip.so as Universal Binary
Mac OS X
— 31 Jul 2006 14:42 — 1320 days ago
Here’s how to build a Universal Binary version of the mod_gzip Apache Module.
Download the source from http://sourceforge.net/projects/mod-gzip/. Take the source package named mod_gzip-version.tgz
Unpack the distribution. I had to change the Makefile to the following. Only the APXS and build: lines are different:
APXS?=/usr/sbin/apxs
RM=/bin/rm
build:
$(APXS) -Wl,-arch -Wl,i386 -Wl,-arch -Wl,ppc -Wc,-arch -Wc,ppc -Wc,-arch -Wc,i386 -c mod_gzip.c mod_gzip_debug.c mod_gzip_compress.c -o mod_gzip.so
install:
$(APXS) -A -i mod_gzip.so
clean:
$(RM) -rf *.o
distclean: clean
$(RM) -f mod_gzip.so
Now run "make". I moved the resulting mod_gzip.so file to /usr/libexec/httpd and added these lines to /etc/httpd/httpd.conf:
LoadModule gzip_module libexec/httpd/mod_gzip.so
AddModule mod_gzip.c
For your convenience, here’s the compiled module, at version 1.3.26.1a: http://www2.entropy.ch/download/mod_gzip.so.
Comments
Trackback
Trackback URL for this entry: http://www.entropy.ch/blog/Mac+OS+X/2006/07/31/Building-mod-gzip-so-as-Universal-Binary.html?tb=y
|













Hi,
First, thanks for the information about this module... I have a problem using in OS X Server 10.4.8 ... compilation is fine, but when I try to start Apache, following message appears:
Cannot load /usr/libexec/mod_gzip.so into server: (reason unknown)
I used the compiled version but the same error raises...
Any suggestions? ... I googled, but nothing :| ...
Thanks again
EOF