[Xapian-discuss] Fail compiling Ruby bindings Windows MinGW RubyInstaller 1.9.3

Olly Betts olly at survex.com
Sat Feb 22 00:07:41 GMT 2014


On Thu, Feb 20, 2014 at 12:45:43PM +0000, Denis, Alexis wrote:
> I am trying to compile xapian, omega and xapian Ruby bindings 1.2.17
> on Windows using the MinGW environment and Ruby 1.9.3 (installed using
> the Ruby installer). The Win32 files are not an option because Ruby is
> compiled with MinGW as of 1.9 version. Xapian compiles out of the box.
> Omega is giving me some grief about unixperm.cxx. The ruby bindings
> simply don't link the so file. I tried to link it with
> libmsvcrt-ruby191-static.a and it linked but it failed to load with a
> memory error (during require 'xapian').

It'll need to be linked to the shared version of libmsvcrt-ruby191 - if
you link with the static version, you'll end up with two copies of Ruby
in the process when the ruby interpreter dynamically loads the xapian
extension.

The simple workaround is to build with:

make RUBY_LIBS=-lmsvcrt-ruby191

A fix to make it build out of the box should be in 1.2.18 and 1.3.2.
Ticket is: http://trac.xapian.org/ticket/634

Cheers,
    Olly



More information about the Xapian-discuss mailing list