Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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 1 '10 at 1: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. –  Chrisbloom7 Sep 1 '10 at 13:21

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
Hi Chris. Did you ever get this figured out? I've seen your posts looking for answers in quite a few places... –  Steve Aug 3 '11 at 0:30
    
@Steve: Not in MAMP unfortunately. Their support is terrible despite me being a paid, "Pro" customer. –  Chrisbloom7 Aug 15 '11 at 16:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.