CentOS5.3でmod_rubyが使いたい
れいによって、mod_rubyを使いたい。もはや病気か・・・
それはそれ。早速ruby ./configure.rbを実行する。そしてmake。エラー。
$ 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 -fn o-strict-aliasing -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 -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux/i386-linux -I/usr/include/httpd -I/usr/include/apr-1 -c apachelib.capachelib.c: In function ‘ap_chdir_file’: apachelib.c:149: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_resultapachelib.c:154: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_resultapachelib.c: In function ‘rb_init_apache’:apachelib.c:374: error: ‘OPT_INCNOEXEC’ undeclared (first use in this function) apachelib.c:374: error: (Each undeclared identifier is reported only onceapachelib.c:374: error: for each function it appears in.)make: *** [
OPT_INCNOEXECが未定義とのこと。
$ grep INCNOEXEC *.h #無いようだ。 $ cd /usr/include/httpd $ grep INCNOEXEC *.h #当然無い。 $ vi http_core.h /** No directives */ #define OPT_NONE 0 /** Indexes directive */ #define OPT_INDEXES 1 /** SSI is enabled without exec= permission */ #define OPT_INCLUDES 2 /** FollowSymLinks directive */ #define OPT_SYM_LINKS 4 /** ExecCGI directive */ #define OPT_EXECCGI 8 /** directive unset */ #define OPT_UNSET 16 /** SSI exec= permission is permitted, iff OPT_INCLUDES is also set */ #define OPT_INC_WITH_EXEC 32 /** SymLinksIfOwnerMatch directive */ #define OPT_SYM_OWNER 64 /** MultiViews directive */ #define OPT_MULTI 128 /** All directives */ #define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INC_WITH_EXEC|OPT_SYM_LINKS|OPT_EXECCGI) /** @} */
にもないので、NOEXEC相当を探して・・・OPT_INCLUDESかな。これをapachelib.hに書いてしまおう。
$ vi apachelib.h #ifndef APACHELIB_H #define APACHELIB_H #define OPT_INCNOEXEC OPT_INCLUDES #←これを追加。
$ make $ su # paco -lD 'make install' #←pacoを入れていなければmake installでOK。
問題無いと思うけどあれば追記します