[Xapian-discuss] Trouble installing xapian on windows

john.alveris at Safe-mail.net john.alveris at Safe-mail.net
Sat Jul 4 14:12:30 BST 2015


Hello, i am trying to install xapian on windows. As the xapian download page says, there are two options here:
1) mingw 
2) a separate set of makefiles for MSVC.

If i understand correctly, MSVC is supported only by xapian 1.2.8 and older, so i decided to try mingw. The configure script worked perfectly, but "make" finished with a error (see the output below). So far i have two questions:

1) Why mingw is not working for me? Is it bug or i am doing something wrong?
2)Even if i would be able to compile xapian with mingw, could i use it in my project (c++) that is supposed to be compiled by MSVC?


[HERE IS  OUTPUT OF THE MAKE COMMAND]

make[1]: Entering directory `/c/temp/xapian/xapian-core-1.2.21'
Making all in .
make[2]: Entering directory `/c/temp/xapian/xapian-core-1.2.21'
depbase=`echo api/compactor.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.  -
I./common -I./include   -fshow-column -Wall -W -Wredundant-decls -Wpointer-arith
 -Wcast-qual -Wcast-align -Wno-long-long -Wformat-security -fno-gnu-keywords -Wu
ndef -Woverloaded-virtual -Wstrict-null-sentinel -Wshadow -Wstrict-overflow=1 -W
logical-op -Wmissing-declarations -Wdouble-promotion -Winit-self -fvisibility=hi
dden -mfpmath=sse -msse2 -mtune=generic -g -O2 -MT api/compactor.lo -MD -MP -MF
$depbase.Tpo -c -o api/compactor.lo api/compactor.cc &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./common -I./include -fshow-column
-Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-lo
ng -Wformat-security -fno-gnu-keywords -Wundef -Woverloaded-virtual -Wstrict-nul
l-sentinel -Wshadow -Wstrict-overflow=1 -Wlogical-op -Wmissing-declarations -Wdo
uble-promotion -Winit-self -fvisibility=hidden -mfpmath=sse -msse2 -mtune=generi
c -g -O2 -MT api/compactor.lo -MD -MP -MF api/.deps/compactor.Tpo -c api/compact
or.cc  -DDLL_EXPORT -DPIC -o api/.libs/compactor.o
In file included from api/compactor.cc:39:0:
./common/safeunistd.h: In function 'unsigned int sleep(unsigned int)':
./common/safeunistd.h:56:1: error: redefinition of 'unsigned int sleep(unsigned
int)'
 sleep(unsigned int seconds)
 ^
In file included from ./common/safeunistd.h:25:0,
                 from api/compactor.cc:39:
c:\mingw\include\unistd.h:142:10: error: 'unsigned int sleep(unsigned int)' prev
iously defined here
 unsigned sleep( unsigned period ){ return __mingw_sleep( period, 0 ); }
          ^
make[2]: *** [api/compactor.lo] Error 1
make[2]: Leaving directory `/c/temp/xapian/xapian-core-1.2.21'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/temp/xapian/xapian-core-1.2.21'
make: *** [all] Error 2



More information about the Xapian-discuss mailing list