issues compiling omega

John Bankert jbankert at gmail.com
Thu Sep 22 22:10:32 BST 2016


James,

That was exactly the issue. libmagic.dll.a was in /lib under cygwin. Adding
a -L/lib took care of this. This was also an issue with -lpcre, which
adding -L/lib fixed as well. Of course, I'm now running up against
something else. 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/omega.exe om
ega.o query.o cgiparam.o utils.o configfile.o date.o cdb_init.o cdb_find.o
cdb_h
ash.o cdb_unpack.o jsonescape.o loadfile.o datevalue.o common/str.o
sample.o url
encode.o weight.o expand.o csvescape.o -Wl,--enable-runtime-pseudo-reloc
 /home/
John/xapian-omega-1.4.0/../xapian-core-1.4.0/.libs/libxapian.dll.a -lrpcrt4
-lz
-lws2_32 ./.libs/libtransform.a -L/lib -lpcre -L/usr/local/lib
datevalue.o: In function `DateRangeLimit::operator-(int)':
/home/John/xapian-omega-1.4.0/datevalue.cc:87: undefined reference to
`timegm(tm
*)'
datevalue.o: In function `DateRangeLimit::operator+(int)':
/home/John/xapian-omega-1.4.0/datevalue.cc:92: undefined reference to
`timegm(tm
*)'

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. The libtool: link command is
being generated by some variables in the Makefile. As best as I can tell,
the list of .o files comes from libtransform_la_OBJECTS, which comes from
am_libtransform_la_OBJECTS, which comes from libtransform_la-transform.lo,
which does some make stuff that I can't follow that seems to be centered
around transform.cc

I'm guessing that if I could somehow get timegm.o added to that list that
the undefined reference would go bye-bye, but as I freely admit I'm out of
my depth here as relates to C/C++ I won't swear to it. Again, any useful
information very much appreciated. Thanks!

John

On Thu, Sep 22, 2016 at 2:34 PM, James Aylett <james-xapian at tartarus.org>
wrote:

> On 22 Sep 2016, at 18:35, John Bankert <jbankert at gmail.com> wrote:
>
> > /usr/bin/x86_64-w64-mingw32-ld: cannot find -lmagic
>
> It's slightly confusing, but this error means it's failing to find a
> _library_ called magic, which won't be in a file just called "magic". I
> don't know where libraries live under cygwin, or what they're called, but
> it'll probably start "libmagic". It might end ".dll".
>
> J
>
> --
>  James Aylett
>  devfort.com — spacelog.org — tartarus.org/james/
>
>


More information about the Xapian-discuss mailing list