Re: Problems starting Apache 2.2 with mod_ruby

Michael Sullivan <[email protected]> Tue, 10 Jan 2006 20:37:53 +0900
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Ok, Brian and anyone else out there, I appreciate your willingness to  
help, and anyone else who decides to take a look at the tarball.  I  
don't have a website up yet where I can stick it.  Working right now  
to get a fixed IP address, web server, firewall set up, etc.  This is  
one piece, getting mod_ruby working with the web server.

Some notes:

1. I edited the file "/usr/local/lib/ruby/1.8/sparc-solaris2.9/ 
config.h" to comment out the offending line:

/* #define _FILE_OFFSET_BITS 64 */

This doesn't appear to break anything since it is defined in the  
system header files.  I suspect the leading "_" is a typo within the  
Ruby 1.8.4 distribution since none of the other macros have the  
leading character.

2. I started with the latest mod_ruby svn source.  There is a file in  
the tarball called "diff-file.list"  This contains an svn diff  
against the base source and the changed files in the mod_ruby tree.   
This may give some hints, but I have scoured it and since there are  
no other errors or warning anywhere else, I feel fairly confident  
that my function translations are correct.  They are all nested within:

#ifdef APACHE2
	apr_new-function_call(....);
#else
	ap_old_function(...);
#endif

3. The module was configured in the following manner:

./configure.rb --with-apxs=/usr/local/apache2/bin/apxs

4. Again, here's the info on my system:

[root@www mod_ruby-1.2.4]# gcc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.4/specs
Configured with: ./configure --enable-shared
Thread model: posix
gcc version 3.4.4
[root@www mod_ruby-1.2.4]# uname -a
SunOS www.mydomain.com 5.9 Generic_118558-19 sun4u sparc SUNW,Ultra-5_10

Here's the warning an Apache startup error:

gcc -g -O2  -fPIC -Wall  -I. -I/usr/local/lib/ruby/1.8/sparc- 
solaris2.9 -I/usr/local/apache2/include   -c mod_ruby.c
mod_ruby.c:151: warning: missing braces around initializer
mod_ruby.c:151: warning: (near initialization for `ruby_cmds[0].func')
mod_ruby.c:151: warning: initialization from incompatible pointer type
mod_ruby.c:153: warning: initialization from incompatible pointer type
mod_ruby.c:155: warning: initialization from incompatible pointer type
mod_ruby.c:157: warning: initialization from incompatible pointer type
mod_ruby.c:159: warning: initialization from incompatible pointer type
mod_ruby.c:161: warning: initialization from incompatible pointer type
mod_ruby.c:163: warning: initialization from incompatible pointer type
mod_ruby.c:165: warning: initialization from incompatible pointer type
mod_ruby.c:167: warning: initialization from incompatible pointer type
mod_ruby.c:169: warning: initialization from incompatible pointer type
mod_ruby.c:171: warning: initialization from incompatible pointer type
mod_ruby.c:173: warning: initialization from incompatible pointer type
mod_ruby.c:175: warning: initialization from incompatible pointer type
mod_ruby.c:177: warning: initialization from incompatible pointer type
mod_ruby.c:179: warning: initialization from incompatible pointer type
mod_ruby.c:181: warning: initialization from incompatible pointer type
mod_ruby.c:183: warning: initialization from incompatible pointer type
mod_ruby.c:186: warning: initialization from incompatible pointer type
mod_ruby.c:189: warning: initialization from incompatible pointer type
mod_ruby.c:192: warning: initialization from incompatible pointer type
mod_ruby.c:195: warning: initialization from incompatible pointer type

[root@www mod_ruby-1.2.4]# /usr/local/apache2/bin/apachectl start
httpd: Syntax error on line 106 of /usr/local/apache2/conf/ 
httpd.conf: Can't locate API module structure `mod_ruby' in file /usr/ 
local/apache2/modules/mod_ruby.so: ld.so.1: httpd: fatal: mod_ruby:  
can't find symbol

The compile is clean with the exception of the warning I mentioned  
before.  I suspect the initializer may be the problem as a pointer  
may have changed, but for the life of me, I can't see anything  
wrong.  Another set of eyeballs looking at this is most appreciated.

Cheers,

Mike

--
Mobile: +81-80-3202-2599
Office: +81-3-3395-6055

"You can figure out how to get it off.  It's on the Internet.  I  
looked it up."
         Martha Stewart - re: her proximity restraint.


On Jan 10, 2006, at 19:49 , Brian Candler wrote:

> On Tue, Jan 10, 2006 at 06:16:22PM +0900, Michael Sullivan wrote:
>> I asked this the other day, but there have been no replies, so I'll
>> post the problem again with some additional information.
>
> ... but missing the actual hacked source code you're trying to  
> compile :-(
>
> The program error could be anywhere. You might have missed a  
> semicolon from
> the line before; the definition of the structure member 'func' may  
> not be
> sensible. Or a zillion other things.
>
> I suggest you post your entire tarball, with complete instructions  
> on how
> you configure and compile it, then someone can try to replicate the  
> problem
> and then debug it.
>
> I saw you posted a snippet from mod_ruby.c before. In the absence of
> anything obviously wrong in that snippet, that means the error is  
> somewhere
> else.
>
> Regards,
>
> Brian.
>