PDA

View Full Version : mod_ruby problem (The perfect server - Fedora 9)


zenmsic
7th July 2008, 12:21
When I followed the tut, things seemed to be OK until step 14, installing Ruby.

There is an error when I "make" the installation.

These are the messages:

[root@server1 mod_ruby-1.2.6]# ./configure.rb --with-apr-inlucdes=/usr/include/apr-1

checking for a BSD compatible install... /usr/bin/install -c

checking whether we are using gcc... yes

checking Ruby version... 1.8.6

checking for static Apache module support... no

checking for dynamic Apache module support... yes

creating Makefile

creating libruby.module

creating doc/Makefile

[root@server1 mod_ruby-1.2.6]# make

gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fPIC -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/include/httpd -c mod_ruby.c

In file included from /usr/include/httpd/httpd.h:43,

from mod_ruby.h:52,

from mod_ruby.c:33:

/usr/include/httpd/ap_config.h:25:17: error: apr.h: No such file or directory

/usr/include/httpd/ap_config.h:26:23: error: apr_hooks.h: No such file or directory

/usr/include/httpd/ap_config.h:27:32: error: apr_optional_hooks.h: No such file or directory

In file included from /usr/include/httpd/httpd.h:46,

from mod_ruby.h:52,

from mod_ruby.c:33:
...


The error list is so long that I think I don'nt have to copy everything here.

I've checked my system and apr-devel, apr-util-devel, httpd-devel are already installed. Updating or reinstalling these packages doesn't help.

The command locate apr.h returns the value /usr/include/apr-1/apr.h

How can I fix this problem?

Thanks.

falko
8th July 2008, 13:19
What's the output of uname -a?
Is SELinux disabled?

zenmsic
8th July 2008, 13:20
I've changed a little in my make command and the errors fixed, but not completely.

These are the codes:

[root@server1 mod_ruby-1.2.6]# make -I /usr/include/apr-1
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fPIC -Wall -O2 -g -pipe -Wall-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/include/httpd -c mod_ruby.c

cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
cc1: error: invalid parameter `ssp-buffer-size'

mod_ruby.c:1: error: bad value (generic) for -mtune= switch

make: *** [mod_ruby.o] Error 1



I guess there maybe some conflict in gcc version or something like that. Any help? Thanks.


============
Edited: I've typed the reply before seeing your reply, falko. I'll check what you ask me. I can be sure by now that SELinux is disabled.

zenmsic
8th July 2008, 13:28
This is the output of the uname -a command:

Linux server1 2.6.25.9-76.fc9.i686 #1 SMP Fri Jun 27 16:14:35 EDT 2008 i686 i686 i386 GNU/Linux

falko
9th July 2008, 15:34
Is SELinux disabled?

zenmsic
9th July 2008, 18:08
SELinux was disabled already (before I ran those commands).

falko
10th July 2008, 15:56
Can you try
yum groupinstall 'Development Tools'
yum groupinstall 'Development Libraries'?

zenmsic
11th July 2008, 04:51
Those two commands returned the same messages: "No packages in any requested group available to install or update" - things are already installed and latest version.

I've tried make command again but the error still be the same as my previous post.

zenmsic
15th July 2008, 21:26
any help for my problem, please.

falko
16th July 2008, 18:31
I have no idea... :(

hazzorz
8th September 2008, 04:08
Has anyone found a solution for this yet? When i try to make i get the same error.

[root@localhost mod_ruby-1.2.6]# make
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -fPIC -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/include/httpd -I/usr/include/apr-1 -c mod_ruby.c
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
cc1: error: invalid parameter `ssp-buffer-size'
mod_ruby.c:1: error: bad value (generic) for -mtune= switch
make: *** [mod_ruby.o] Error 1

EDIT: I noticed the step directly before make it tells me to run this command :
./configure.rb --with-apr-includes=/usr/include/apr-1

when i run this command it returns with

checking for a BSD compatible install... /usr/bin/install -c
checking whether we are using gcc... yes
checking Ruby version... 1.8.6
checking for static Apache module support... no
checking for dynamic Apache module support... yes
creating Makefile
./configure.rb:79:in `initialize': Permission denied - Makefile (Errno::EACCES)
from ./configure.rb:79:in `open'
from ./configure.rb:79:in `AC_OUTPUT'
from ./configure.rb:77:in `open'
from ./configure.rb:77:in `AC_OUTPUT'
from ./configure.rb:75:in `each'
from ./configure.rb:75:in `AC_OUTPUT'
from ./configure.rb:607
i believe that is what was causing my first problem but no i dont know how to fix that


anyone hvae any ideas?