issues compiling omega
Olly Betts
olly at survex.com
Thu Sep 22 23:25:42 BST 2016
On Thu, Sep 22, 2016 at 05:10:32PM -0400, John Bankert wrote:
> That was exactly the issue. libmagic.dll.a was in /lib under cygwin. Adding
> a -L/lib took care of this.
The "share" vs "lib" distinction is that "share" is for files which are
architecture independent. So executable machine code will (well,
should) never be there, only data files, scripts, byte-code, etc, and
only when the format and contents don't depend on word-size, endianness
or other aspects of the machine's architecture.
> datevalue.o: In function `DateRangeLimit::operator-(int)':
> /home/John/xapian-omega-1.4.0/datevalue.cc:87: undefined reference to
> `timegm(tm *)'
OK, this is a bug in the build system.
> If I'm understanding the undefined reference error correctly, I think
> what make is telling me is that it can't find timegm.o, which I
> believe handles the definitions as specified in timegm.h.
Almost - it's not that timegm.o isn't found, but that it's not included
in the list of source files for omega. It should have been added when
omega started to use timegm() in the 1.3.x series:
commit 8482749f9c45de3b0d1b827fde7f807ac83b2e8c
Author: Olly Betts <olly at survex.com>
Date: Fri Nov 27 10:36:45 2015 +1300
Use value ranges for date range filtering by value
Should be more efficient than a MatchDecider, and will automatically
take advantage of any future value range optimisations in xapian-core.
Many platforms (including at least Linux, BSD platforms, and OS X)
provide timegm(), in which case our definition of timegm() in timegm.cc
is suppressed, and timegm.o doesn't actually supply any symbols to the
link, which is how this has gone unnoticed for so long.
Thanks for spotting this - I'll commit a fix. A simple workaround is
probably just to append the contents of timegm.cc to omega.cc (just do
this once):
cat timegm.cc >> omega.cc
Cheers,
Olly
More information about the Xapian-discuss
mailing list