issues compiling omega

John Bankert jbankert at gmail.com
Fri Sep 23 15:09:21 BST 2016


Olly,

Thanks for the hint - by concatenating timegm.cc on to the end of omega.cc,
I was able to successfully build omega. Of course, now when I try to run
omindex, I get nothing. I've tried using various permutation of -h to see
if I could get help output to validate that the program is running. Have
also tried using the -p --db etc flags shown on the omega overview page to
see if I could get omindex to produce an error of some sort. echo $?
returns a 0, so I'm at a loss. Thanks again for all your help.

On Thu, Sep 22, 2016 at 6:25 PM, Olly Betts <olly at survex.com> wrote:

> 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