Skip to main content.
home | support | download

Back to List Archive

Re: Compiling on W2K - Mingw

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Wed Apr 16 2003 - 15:37:52 GMT
On Wed, 16 Apr 2003, Dhruva Krishnamurthy wrote:

> I was able to port SWISH-E (daily snapshot swish-e-2.3.5-2003-04-16) 
> on W2K using MinGW32 environment (using GCC 3.2). I got a working
> executable and an archive file (library). If this is not NEW or if
> someone else has  already reported success, kindly ignore this email.

I can't comment on Window builds.  Dave?

> Is there plans of supporting complete regex in query or is it already
> supported? I would like to work on this. I am quite good at REGEX (due
> to extensive usage of FLex and Bison).

That's egrep ;)

swish has two word indexes.  For normal word searches a hash value is
looked up for the word.  That's an index into a linked list of words with
the same hash value.  No way to pattern match there because you need the
hash value.

The other index is the wildcard index which is simply indexed by the (hope
I'm getting this right) the first letter(s?) of the word.  That's why you
can run swish-e -k <letter> and show all words that start with the given
letter.  You could to a regexp match there, but you would need to always
start your pattern with a character.  (notice this is one reason swish-e
is eight-bit char only).

To do full regex matching you could go through all the words, but at that
point I think egrep would be faster.

There's a search engine used at http://search.cpan.org that (from a
conversation I had with Graham) simply makes a long string of all the
words and then you can regexp match on that, and from where you match
relate that to a record.  I don't really that search as it finds too many
things I don't want (such as substrings).

> 2. ./configure i386-pc-mingw32 --prefix=D:/Applications/SWISH-E
>     --with-pcre=${MINGW32} --with-zlib=${MINGW32}
>     --with-libxml2=${MINGW32}
> 3. Edit the ./libtool as follows:
>       Search for "-L\*". In the "case $dir", add "-l*) ;;"

So is that a problem with libtool or our configuration?  Might want to
bring that up on the libtool list.

> 4. Edit src/Makefile as following:
>        Search for swish_e_LDADD, append the following:
>        "replace/libreplace.la ${MINGW32}/lib/libregex.a
>        ${MINGW32}/lib/libz.a
>         ${MINGW32}/lib/libxml2.dll ${MINGW32}/lib/libexpat.a"

All that should be handled by automake, I'd think.  Swish-e also has it's
own code for expat -- so you should not need libexpat.a.

I'm also not clear why the libraries need to be listed there -- they are
specified when creating the libswish-e and libswishindex libraries.  This
has been someting we have been discussing for the last week.

The point of using automake and libtool are so you don't need to
make those per-platform changes.  Should be able to just ./configure &&
make.


-- 
Bill Moseley moseley@hank.org
Received on Wed Apr 16 15:37:53 2003