I'm having trouble compiling the X-Sendfile extension for Apache (http://tn123.ath.cx/mod_xsendfile/) on Snow Leopard. I've tried setting various archflags, and one combination even compiled w/o error, but in every case Apache fails to start. It doesn't report any error to the log file, but checking the config with apachectl reveals "Cannot load /usr/libexec/apache2/mod_xsendfile.so into server: cannot create object file image or add library"
Note that the module source is provided as a simple C file, and there is no makefile or configure script provided. Thus I'm using apxs to both compile and install into apache.
Here are the commands I've tried so far:
$ sudo apxs -cia /Users/chrisbloom7/Downloads/xsendfile/mod_xsendfile-0.9/mod_xsendfile.c $ sudo apxs -cia -Wc,"-arch x86_64 -arch ppc -arch i386 -arch ppc64" -Wl,"-arch x86_64 -arch ppc -arch i386 -arch ppc64" /Users/chrisbloom7/Downloads/xsendfile/mod_xsendfile-0.9/mod_xsendfile.c $ sudo apxs -cia -Wc,"-arch x86_64" -Wc,"-arch i386" -Wc,"-arch ppc7400" /Users/chrisbloom7/Downloads/xsendfile/mod_xsendfile-0.9/mod_xsendfile.c
Commands #1 and #3 compile w/o error, but won't load in Apache. Command #2 complains about missing required architectures and exits with an error.