This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: htdig no longer compiles correctly on cygwin


GregHolmes@aol.com schrieb am 2001-07-30, 12:42:

Hi Greg,

:The stable version of htdig, 3.1.5, used to compile and run flawlessly
: under Cygwin.

Yep, nearly.
 
: Now it will compile, but running it generates a corrupt database.

I'm running htdig-3.2.0b3.
I read your thread at the htdig list now. I had the same problems as you 
reported, need to #include <getopt.h> somewhere, some fiddle with regex.h,
have you linked against libregex? In cygwin you need to link against 
libregex if you want to use extended regexes, and you need to include 
regex.h which comes with cygwin's regex package.  But below, there is
a suggestion of me how to use the included Regex.

: htmerge gives this:
: 
: DB2 problem...: //c/opt/www/htdig/db/db.docdb: page 3840 doesn't exist

I don't remember if i had used htmerge, how to test it?

: then htsearch:
: 
: [Mon Jul 30 11:14:01 2001] [error] [client 10.1.21.71] DB2 problem...:
: //c/opt/w ww/htdig/db/db.words.db: file size not a multiple of the : 
pagesize

Just five minutes ago, i tested htsearch again, for me it works.

: [Mon Jul 30 11:14:01 2001] [error] [client 10.1.21.71]       0 [main]
: htsearch 4 14 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION

Never saw this.
 
: This has come up on the htdig lists more and more lately, and the 
: developers there (reasonably?) point out that htdig worked under earlier
: versions of cygwin, so something strange has changed.  Does anyone have
: any ideas?

I couldn't say. I built htdig-3.2... at 01-05-12 two months ago and i don't
remember that there were big changes in cygwin. End of May there was a new 
release of cygwin1.dll, so i built with 1.3.1

After my successful build i was not able to create a patch to rebuild htdig.
But one important thing has changed which should make it easier:

CYGWIN=$'binmode tty ntsec case_check:strict nowinsymlinks notitle'

We have the option now to use Cygwin case-sensitive!
That should make the regex <-> Regex thingy much less problematic!

Some of the changes (you have probably the same ones), but i read in 
the htdiglist thread, that you included float.h at another point.
Note the first change according to the regexes. I didn't understand it
complete that was also the reason, why i was not able to build htdig a 
second time. How do yopu get around the thing with regex? Renamed a file?

Note also my buildscript at the end, i built WITH libcygipc and libregex 
which comes with cygwin netrelease!

And also note a second time, that i was not able to rebuilt htdig with this 
script and this patch. Maybe you have more luck or a better solution, 
because it failed mainly because of the regex-stuff.
I hope it will work if you add case_check:strict to your CYGWIN settings.

Patch:
======
diff -ur htdig-3.2.0b3/acconfig.h htdig-3.2.0b3-cygwin/acconfig.h
--- htdig-3.2.0b3/acconfig.h	Fri Feb 23 01:31:25 2001
+++ htdig-3.2.0b3-cygwin/acconfig.h	Sat May 12 11:27:26 2001
@@ -62,7 +62,7 @@
 #undef HAVE_STRPTIME_DECL
 
 /* Define if the included regex doesn't work */
-#undef HAVE_BROKEN_REGEX
+#define HAVE_BROKEN_REGEX
 
 /*
  * Don't step on the namespace.  Other libraries may have their own
diff -ur htdig-3.2.0b3/htdb/htdb_dump.cc htdig-3.2.0b3-
cygwin/htdb/htdb_dump.cc
--- htdig-3.2.0b3/htdb/htdb_dump.cc	Fri Feb 23 01:31:30 2001
+++ htdig-3.2.0b3-cygwin/htdb/htdb_dump.cc	Fri May 11 01:22:44 2001
@@ -7,6 +7,7 @@
 
 #include "db_config.h"
 #include "htconfig.h"
+#include <getopt.h>
 
 #ifndef lint
 static const char copyright[] =
diff -ur htdig-3.2.0b3/htdb/htdb_load.cc htdig-3.2.0b3-
cygwin/htdb/htdb_load.cc
--- htdig-3.2.0b3/htdb/htdb_load.cc	Fri Feb 23 01:31:30 2001
+++ htdig-3.2.0b3-cygwin/htdb/htdb_load.cc	Fri May 11 01:00:31 2001
@@ -7,6 +7,7 @@
 
 #include "db_config.h"
 #include "htconfig.h"
+#include <getopt.h>
 
 #ifndef lint
 static const char copyright[] =
diff -ur htdig-3.2.0b3/htdb/htdb_stat.cc htdig-3.2.0b3-
cygwin/htdb/htdb_stat.cc
--- htdig-3.2.0b3/htdb/htdb_stat.cc	Fri Feb 23 01:31:30 2001
+++ htdig-3.2.0b3-cygwin/htdb/htdb_stat.cc	Fri May 11 01:30:53 2001
@@ -7,6 +7,7 @@
 
 #include "db_config.h"
 #include "htconfig.h"
+#include <getopt.h>
 
 #ifndef lint
 static const char copyright[] =
diff -ur htdig-3.2.0b3/htsearch/Display.cc htdig-3.2.0b3-
cygwin/htsearch/Display.cc
--- htdig-3.2.0b3/htsearch/Display.cc	Fri Feb 23 01:31:34 2001
+++ htdig-3.2.0b3-cygwin/htsearch/Display.cc	Sat May 12 00:23:37 2001
@@ -30,6 +30,7 @@
 #include "HtURLSeedScore.h"
 #include "SplitMatches.h"
 
+#include <mingw/float.h>
 #include <fstream.h>
 #include <stdio.h>
 #include <ctype.h>

========END OF PATCH=============

I configured with Slackware Apache layout, so you will have to fiddle
a little to fit your installation.

Buildscript:
============
#!/usr/bin/sh
set -e
CFLAGS=-I/usr/local/include LIBS='-lcygipc -lregex' \
LDFLAGS=-L/usr/local/lib SENDMAIL=/usr/sbin/sendmail \
 ./configure --prefix=/usr --disable-tests \
 --with-cgi-bin-dir=/var/www/cgi-bin \
 --with-image-dir=/var/www/htdocs/htdig \
 --with-search-dir=/var/www/htdocs/htdig \
 --with-database-dir=/var/htdig/db \
 --with-common-dir=/var/htdig/common \
 --with-config-dir=/etc/htdig --with-gnu-ld \
 --with-default-config-file=/etc/htdig/htdig.conf \
 2>&1 | tee log.configure

make all 2>&1 | tee log.make

========END===============

Ciao,

gph


-- 
=^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]