[redland-dev] Building Redland 0.9.16 on WinXP w/full Cygwin install

Dave Beckett dave.beckett at bristol.ac.uk
Wed Jun 2 17:09:39 BST 2004


On Wed, 26 May 2004 03:07:14 +0800, brian donovan <lists at lophty.com> wrote:

> Thank you for the pointers Dave - I've taken your advice and things seem 
> to be looking better, but I'm still running into difficulties.  Of 
> course, after posting my msg, I saw that I'd messed up and put Redland 
> 0.9.17 in my message subject instead of 0.9.16.  I've fixed it for this 
> post and hope that it doesn't mess up the threading in the archives.
> 
> The problems now definitely seem to be with the language interfaces 
> (I've tried Perl, Python, and Ruby and only the Perl API seems to work, 
> but I would really really much rather use Python or Ruby).  I'd like to 
> lay out what I've tried and link to the  results and error output of the 
> various steps, which I've uploaded to the Web (plain text files).  I'd 
> be grateful for any and all advice from anyone on getting the Python and 
> Ruby interfaces working (preferably with the versions of each bundled 
> with Cygwin).
> 
> I don't know whether or not this is significant (including this info 
> just in case), but here's the value of my PATH environment variable when 
> I began trying to build Redland and the language APIs again this evening :
> 
> C:\Program 
> Files\TeXLive\bin\win32;C:\cygwin\bin;c:\ruby\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program 
> Files\cvsnt;C:\Program Files\Java\j2re1.4.2_01\bin
> 
> I don't recall whether the Cygwin installer puts the Cygwin bin in the 
> PATH value at all.  I put it there so that I could access the 
> Cygwin-ported utilities from anywhere on my system and placed it at the 
> front.  The ruby bin entry there was produced by the Ruby installed from 
> RubyForge (<http://rubyforge.org/frs/?group_id=167>) before I installed 
> Cygwin and added it to the PATH, but the cygwin bin precedes the ruby 
> bin in the value of PATH and ruby --version at a Bash prompt on my 
> system tells me the version bundled with Cygwin.
> 
> I retried the ./configure, make, make install process beginning with :
> 
> ./configure --with-python --with-perl --with-ruby --with-java --with-tcl 
> 1>brians_configure_results.txt 2>brians_configure_errors.txt
> 
> then ...
> 
> make [sending results and warnings/errors to files as above]

The output files are kind of hard to read separated into results and
errors since it's not clear what generated the errors.  You might try
  ./configure ... args ...   >output.txt 2>&1
which will write stdout and stderr to output.txt as one results.
(at least on unix, I guess cygwin will do the same).

> make install [ditto]
> 
> I've uploaded the files to (please pardon the ugly Apache directory 
> listing) : 
> <http://monokromatik.com/veethree/flossin-files/redland0.9.17-buildoutput/wout-bdb-libwww-config/>.
> 
> The errors/warnings in the configure step were just warnings and the 
> yes/lib stuff was gone since I left out the --with-bdb.  The 
> errors/warnings in the make and make install steps nearly all involved 
> Redland_wrap and Python.  I'm most interested in having the Python and 
> Ruby APIs functioning, but neither is working.

yeah, I've changed the configure so some of the remaining benign
warnings will not appear.

checking Python includes... -I/usr/include/python2.3

> 
> When I tried redlandtest.py : 
> <http://monokromatik.com/veethree/flossin-files/redland0.9.17-buildoutput/wout-bdb-libwww-config/test_python_api/>

How shared libraries (dlls) work under cygwin or even win32 is not
something I know about.


> When I tried test.rb : 
> <http://monokromatik.com/veethree/flossin-files/redland0.9.17-buildoutput/wout-bdb-libwww-config/test_ruby_api/>

Looks the same problem here - where does it look for dlls?

You might try copying the resulting files from the perl or ruby dirs
into wherever the installed perl and ruby install to.

> For no particular reason, just a stab in the dark, I installed 
> ActivePython and it placed itself at the head of my PATH environment 
> variable, now :
> 
> C:\Python23\.;C:\Program 
> Files\TeXLive\bin\win32;C:\cygwin\bin;c:\ruby\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program 
> Files\cvsnt;C:\Program Files\Java\j2re1.4.2_01\bin
> 
> When I do python --version at a Bash prompt, it directs me to the 
> ActivePython installation.  I did ./configure, make, make install again 
> (not knowing whether or not to expect a different result).  I've 
> uploaded the output of each step :  
> <http://monokromatik.com/veethree/flossin-files/redland0.9.17-buildoutput/after-install-activepython/>.


the configure says:

checking Python includes... -Ic:\Python23/include/python2.3
checking Python libs... c:\Python23/lib/python2.3/site-packages

which I guess is right.

But this clearly isn't working, from the errors:

...
Redland_wrap.c:13:20: Python.h: No such file or directory
Redland_wrap.c:234:20: Python.h: No such file or directory
Redland_wrap.c:283: error: syntax error before "PyObject"

which presumably is from the line:
gcc -DHAVE_CONFIG_H  -I..    -DLIBRDF_INTERNAL=1 -g  -fPIC -DPIC -I../librdf -I../librdf/ -Ic:\Python23/include/python2.3 ./Redland_wrap.c -c -o Redland_wrap.so
Maybe cygwin or gcc gets confused with that mixture of DOS and unix
names.

> 
> The errors and warnings for the make and make install steps are 
> different, but redlandtest.py still doesn't work with fundamentally the 
> same error messages : 
> <http://monokromatik.com/veethree/flossin-files/redland0.9.17-buildoutput/after-install-activepython/test_python_api/>

Well it didn't compile the Redland_wrap.so, so it's not likely to
work. Probably the .so name isn't correct for cygwin, should be
.dll or something.

As you can guess, portable shared libraries are a pain.  libtool
is a helper but it has it's own problems.

Dave



More information about the redland-dev mailing list