[Xapian-devel] Re: Xapian Binding compile error in Windows XP using CygWin

Koum koumakis at gmail.com
Fri Dec 23 09:44:59 GMT 2005


Olly Betts <olly <at> survex.com> writes:

> 
> OK, there are two problems in the configure script.  You should be able to get
> it to work if you edit xapian-bindings' configure script as follows...
> 
> Search for "libs" (including the quotes), and change this:
> 
>         case $host_os in
>         mingw* | pw32*)
>           PYTHON_LIBS=`$PYTHON -c 'import os,sys;print
> "-L"+os.path.join(sys.prefix,"libs").replace(os.sep,"/"),"-
lpython"+sys.version[:3].replace(".","")'`
> ;;         *)
>           PYTHON_LIBS=
>         esac
> 
> to this (add "cygwin* |" and change "libs" to "lib"):
> 
>         case $host_os in
>         cygwin* | mingw* | pw32*)
>           PYTHON_LIBS=`$PYTHON -c 'import os,sys;print
> "-L"+os.path.join(sys.prefix,"lib").replace(os.sep,"/"),"-lpython"+sys.version
[:3].replace(".","")'`
> ;;         *)
>           PYTHON_LIBS=
>         esac
> 
> Then "make distclean", rerun configure and make.  Let me know whether that
> fixes it or not (if it does, I'll apply the change, if not we'll see if we
> can work out what else is going wrong...)
> 
> Cheers,
>     Olly
> 

We passed the first errors with the update at the script, but I have a new 
problem ...

import _xapian
ImportError: No module named _xapian
I send again the error message.

make  all-recursive
make[1]: Entering directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bi
ndings-0.9.2'
Making all in python
make[2]: Entering directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bi
ndings-0.9.2/python'
make  all-recursive
make[3]: Entering directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bi
ndings-0.9.2/python'
Making all in docs
make[4]: Entering directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bi
ndings-0.9.2/python/docs'
Making all in examples
make[5]: Entering directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bi
ndings-0.9.2/python/docs/examples'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bin
dings-0.9.2/python/docs/examples'
make[5]: Entering directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bi
ndings-0.9.2/python/docs'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bin
dings-0.9.2/python/docs'
make[4]: Leaving directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bin
dings-0.9.2/python/docs'
make[4]: Entering directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bi
ndings-0.9.2/python'
if /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I..
 -I/usr/include/python2.4  -Wall -Wno-unused -Wno-uninitialized -g -O2 -I/usr/lo
cal/include -MT xapian_wrap.lo -MD -MP -MF ".deps/xapian_wrap.Tpo" -c -o xapian_
wrap.lo `test -f 'modern/xapian_wrap.cc' || echo './'`modern/xapian_wrap.cc; \
then mv -f ".deps/xapian_wrap.Tpo" ".deps/xapian_wrap.Plo"; else rm -f ".deps/xa
pian_wrap.Tpo"; exit 1; fi
mkdir .libs
 g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.4 -Wall -Wno-unused -Wn
o-uninitialized -g -O2 -I/usr/local/include -MT xapian_wrap.lo -MD -MP -MF .deps
/xapian_wrap.Tpo -c modern/xapian_wrap.cc  -DPIC -o .libs/xapian_wrap.o
/bin/sh ../libtool --tag=CXX --mode=link g++ -Wall -Wno-unused -Wno-uninitialize
d -g -O2 -I/usr/local/include   -o _xapian.la -rpath /usr/lib/python2.4/site-pac
kages -avoid-version -module -no-undefined xapian_wrap.lo -Wl,--enable-runtime-p
seudo-reloc /usr/local/lib/libxapian.la -L/usr/lib -lpython24

*** Warning: linker path does not have real file for library -lpython24.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libpython24 but no candidates were found. (...for file magic test)

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module _xapian.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
ar cru .libs/_xapian.a .libs/xapian_wrap.o
ranlib .libs/_xapian.a
creating _xapian.la
(cd .libs && rm -f _xapian.la && ln -s ../_xapian.la _xapian.la)
cp `test -f modern/xapian.py || echo './'`modern/xapian.py xapian.py
PYTHONPATH=".:.libs" /usr/bin/python -c "import xapian"
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bindings-0.9.2/python/x
apian.py", line 4, in ?
    import _xapian
ImportError: No module named _xapian
make[4]: *** [xapian.pyc] Error 1
make[4]: Leaving directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bin
dings-0.9.2/python'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bin
dings-0.9.2/python'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bin
dings-0.9.2/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/d/AutomaticTextAnalysis-1.3-rc1/xapian-bin
dings-0.9.2'
make: *** [all] Error 2

Thank you.
Lefteris.





More information about the Xapian-devel mailing list