view · edit · sidebar · attach · print · history

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

  1. The Makefile: https://gist.github.com/809611 of mod_ruby
  2. First read this http://www.mail-archive.com/dev@apr.apache.org/msg11024.html
  3. your really need to understand step 2.
  4. Create a working directory. I named it dldf in C:\Apache2.2\dldf
  5. pexports libapr-1.dll | sed "s/^_//" > libapr-1s.def
  6. dlltool -U -d libapr-1s.def -l libapr-1s.a
  7. cp libapr-1s.a ../lib/libapr-1s.lib
  8. pexports libapr-1.dll > libapr-1c.def
  9. dlltool -d libapr-1c.def -l libapr-1c.a
  10. cp libapr-1c.a ../lib/libapr-1c.lib
  11. 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
  12. comment out line 794 of request.c of mod_ruby
  13. 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

  1. libaprutil-1.dll
  2. 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

view · edit · sidebar · attach · print · history
Page last modified on February 09, 2011, at 10:00 AM