Michael Sanders
2007-Mar-07 13:30 UTC
[Xapian-discuss] Building 0.9.10 with MSVC++ 2005 Express Edition
I'm attempting to build 0.9.10 with MSVC++ 2005 Express Edition (i.e.
the version available for free download from Microsoft), using the build
files and instructions supplied by Charlie Hull at
http://www.lemurconsulting.com/Products/Xapian/Overview.shtml
Rather than mail Charlie directly, I thought it might be useful for
others if I shared my experiences on the list (especially as I think my
first issue was down to an omission in the xapian-core distribution).
I've run in to three issues:
1) I initially got the error:
NMAKE : fatal error U1073: don't know how to make
'".\msvc_posix_wrapper.cc"'
It appears that the following files (maybe more?) are missing from the
'xapian-core-0.9.10.tar.gz' file:
xapian-core-0.9.10/common/msvc_posix_wrapper.cc
xapian-core-0.9.10/common/msvc_posix_wrapper.h
I obtained these missing files from SVN
(/tags/0.9.10/xapian-core/common), which fixed that problem.
2) The next error I got was:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762
for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl /I.. /I..\include /I..\common /W3 /EHsc /O2 /MD /c /D "NDEBUG"
/D
"WIN32" /D "__WIN32__" /D "_WINDOWS" /D
"HAVE_VSNPRINTF" /D
"HAVE_STRDUP" /D "_USE_32BIT_TIME_T"
/D_CRT_SECURE_NO_DEPRECATE /I
"..\.." /I "..\..\include" /I"..\..\common"
/I"..\..\languages"
/Fo".\\" "flint_table.cc"
flint_table.cc
c:\downloads\xapian\xapian-core-0.9.10\backends\flint\flint_io.h(27) :
fatal err
or C1083: Cannot open include file: 'unistd.h': No such file or
directory
The 'unistd.h' header file is supplied in
'xapian-core-0.9.10\include\xapian'. I therefore amended the
'config.mak' file to add that directory to the include search path,
which fixed that problem.
3) Unfortunately I haven't come up with a way around the third error:
cl /I.. /I..\include /I..\include\xapian /I..\common /W3 /EHsc /O2
/MD /c /D "NDEBUG" /D "WIN32" /D "__WIN32__" /D
"_WINDOWS" /D
"HAVE_VSNPRINTF" /D "HAVE_STRDUP" /D
"_USE_32BIT_TIME_T"
/D_CRT_SECURE_NO_DEPRECATE /I"..\languages" /Fo".\\" /Tp
".\omdocument.cc"
omdocument.cc
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(34) : error
C2027: use of undefined type 'Xapian::Document::Internal'
..\include\xapian\document.h(40) : see declaration of
'Xapian::Document::Internal'
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(34) : error
C2146: syntax error : missing ';' before identifier 'it'
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(34) : error
C4430: missing type specifier - int assumed. Note: C++ does not support
default-int
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(34) : error
C4430: missing type specifier - int assumed. Note: C++ does not support
default-int
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(35) : error
C2027: use of undefined type 'Xapian::Document::Internal'
..\include\xapian\document.h(40) : see declaration of
'Xapian::Document::Internal'
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(35) : error
C2146: syntax error : missing ';' before identifier 'it_end'
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(35) : error
C4430: missing type specifier - int assumed. Note: C++ does not support
default-int
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(35) : error
C4430: missing type specifier - int assumed. Note: C++ does not support
default-int
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(40) : error
C2510: 'document_terms' : left of '::' must be a
class/struct/union
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(40) : error
C2027: use of undefined type 'Xapian::Document::Internal'
..\include\xapian\document.h(40) : see declaration of
'Xapian::Document::Internal'
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(40) : error
C4430: missing type specifier - int assumed. Note: C++ does not support
default-int
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(40) : error
C2143: syntax error : missing ',' before '&'
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(40) : error
C2065: 'it_' : undeclared identifier
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(40) : error
C2065: 'it_end_' : undeclared identifier
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(40) : error
C2065: 'size_' : undeclared identifier
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(44) : error
C2614: 'MapTermList' : illegal member initialization: 'it_end'
is not a
base or member
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(44) : error
C2614: 'MapTermList' : illegal member initialization: 'it' is
not a base
or member
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(65) : error
C2065: 'it' : undeclared identifier
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(65) : error
C2227: left of '->first' must point to class/struct/union/generic
type
type is ''unknown-type''
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(72) : error
C2227: left of '->second' must point to class/struct/union/generic
type
type is ''unknown-type''
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(72) : error
C2228: left of '.wdf' must have class/struct/union
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(82) : error
C2227: left of '->second' must point to class/struct/union/generic
type
type is ''unknown-type''
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(82) : error
C2228: left of '.positions' must have class/struct/union
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(86) : error
C2227: left of '->second' must point to class/struct/union/generic
type
type is ''unknown-type''
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(86) : error
C2228: left of '.positions' must have class/struct/union
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(86) : error
C2228: left of '.size' must have class/struct/union
c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(102) : error
C2065: 'it_end' : undeclared identifier
.\omdocument.cc(43) : error C2512: 'Xapian::Document::Internal' : no
appropriate default constructor available
.\omdocument.cc(51) : error C2027: use of undefined type
'Xapian::Document::Internal'
..\include\xapian/document.h(40) : see declaration of
'Xapian::Document::Internal'
...etc.
Any help gratefully received...
Thanks,
Michael
Charlie Hull
2007-Mar-07 13:47 UTC
[Xapian-discuss] Building 0.9.10 with MSVC++ 2005 Express Edition
Michael Sanders wrote:> I'm attempting to build 0.9.10 with MSVC++ 2005 Express Edition (i.e. > the version available for free download from Microsoft), using the build > files and instructions supplied by Charlie Hull at > http://www.lemurconsulting.com/Products/Xapian/Overview.shtml > > Rather than mail Charlie directly, I thought it might be useful for > others if I shared my experiences on the list (especially as I think my > first issue was down to an omission in the xapian-core distribution). > > I've run in to three issues: > > 1) I initially got the error: > > NMAKE : fatal error U1073: don't know how to make > '".\msvc_posix_wrapper.cc"' >Oops - looks like some confusion about what should be included in the distro. I'll chat to Olly and get this sorted out.> > 2) The next error I got was:> flint_table.cc > c:\downloads\xapian\xapian-core-0.9.10\backends\flint\flint_io.h(27) : > fatal err > or C1083: Cannot open include file: 'unistd.h': No such file or directory >My fault. There will be an updated set of build files up on our site soon, the header should have been copied to xapian-core-0.9.10\include not xapian-core-0.9.10\include\xapian automatically.> > > 3) Unfortunately I haven't come up with a way around the third error: > > cl /I.. /I..\include /I..\include\xapian /I..\common /W3 /EHsc /O2 > /MD /c /D "NDEBUG" /D "WIN32" /D "__WIN32__" /D "_WINDOWS" /D > "HAVE_VSNPRINTF" /D "HAVE_STRDUP" /D "_USE_32BIT_TIME_T" > /D_CRT_SECURE_NO_DEPRECATE /I"..\languages" /Fo".\\" /Tp > ".\omdocument.cc" > > omdocument.cc > c:\downloads\xapian\xapian-core-0.9.10\api\maptermlist.h(34) : error > C2027: use of undefined type 'Xapian::Document::Internal'I don't get this error - can you post your PATH, LIB and INCLUDE environment variables? Charlie
Olly Betts
2007-Mar-08 16:52 UTC
[Xapian-discuss] Building 0.9.10 with MSVC++ 2005 Express Edition
On Thu, Mar 08, 2007 at 04:31:29PM +0000, Olly Betts wrote:> Python 2.5 on Windows will need the module to be called "_xapian.pyd" > instead of "_xapian.dll". I believe older Python versions accepted > ".dll" or ".pyd", so we should probably always call it ".pyd".I found references to ".pyd" for Python modules from 1999, which is before Python 2.0. Currently we support Python 2.2 and up, so I suggest we should always use ".pyd" on Windows. Cheers, Olly
Michael Sanders
2007-Mar-09 09:45 UTC
[Xapian-discuss] Building 0.9.10 with MSVC++ 2005 Express Edition
Olly Betts wrote:> On Thu, Mar 08, 2007 at 04:28:08PM +0000, Michael Sanders wrote: >> import _xapian >> ImportError: No module named _xapian > > Python 2.5 on Windows will need the module to be called "_xapian.pyd" > instead of "_xapian.dll". I believe older Python versions accepted > ".dll" or ".pyd", so we should probably always call it ".pyd". > > But for now, just try renaming it.Thanks Olly. Renaming it did the trick. Michael
Charlie Hull
2007-Mar-09 11:04 UTC
[Xapian-discuss] Building 0.9.10 with MSVC++ 2005 Express Edition
Olly Betts wrote:> On Thu, Mar 08, 2007 at 04:31:29PM +0000, Olly Betts wrote: >> Python 2.5 on Windows will need the module to be called "_xapian.pyd" >> instead of "_xapian.dll". I believe older Python versions accepted >> ".dll" or ".pyd", so we should probably always call it ".pyd". > > I found references to ".pyd" for Python modules from 1999, which is > before Python 2.0. Currently we support Python 2.2 and up, so I suggest > we should always use ".pyd" on Windows. > > Cheers, > Olly >Fixed and tested for Python 2.5 and new build files uploaded. Charlie