hi, Olly Betts, Thank you for you answer. My xapian version is 1.2.8. Need I upgrade it to 1.4 if I want to build it with MSVC2017 x64? lishu at fiberhome.com From: Olly Betts Date: 2018-03-29 11:10 To: 李澍; xapian-discuss Subject: Re: how to build 64bit xapian using MSVC2017? On Tue, Mar 20, 2018 at 08:28:24PM +0000, Olly Betts wrote:> Related to this, the appveyor build is currently failing on git master. > Unfortunately the change at which is started to fail was the addition > of the new "honey" backend, which doesn't narrow things down to a > useful degree.I've disabled honey in these builds for now. This really needs to be addressed, but having the build green so we can spot quickly if other issues are introduced seems more productive than leaving it red for a long time. I've also added 64-bit CI builds for mingw64 and MSVS 2017. The former works with the remote backend enabled (the 64-bit SOCKET issue is actually not a problem in practice it seems) but the latter fails with what looks like a NULL pointer access in replication tests (the remote backend and replication use the same network code). I tried a MSVS 2015 64-bit build but that seemed to result in programs linked to libxapian failing on start-up with no error message. 32-bit builds with MSVS 2015 and 2017 work fine with the remote backend and replication. This is all backported to the RELEASE/1.4 branch and the CI builds are green there too: https://ci.appveyor.com/project/ojwb/xapian/build/44 These changes will be in 1.4.6 once released. Meanwhile snapshots from here should work (you'll want 1.4.5_git268 or later which is currently being generated as I write so should be there shortly): https://oligarchy.co.uk/xapian/RELEASE/1.4/ I've also added some notes on building with autotools and MSVC to xapian-core's INSTALL file. I'd love it if we could eliminate the various remaining problems - patches would be great, but at least working out what's going wrong would be useful. Cheers, Olly
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
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 >
On Wed, Apr 11, 2018 at 11:27:01AM +0800, 李澍 wrote:> 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.Sorry, it's not obvious from the error and it's just too old a version for me to spend any time debugging problems with it.> 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.And you'd rather cost us a lot of time trying to support your use of an obsolete version of Xapian? Have you actually tried upgrading? There are very few incompatible API changes between 1.2.x and 1.4.x. Unless you're using features which were already deprecated in 1.2.x, I would expect it to just work. Cheers, Olly