[Xapian-devel] xapian 1.2.21 / MSYS-1.0.11.exe

Olly Betts olly at survex.com
Tue Aug 11 10:13:41 BST 2015


On Fri, Aug 07, 2015 at 05:47:43AM -0700, Eric Lindblad wrote:
> [I initially thought to install xapian on SFU (Interix 3.5) on MS XP
> but could not compile libuuid] [getopt.h, inttypes.h, and stdint.h
> taken from SUA (for Vista) and installed in SFU (Interix 3.5)]

Why did you decide to use interix?  My understanding was that it was
rather neglected, both by MS and everyone else.

If you're building with GCC (as you seem to be below), that should
just work (with either mingw or cygwin).

If you're wanting to build with MSVC, that worked fairly recently,
albeit with a different build system, but a change of build system
shouldn't require a POSIX emulation layer to be added into the mix.

> If someone is inclined to write a modified libuuid and label it for
> use with Interix <version(s)> to satisfy the dependency for an xapian
> <version(s)> install on Interix <version(s)>, it might be of interest,
> though since Windows 8.1 MS has discontinued enabling for SUA
> (Interix).

Can you not just use the existing UUID code which makes use of the win32
UUID API?  See common/win32_uuid.{cc,h} for that.

> The argument --cxxflags returning empty when xapian was installed as
> [MSYS-1.0.11.exe] /usr, from g++ `xapian-config --cxxflags`
> quickstartindex.cc `xapian-config --libs` -o quickstartindex, caused
> me to rethink the install prefix, so I uninstalled it and reinstalled
> as --prefix=/c/xapian.

There's an assumption that /usr/include is on the default compiler
header search path.  Explicitly specifying -I/usr/include breaks
"fixinclude" headers with some GCC versions - early 3.x IIRC, so
probably not a problem in practice these days, but perhaps it's
better to skip that test based on a platform check (under interix
in particular).

> $ g++ `xapian-config --cxxflags` quickstartindex.cc `xapian-config --libs` -o quickstartindex
> quickstartindex.cc: In function 'int main(int, char**)':
> quickstartindex.cc:34:15: error: 'exit' was not declared in this scope

That's a generic C++ issue - quickstartindex.cc is missing a header:

#include <cstdlib>

We ought to just kill the quickstart examples though -
examples/simple*.cc are better minimal examples.

> I am surprised that -lxapian-core is listed in
> /c/xapian/lib/pkgconfig/xapian-core.pc

Me too - that was a contributed file, and AFAICS it can never have
actually worked correctly, so presumably the contributor failed to
even check it worked before sending in a patch.  Thanks for noticing
- fixing it git master, and I'll backport.

Cheers,
    Olly



More information about the Xapian-devel mailing list