Ruby 1.8, mod_ruby-1.1.1, and Apache 2 
Author Message
 Ruby 1.8, mod_ruby-1.1.1, and Apache 2

Can anyone point me to a coookbook recipe (or at least some detailed
docs) for how I can build mod_ruby-1.1.1 with Apache 2 using Ruby 1.8?

Is that even possible?

I searched the archives of this mailing list, but I couldn't find
anything that addresses this combination of packages.  I'm hoping that I
overlooked something.

Thanks in advance.

--
 Lloyd Zusman



Wed, 16 Nov 2005 11:39:33 GMT  
 Ruby 1.8, mod_ruby-1.1.1, and Apache 2
Is this what you mean?
Server Version: Apache/2.0.46 (Unix) DAV/2 mod_ssl/2.0.46 OpenSSL/0.9.7a
mod_ruby/1.1.1 PHP/4.3.2
Server Built: May 28 2003 22:04:59

If so, I'll be more than happy to post my config files.

Quote:

> Can anyone point me to a coookbook recipe (or at least some detailed
> docs) for how I can build mod_ruby-1.1.1 with Apache 2 using Ruby 1.8?

> Is that even possible?

> I searched the archives of this mailing list, but I couldn't find
> anything that addresses this combination of packages.  I'm hoping that I
> overlooked something.

> Thanks in advance.

> --
>  Lloyd Zusman




Wed, 16 Nov 2005 14:07:42 GMT  
 Ruby 1.8, mod_ruby-1.1.1, and Apache 2

Quote:
> Is this what you mean?
> Server Version: Apache/2.0.46 (Unix) DAV/2 mod_ssl/2.0.46 OpenSSL/0.9.7a
> mod_ruby/1.1.1 PHP/4.3.2
> Server Built: May 28 2003 22:04:59

> If so, I'll be more than happy to post my config files.

Thank you very much.

Yes, that's the configuration.  I'm encouraged that you got it working.

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 `*'
  mod_ruby.c:93: warning: type defaults to `int' in declaration of
   `ruby_request_queue_mutex'
  mod_ruby.c:93: warning: data definition has no type or storage class
  mod_ruby.c:94: syntax error before `*'
  mod_ruby.c:94: warning: type defaults to `int' in declaration of
   `ruby_request_queue_cond'
  mod_ruby.c:94: warning: data definition has no type or storage class
  [ ... more similar syntax errors ... ]

It seems like mod_ruby.c is making use of one or more typedefs that
aren't defined in any of the apache2 include files.

If you want to take this off line, feel free to write to me privately.

Thanks again.

--
 Lloyd Zusman



Wed, 16 Nov 2005 15:17:21 GMT  
 Ruby 1.8, mod_ruby-1.1.1, and Apache 2

Quote:


>> [ ... ]

> 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.

--
 Lloyd Zusman

  mod_ruby-1.1.1-patch
2K Download


Wed, 16 Nov 2005 23:40:13 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. string.c (str_alloc) ruby 1.8 + ruby-gtk crash

2. RAA Modules and Ruby 1.8

3. Ruby 1.8 and Win XP compatibility

4. Usable Windows interactive command shell in Ruby 1.8?

5. Problems with Test::Unit and Ruby 1.8?

6. Help with regexp in range in Ruby 1.8

7. problem with Ruby 1.8 and Tk

8. solaris, Ruby 1.8 p2 - large file compilation environment issue

9. Ruby 1.8 preview1 questions

10. Ruby 1.8

11. Problems building mysql ruby 2.4.4 on 1.8

12. can't compile ruby 1.8

 

 
Powered by phpBB® Forum Software