[redland-dev] Has anyone successfully installed Redland RDF with Ruby Bindings on Windows XP

Dave Beckett dave at dajobe.org
Fri Oct 14 03:32:52 BST 2005


jche5167 at mail.usyd.edu.au wrote:
> Hi Everyone,
> 
> I have been stuck trying to compile ruby bindings with Redland RDF for the
> last three days. I'm certainly getting deseparate, so I'm just wondering
> is there anyone out there that could give me a few pointers as to where to
> go.
> 
> I can successfully install Redland RDF 1.0.2, running make check, returns
> "All 16 Test Pass".
> I can also configure Redland-RDF Bindings --with-rugy 1.0.2.1, with no
> problems. But when I attempt to compile the bindings I get the following
> error:
> Making all in ruby
> make[1]: Entering directory `/home/redland-bindings-1.0.2.1/ruby'
> Making all in lib
> make[2]: Entering directory `/home/redland-bindings-1.0.2.1/ruby/lib'
> Making all in rdf
> make[3]: Entering directory `/home/redland-bindings-1.0.2.1/ruby/lib/rdf'
> Making all in redland
> make[4]: Entering directory
> `/home/redland-bindings-1.0.2.1/ruby/lib/rdf/redland'
> Making all in schemas
> make[5]: Entering directory
> `/home/redland-bindings-1.0.2.1/ruby/lib/rdf/redland/schemas'
> make[5]: Nothing to be done for `all'.
> make[5]: Leaving directory
> `/home/redland-bindings-1.0.2.1/ruby/lib/rdf/redland/schemas'
> make[5]: Entering directory
> `/home/redland-bindings-1.0.2.1/ruby/lib/rdf/redland'
> make[5]: Nothing to be done for `all-am'.
> make[5]: Leaving directory
> `/home/redland-bindings-1.0.2.1/ruby/lib/rdf/redland'
> make[4]: Leaving directory
> `/home/redland-bindings-1.0.2.1/ruby/lib/rdf/redland'
> make[4]: Entering directory `/home/redland-bindings-1.0.2.1/ruby/lib/rdf'
> make[4]: Nothing to be done for `all-am'.
> make[4]: Leaving directory `/home/redland-bindings-1.0.2.1/ruby/lib/rdf'
> make[3]: Leaving directory `/home/redland-bindings-1.0.2.1/ruby/lib/rdf'
> make[3]: Entering directory `/home/redland-bindings-1.0.2.1/ruby/lib'
> make[3]: Nothing to be done for `all-am'.
> make[3]: Leaving directory `/home/redland-bindings-1.0.2.1/ruby/lib'
> make[2]: Leaving directory `/home/redland-bindings-1.0.2.1/ruby/lib'
> Making all in test
> make[2]: Entering directory `/home/redland-bindings-1.0.2.1/ruby/test'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/home/redland-bindings-1.0.2.1/ruby/test'
> make[2]: Entering directory `/home/redland-bindings-1.0.2.1/ruby'
> gcc -DPACKAGE_NAME=\"Redland\ RDF\ Application\ Framework\ bindings\"
> -DPACKAGE_TARNAME=\"redland-bindings\" -DPACKAGE_VERSION=\"1.0.2.1\"
> -DPACKAGE_STRING=\"Redland\ RDF\ Application\ Framework\ bindings\
> 1.0.2.1\" -DPACKAGE_BUGREPORT=\"http://bugs.librdf.org/\"
> -DPACKAGE=\"redland-bindings\" -DVERSION=\"1.0.2.1\" -DSTDC_HEADERS=1
> -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
> -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1   -I. -DREDLAND_PRE_I
> -DREDLAND_TYPES_I   -I/usr/local/include -I/usr/local/include
> -I/usr/local/include  -I  -g -O2  -I/usr/local/include
> -I/usr/local/include -I/usr/local/include  -g -O2 -fPIC -DPIC -I
> redland_wrap.c -c -o redland_wrap.so
> make[2]: Leaving directory `/home/redland-bindings-1.0.2.1/ruby'
> make[1]: Leaving directory `/home/redland-bindings-1.0.2.1/ruby'
> gcc: no input files
> make[2]: *** [redland_wrap.so] Error 1
> make[1]: *** [all_recursive] Error 1
> make: *** [all_recursive] Error 1
> 
> Any ideas as to why I'm having this problem, I've tried other releases but
> still with no luck and same problem. I'm trying to compile Redland using
> Cygwin on Windows XP.
> Any help would be much appreciated.
> 
> Is there a bug with the ruby bindings that I don't know of, and has anyone
> managed to compile ruby bindings using Cygwin on windows. I have googled
> frantically, but there's nothing much out there.

The bit of the gcc that is the problem is this fragment:

  ...  -I redland_wrap.c -c -o redland_wrap.so

so instead of setting an include directory -I SOMETHING, it tries to set 
it to the input file, hence it finds nothing to compile.

This tends to suggest that the configure program didn't find the ruby C 
header files, which it does by running 'ruby' inside configure a few 
times such as like this:
   $RUBY -rrbconfig -e "print Config::CONFIG['archdir']
and using the resulting values.

Here (OSX), I get this after running configure:

$ grep RUBY config.status
s, at RUBY@,ruby,;t t
s, at RUBY_INCLUDES@,-I/usr/lib/ruby/1.8/powerpc-darwin8.0,;t t
s, at RUBY_LIB@,ruby,;t t
s, at RUBY_DIR@,/usr/lib/ruby/1.8/powerpc-darwin8.0,;t t
s, at RUBY_LIBDIR@,/usr/lib/ruby/1.8,;t t
s, at RUBY_VERSION@,1.8.2,;t t

and the compile line in the ruby dir ends with:
   ...  -fPIC -DPIC -I/usr/lib/ruby/1.8/powerpc-darwin8.0 redland_wrap.c 
-c -o redland_wrap.so

as it substitutes in the RUBY_INCLUDES that it found.

So... possibilities:

1. It could be that --with-ruby doesn't set the ruby interpreter right 
and you need to set the path to the ruby program with:
    configure --with-ruby=/usr/bin/ruby
(or wherever it is)

2. Similar to #1 and should have identical effect
   RUBY=/usr/bin/ruby configure --with-ruby

3. I can't recall the cygwin package naming but there must be a split 
between the user and development ruby packages, so you'll need to 
install both.

If those don't fix it I'm not sure what it is without some more info. 
I've no way to test cygwin things.

Dave


More information about the redland-dev mailing list