# Compiling mod\_ruby on mac os x

**URL:** <https://www.ruby-forum.com/t/compiling-mod-ruby-on-mac-os-x/103742>\
**Category:** Ruby\
**Created:** [May 9, 2007, 8:41pm UTC](https://www.ruby-forum.com/t/compiling-mod-ruby-on-mac-os-x/103742 "2007-05-09T20:41:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pipeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@pipeek](https://www.ruby-forum.com/u/pipeek)\
**Post date:** [May 9, 2007, 8:41pm UTC](https://www.ruby-forum.com/t/compiling-mod-ruby-on-mac-os-x/103742/1 "2007-05-09T20:41:25Z")

</div>

Hi! I have problem with mod\_ruby compilation on os X (10.4.9)

% make  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c mod\_ruby.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from mod\_ruby.c:33:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from mod\_ruby.c:33:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c ruby\_config.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from ruby\_config.c:31:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from ruby\_config.c:31:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c apachelib.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from apachelib.c:35:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from apachelib.c:35:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c array\_header.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from array\_header.c:28:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from array\_header.c:28:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c table.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from table.c:28:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from table.c:28:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c connection.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from connection.c:28:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from connection.c:28:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c server.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from server.c:31:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from server.c:31:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c request.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from request.c:36:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from request.c:36:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c upload.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from upload.c:31:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from upload.c:31:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c cookie.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from cookie.c:31:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from cookie.c:31:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c paramtable.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from paramtable.c:31:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from paramtable.c:31:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c multival.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from multival.c:112:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from multival.c:112:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c bucket.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from bucket.c:28:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from bucket.c:28:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c apache\_request.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from apache\_request.c:19:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from apache\_request.c:19:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c apache\_multipart\_buffer.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from apache\_multipart\_buffer.c:17:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from apache\_multipart\_buffer.c:17:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
gcc -g -O2 -fno-common -pipe -fno-common -Wall -DDARWIN -DUSE\_HSREGEX  
-DUSE\_EXPAT -g -Os -pipe -DHARD\_SERVER\_LIMIT=2048 -DEAPI -I.  
-I/sw/lib/ruby/1.8/i686-darwin -I/usr/include/httpd -I…/lib/expat-lite  
-c apache\_cookie.c  
In file included from /usr/include/httpd/ap\_config.h:1129,  
from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from apache\_cookie.c:17:  
/usr/include/httpd/hsregex.h:22:1: warning: “ap\_private\_extern”  
redefined  
In file included from /usr/include/httpd/httpd.h:29,  
from mod\_ruby.h:52,  
from apache\_cookie.c:17:  
/usr/include/httpd/ap\_config.h:1025:1: warning: this is the location of  
the previous definition  
cc -dynamic -bundle -L/sw/lib -o mod\_ruby.so mod\_ruby.o ruby\_config.o  
apachelib.o array\_header.o table.o connection.o server.o request.o  
upload.o cookie.o paramtable.o multival.o bucket.o apache\_request.o  
apache\_multipart\_buffer.o apache\_cookie.o -lruby -ldl -lobjc  
/usr/bin/ld: Undefined symbols:  
\_ap\_add\_cgi\_vars  
\_ap\_add\_common\_vars  
\_ap\_add\_version\_component  
\_ap\_kill\_timeout  
\_ap\_log\_error  
\_ap\_make\_array  
\_ap\_make\_table  
\_ap\_null\_cleanup  
\_ap\_palloc  
\_ap\_pcalloc  
\_ap\_pstrdup  
\_ap\_pstrndup  
\_ap\_push\_array  
\_ap\_register\_cleanup  
\_ap\_signal  
\_ap\_soft\_timeout  
\_ap\_table\_get  
\_ap\_table\_set  
\_ap\_append\_arrays  
\_ap\_overlay\_tables  
\_ap\_psprintf  
\_core\_module  
\_ap\_chdir\_file  
\_ap\_get\_server\_built  
\_ap\_get\_server\_version  
\_ap\_server\_root  
\_ap\_unescape\_url  
\_ap\_clear\_table  
\_ap\_table\_add  
\_ap\_table\_merge  
\_ap\_table\_unset  
\_ap\_allow\_options  
\_ap\_allow\_overrides  
\_ap\_bgetopt  
\_ap\_construct\_url  
\_ap\_custom\_response  
\_ap\_default\_type  
\_ap\_escape\_html  
\_ap\_get\_basic\_auth\_pw  
\_ap\_get\_client\_block  
\_ap\_get\_remote\_host  
\_ap\_get\_remote\_logname  
\_ap\_get\_server\_name  
\_ap\_get\_server\_port  
\_ap\_hard\_timeout  
\_ap\_internal\_redirect  
\_ap\_is\_initial\_req  
\_ap\_note\_auth\_failure  
\_ap\_note\_basic\_auth\_failure  
\_ap\_note\_digest\_auth\_failure  
\_ap\_psignature  
\_ap\_requires  
\_ap\_reset\_timeout  
\_ap\_rflush  
\_ap\_rputc  
\_ap\_rwrite  
\_ap\_satisfies  
\_ap\_send\_fd\_length  
\_ap\_send\_http\_header  
\_ap\_setup\_client\_block  
\_ap\_should\_client\_block  
\_ap\_sub\_req\_lookup\_file  
\_ap\_sub\_req\_lookup\_uri  
\_ap\_table\_do  
\_ap\_table\_setn  
\_ap\_day\_snames  
\_ap\_find\_path\_info  
\_ap\_getword  
\_ap\_getword\_conf  
\_ap\_ind  
\_ap\_log\_rerror  
\_ap\_make\_dirstr\_parent  
\_ap\_month\_snames  
\_ap\_pstrcat  
\_ap\_getword\_nulls  
\_ap\_os\_escape\_path  
collect2: ld returned 1 exit status  
make: \*\*\* [mod\_ruby.so] Error 1
