[Xapian-discuss] xapian with MinGW

Adi Oanca adioanca at gmail.com
Wed Jan 9 07:34:08 GMT 2008


On Jan 9, 2008 12:53 AM, Olly Betts <olly at survex.com> wrote:
> On Wed, Jan 09, 2008 at 12:07:19AM +0200, Adi Oanca wrote:
> >    Has anybody tested Xapian with MinGW?
> Yes - it certainly used to work.

   That's good news. :)

> >    I cannot run the "simpleindex" example. I'm getting a SIGSEGV. A
> > backtrace shows me lots of garbage, so things must be really messed
> > up. All that I can say for now, is that it happens when on this line:
> >
> > db.add_document(doc);
> >
> > from simpleindex.cc, and after
> >
> > string Xapian::Document::Internal::get_data() const { ... }
> >
> > all hell breaks loose.
> >
> >
> > Anybody knows something about this...?
> I've no idea from the information given I'm afraid.
> How are you running simpleindex?

2 ways:
1. from Msys, from the BUILD/examples dir I am running the script
2. from Windows cmd.exe with a modified path to point to .a's and
xapian's .dll, from a given dir where I have "simpleindex.exe" taken
from BUILD/examples/.libs.

In both cases it runs, but it crashes on the line that I specified.

> What does the "garbage" backtrace look like?

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\mingw\msys\home\Adi>set PATH=D:\mingw\msys\home\Adi\xapian-core-1.0.5\BUILD\.

D:\mingw\msys\home\Adi>simpleindex.exe aaa
the string is not important

D:\mingw\msys\home\Adi>gdb simpleindex.exe
GNU gdb
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run aaa
Starting program: D:\mingw\msys\home\Adi/simpleindex.exe aaa
test indexing of xapian

Program received signal SIGSEGV, Segmentation fault.
0x7106505a in strsep () from D:\mingw\msys\bin\msys-1.0.dll
(gdb) bt
#0  0x7106505a in strsep () from D:\mingw\msys\bin\msys-1.0.dll
#1  0x710315c5 in msys-1!calloc () from D:\mingw\msys\bin\msys-1.0.dll
#2  0x71098644 in msys-1!_ctype_ () from D:\mingw\msys\bin\msys-1.0.dll
#3  0x710a574c in msys-1!__ctype_ptr () from D:\mingw\msys\bin\msys-1.0.dll
#4  0x7c926ac8 in ntdll!iswdigit () from C:\WINXP\system32\ntdll.dll
#5  0xffffffff in ?? ()
#6  0x0022f9a0 in ?? ()
#7  0x0000001e in ?? ()
#8  0x0000000f in ?? ()
#9  0x40000060 in ?? ()
#10 0x7c91056d in ntdll!RtlFreeThreadActivationContextStack ()
   from C:\WINXP\system32\ntdll.dll
#11 0x00000000 in ?? ()

> And does "make check" in the built xapian-core source tree pass?

   Nope. It gets stuck here:

depbase=`echo harness/backendmanager_remotetcp.o | sed
g++ -DHAVE_CONFIG_H -I. -I.. -I../../tests -I../../common
-I../../include -I../include -I../../tests/harness
-I../../backends/quartz   -Wall -W -Wredundant-decls -Wpointer-arith
-Wcast-qual -Wcast-align -Wno-multichar -Wno-long-long
-fno-gnu-keywords -Wundef -Wshadow -g -O2 -MT
harness/backendmanager_remotetcp.o -MD -MP -MF $depbase.Tpo -c -o
../../tests/harness/backendmanager_remotetcp.cc &&\
mv -f $depbase.Tpo $depbase.Po
../../tests/harness/backendmanager_remotetcp.cc:209: error: attributes
are not allowed on a function-definition
make[4]: *** [harness/backendmanager_remotetcp.o] Error 1
make[4]: Leaving directory `/home/Adi/xapian-core-1.0.5/BUILD/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/home/Adi/xapian-core-1.0.5/BUILD/tests'
make[2]: *** [check] Error 2
make[2]: Leaving directory `/home/Adi/xapian-core-1.0.5/BUILD/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/Adi/xapian-core-1.0.5/BUILD'
make: *** [check] Error 2

Thanks for helping Olly!


More information about the Xapian-discuss mailing list