mod_ruby with Apache for Windows with MinGW compiled Ruby
Build mod_ruby on Windows against these libs:
Attach:libapr-1i.lib.tar.gz
Attach:libaprutil-1i.lib.tar.gz
Attach:libhttp-i.lib.tar.gz
and use this Makefile
https://gist.github.com/814328
You can also follow the below steps to understand how I came to the above results.
Convert the Libs (DLLs) of Apache for Windows to link against MinGW compiled mod_ruby
- The Makefile: https://gist.github.com/809611 of mod_ruby
- First read this http://www.mail-archive.com/dev@apr.apache.org/msg11024.html
- your really need to understand step 2.
- Create a working directory. I named it dldf in C:\Apache2.2\dldf
- pexports libapr-1.dll | sed "s/^_//" > libapr-1s.def
- dlltool -U -d libapr-1s.def -l libapr-1s.a
- cp libapr-1s.a ../lib/libapr-1s.lib
- pexports libapr-1.dll > libapr-1c.def
- dlltool -d libapr-1c.def -l libapr-1c.a
- cp libapr-1c.a ../lib/libapr-1c.lib
- Adjust above make file to include all the new import files: libapr-1s, libapr-1c, libaprutil-1s, libaprutil-1c, libhttpd-s, libhttpd-c all placed in C:\Apache2.2\lib
- comment out line 794 of request.c of mod_ruby
- run 'make' and mod_ruby will compile just fine with MinGW-gcc-3.4.5 linked against Apache 2.2.17 for Windows!
You need do the exact same steps for
- libaprutil-1.dll
- libhttpd.dll
then the _imp__* errors will go away ;)
mod_ruby, Apache for Windows download
If you want to build mod_ruby.so with nmake please see this: http://url.ba/m5iw
Sources
mod_ruby on Github: https://github.com/shugo/mod_ruby