1

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.

Chris Bloom
  • 124
  • 1
  • 7
  • Can you clarify what you mean by "won't load in Apache"? Did you enable it with `XSendFile on` in your Apache configs? – Andrew M. Sep 01 '10 at 01:28
  • I meant that when I try to start Apache it fails silently (as in no error message logged) and running `apachectl -t` reports the "Cannot load..." error. However, I've since found that it *does* run in the native Apache install when compiled w/o any particular flags, it just doesn't run in MAMP Pro's instance of Apache. So imma take this up with them. – Chris Bloom Sep 01 '10 at 13:21

1 Answers1

0

After doing some more testing I've found that it does load in Snow Leopards' native instance of Apache (even when compiled w/o any specific arch flags), it's only MAMP Pro's instance of Apache that doesn't seem to be able to load it. So I will take this up with them.

Chris Bloom
  • 124
  • 1
  • 7
  • Hi Chris. Did you ever get this figured out? I've seen your posts looking for answers in quite a few places... – Steve Aug 03 '11 at 00:30
  • @Steve: Not in MAMP unfortunately. Their support is terrible despite me being a paid, "Pro" customer. – Chris Bloom Aug 15 '11 at 16:43