CentOS 6.3(64bit) にmod_mruby をインストール

11月1日時点で

# git clone git://github.com/matsumoto-r/mod_mruby.git
# cd mod_ruby
# make

すると

/usr/bin/ld: ./vendors/mrblib/mrblib.o: relocation R_X86_64_32 against `mrblib_irep' can not be used when making a shared object; recompile with -fPIC
./vendors/mrblib/mrblib.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make: *** [mod_mruby.so] エラー 1

でmake に失敗するので

diff --git a/Makefile b/Makefile
index 5855d2b..702ddab 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@ tmp/mruby:
        cd tmp; git clone git://github.com/mruby/mruby.git

 libmruby.a: tmp/mruby
-       cd tmp/mruby && make
+       cd tmp/mruby && make CFLAGS="-O3 -fPIC"
        cp -r tmp/mruby/include vendors/
        cp -r tmp/mruby/lib vendors/
        cp -r tmp/mruby/src vendors/

こんな感じで修正した。