xapian-core-1.2.21 ported to Interix / 'gmake check' compile error

Eric Lindblad geirfuglaps at yahoo.com
Mon Sep 14 01:20:01 BST 2015


Report by Eric Lindblad 13-09-2015
http://www.ericlindblad.blogspot.com

cf: http://comments.gmane.org/gmane.comp.search.xapian.general/9862

I ported xapian-core-1.2.21 to Interix today having disabled the
default chert and development brass backends, using flint, which
was the 1.0.x series' default, which ships with the 1.2.x series;
the disabling do to an unresolved 'ambiguous overload' error
encountered when compiling those backends.
 
Running 'gmake check' however I right away encountered an error:
../../tests/api_backend.cc: In function `bool test_phrasebug1()':
../../tests/api_backend.cc:951: error: `q' undeclared (first use this function)
../../tests/api_backend.cc:951: error: (Each undeclared identifier is reported
only once for each function it appears in.) 

'htons' needed to be defined, which on Interix is in /usr/include/arpa/inet.h
and /net/tcpclient.cc was modified as adding #include <arpa/inet.h>

#include <cmath>
#include <cstring>
#ifndef __WIN32__
# include "safenetdb.h"
# include <netinet/in.h>
# include <netinet/tcp.h>
# include <arpa/inet.h>
# include <sys/socket.h>
#else
# include "safewinsock2.h"
#endif

perhaps there is a better location to add '#include <arpa/inet.h>'
as in an #ifdef __INTERIX located in tcpclient.h or in safenetdb.h

#ifdef __INTERIX
#include <arpa/inet.h>
#endif

note safenetdb.h is found
in both /net/tcpclient.cc
and /net/tcpserver.cc

curious but tcpserver.cc
has the line
#include <arpa/inet.h>

or, perhaps xapian support for minority platforms should not be incorporated.

cf: http://bugs.python.org/issue11937
comment by M. v. Löwis 




More information about the Xapian-discuss mailing list