how to build 64bit xapian using MSVC2017?

李澍 lishu at fiberhome.com
Wed Apr 11 04:27:01 BST 2018


 Hi, Olly:
  I post the error in the attachment, any methods to fix it?
  Run the command (.\lemon.exe -q -oqueryparser_internal.cc -hqueryparser_token.h queryparser.lemony) will get the error.
 
  If it is hard to fix, I will upgrade xapian to 1.4. But I worry it will cost me too much time to modify my application code.

  Thanks a lot.

Here is the error details:

lemon.c:

#define LISTSIZE 30
static char *msort(
  char *list,
  char **next,
  int (*cmp)(const char*,const char*)
){
  unsigned long offset;
  char *ep;
  char *set[LISTSIZE];
  int i;
  offset = (unsigned long)next - (unsigned long)list;
  for(i=0; i<LISTSIZE; i++) set[i] = 0;
  while( list ){
    ep = list;
    list = NEXT(list);
    NEXT(ep) = 0;
 for(i=0; i<LISTSIZE-1 && set[i]!=0; i++){
      ep = merge(ep,set[i],cmp,offset);
      set[i] = 0;
    }
    set[i] = ep;
  }

throw exception in 'for(i=0; i<LISTSIZE-1 && set[i]!=0; i++)'

unhandled exception at 0x00007FF75873AA1A (in lemon.exe ): 0xC0000005: read position 0x00000000329EBB90 access conflict

autowatch:
+		ep	0x0000000000000000 <NULL>	char *
		i	686815808	int
+		list	0x0000000000000000 <NULL>	char *
+		set	0x000000bb28eff8b0 {0x0000000000000000 <NULL>, 0x0000000000000000 <NULL>, 0x0000000000000000 <NULL>, ...}	char *[30]

 


> But the query parser compiling failed.
>
> It seems the lemon.exe get a runtime error.
> 
> If you tell us what the error is, we might be able to help.  But please
> try with a RELEASE/1.4 snapshot rather than 1.2.8.

> > -----原始邮件-----
> > 发件人: "Olly Betts" <olly at survex.com>
> > 发送时间: 2018-04-04 03:41:33 (星期三)
> > 收件人: "李澍" <lishu at fiberhome.com>
> > 抄送: xapian-discuss <xapian-discuss at lists.xapian.org>
> > 主题: Re: Re: how to build 64bit xapian using MSVC2017?
> > 
> > On Tue, Apr 03, 2018 at 03:21:24PM +0800, 李澍 wrote:
> > > My xapian version is 1.2.8.
> > > Need I upgrade it to 1.4 if I want to build it with MSVC2017 x64?
> > 
> > Yes, you will need to upgrade (and I said as much in my original reply).
> > 1.2.x is no longer supported, and 1.2.8 is far from even being the
> > latest 1.2.x release.
> > 
> > Once 1.4.6 is released that should work out of the box.  Meanwhile
> > snapshots from here should work:
> > 
> > https://oligarchy.co.uk/xapian/RELEASE/1.4/
> > 
> > Incidentally, the remote backend now works in the MSVS 2017 64-bit build
> > - the bug was some third party code which implements POSIX-compatible
> > readdir() was using long where it should have been using intptr_t.
> > Mingw worked OK because it provides its own readdir() so the buggy code
> > isn't used there.
> > 
> > Cheers,
> >     Olly
> 


More information about the Xapian-discuss mailing list