Lloyd Zusman ljz@asfast.com writes:
Ted Rolle ted@php.net writes:
[ … ]
I don’t know if this is a config file issue or something else. The
problem is that I can’t get mod_ruby-1.1.1 to compile, and I’m wondering
what changes I need to make to either the source code, the configure.rb
script, the Makefile, or whatever.
I configured like this:
./configure.rb --with-apxs=/usr/local/apache2/bin/apxs
But then when I did the make, I immediately got this (I’m manually
wrapping the long lines):
gcc -I/usr/local/include -fPIC -Wall -I/usr/local/include
-I. -I/usr/local/lib/ruby/1.8/i386-freebsd4.0
-I/usr/local/apache2/include -c mod_ruby.c
mod_ruby.c:93: syntax error before `*’
[ … etc. … ]
I found the error. Inside of a few mod_ruby-1.1.1 files there’s the
following preprocessor directive:
#ifdef APR_HAS_THREADS
But in the default build of Apache 2, this variable is set as follows:
#define APR_HAS_THREADS 0
Therefore, I had to change that #ifdef to an #if …
#if APR_HAS_THREADS
Now, mod_ruby-1.1.1 builds just fine.
This fix might have to be more sophisticated, because there might be
builds of Apache 2 where APR_HAS_THREADS doesn’t get defined at all. If
so, then there needs to be a combination of #ifdef and #if.
But in any case, attached is the patch that changes this #ifdef to an
#if in all the appropriate places, and which works for me.
Thanks again.
mod_ruby-1.1.1-patch (2.9 KB)
···
–
Lloyd Zusman
ljz@asfast.com