Hi All I've just changed over to the static library for Xapian 1.0.6 and get this compile error from one of my files - the others all compile fine. /lib/libxapian.a(flint_table.o): In function `FlintTable::read_tag(Cursor_*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool) const': backends/flint/flint_table.cc:1287: undefined reference to `inflateInit2_' backends/flint/flint_table.cc:1305: undefined reference to `inflate' backends/flint/flint_table.cc:1312: undefined reference to `inflate' backends/flint/flint_table.cc:1339: undefined reference to `inflateEnd' ./lib/libxapian.a(flint_table.o): In function `FlintTable::add(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)': backends/flint/flint_table.cc:1059: undefined reference to `deflateInit2_' backends/flint/flint_table.cc:1081: undefined reference to `deflate' backends/flint/flint_table.cc:1099: undefined reference to `deflateEnd' backends/flint/flint_table.cc:1087: undefined reference to `deflateEnd' collect2: ld returned 1 exit status make: *** [Community] Error 1 Any ideas?
On Thu, Apr 10, 2008 at 04:21:19PM +0100, Colin Bell wrote:> I've just changed over to the static library for Xapian 1.0.6 and get > this compile error from one of my files - the others all compile fine.OS? Packaging? (It's probably mentioned in a previous message from you on another thread, but that doesn't help me :-) It's a link error by the looks of things, and suggests that your static link flags are lacking, umm, -lz I think. I'd have thought they *should* be done in the static library creation, and it may be nothing of the sort, but that's my best guess so far. J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james at tartarus.org uncertaintydivision.org
On Thu, Apr 10, 2008 at 04:21:19PM +0100, Colin Bell wrote:> I've just changed over to the static library for Xapian 1.0.6 and get > this compile error from one of my files - the others all compile fine.In general, static linking is a bad idea. Why do you want to?> /lib/libxapian.a(flint_table.o): In function > `FlintTable::read_tag(Cursor_*, std::basic_string<char, > std::char_traits<char>, std::allocator<char> >*, bool) const': > backends/flint/flint_table.cc:1287: undefined reference to > `inflateInit2_' > backends/flint/flint_table.cc:1305: undefined reference to `inflate' > backends/flint/flint_table.cc:1312: undefined reference to `inflate' > backends/flint/flint_table.cc:1339: undefined reference to `inflateEnd'Odd, this was supposed to be fixed in 1.0.3. What does this report: xapian-config --libs (Assuming you're not linking using libtool, since this should just work then...) Cheers, Olly