issues compiling omega

John Bankert jbankert at gmail.com
Thu Sep 22 18:35:19 BST 2016


All,

I'm having some issues compiling omega. Here are the particulars

I'm on win7, using cygwin 4.9.2 64 bit. Here's the relevant output from
make:

libtool: link: g++ -fshow-column -Wall -W -Wredundant-decls -Wpointer-arith
-Wca
st-qual -Wcast-align -Wno-long-long -Wformat-security -fno-gnu-keywords
-Wundef
-Woverloaded-virtual -Wstrict-null-sentinel -Wshadow -Wstrict-overflow=1
-Wlogic
al-op -Wmissing-declarations -Wdouble-promotion -Winit-self
-fvisibility=hidden
-I/home/John/xapian-core-1.4.0/include -g -O2 -std=gnu++11 -o
.libs/omindex.exe
omindex.o myhtmlparse.o htmlparse.o index_file.o mime.o common/getopt.o
commonhe
lp.o utils.o hashterm.o loadfile.o md5.o md5wrap.o xmlparse.o
metaxmlparse.o utf
8convert.o sample.o diritor.o runfilter.o freemem.o common/msvc_dirent.o
xpsxmlp
arse.o common/str.o pkglibbindir.o svgparse.o tmpdir.o urlencode.o
atomparse.o x
lsxparse.o opendocparse.o common/keyword.o msxmlparse.o common/safe.o
timegm.o d
atetime.o portability/mkdtemp.o -Wl,--enable-runtime-pseudo-reloc  -lmagic
/home
/John/xapian-omega-1.4.0/../xapian-core-1.4.0/.libs/libxapian.dll.a
-lrpcrt4 -lw
s2_32 -lz -L/usr/local/lib
/usr/bin/x86_64-w64-mingw32-ld: cannot find -lmagic
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1102: omindex.exe] Error 1
make[2]: Leaving directory '/home/John/xapian-omega-1.4.0'
make[1]: *** [Makefile:1391: all-recursive] Error 1
make[1]: Leaving directory '/home/John/xapian-omega-1.4.0'
make: *** [Makefile:868: all] Error 2

I used the cygwin packages utility to install file 5.25, which is the
package for libmagic. I have verified the presence of the file "magic" - in
cygwin, it exists as /usr/share/magic (a link to /usr/share/misc/magic) and
/usr/share/file/magic (a link to /usr/share/magic) and /usr/misc/magic,
which is the file itself

I have tried various permutations with the -l and -L switches (e.g. -L
/usr/share -lmagic) to no avail. I'm not a C/C++ expert, but as far as I
can tell the linker should be able to find the file. It's possible there's
some subtle thing at work that I've missed in terms of getting the right
flag values to the linker.

The other thought is that the magic file supplied by the cygwin package is
corrupt. I tried compiling the magic package from source, but was running
into other issues with getting the right libraries in place to compile
libmagic, which is why I opted to install the pre-compiled cygwin package.

Anyone have any bright ideas? Thanks!

John


More information about the Xapian-discuss mailing list