Re: [htdig] htDig install error


Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Mon, 29 Mar 1999 14:40:40 -0600 (CST)


According to Andreas Wombacher:
> I have got a problem installing htdig 3.1.1: I have no idea, how to fix
> this problem. I tried to install the htdig on a solaris system. But this
> seems to be a general problem.
>
> Sorry, if this topic has been discueed several times, but I am new on
> this list.
>
> Thanks for any comments
> Andreas.
>
>
> make[1]: Leaving directory `/var/tmp/demo/htdig-3.1.1/htfuzzy'
> make[1]: Entering directory `/var/tmp/demo/htdig-3.1.1/htdig'
> c++ -o htdig -L../htlib -L../htcommon -L../db/dist -L../rx/rx -L/usr/lib
> Document.o HTML.o Images.o Parsable.o Plaintext.o Postscript.o
> Retriever.o SGMLEntities.o Server.o URLRef.o main.o ExternalParser.o
> PDF.o ../htcommon/libcommon.a ../htlib/libht.a ../db/dist/libdb.a
> ./rx/rx/librx.a -lz -lnsl -lsocket
> Undefined first referenced
> symbol in file
> DocHead__11DocumentRefPc Retriever.o
> DocHead__11DocumentRef
> ./htcommon/libcommon.a(DocumentDB.o)
> ld: fatal: Symbol referencing errors. No output written to htdig
> make[1]: *** [htdig] Error 1
> make[1]: Leaving directory `/var/tmp/demo/htdig-3.1.1/htdig'
> make: *** [all] Error 1

It has been discussed here before, but no one ever posted the fix in the
form of a patch. The problem occurs on systems that have the libz library,
but not the zlib.h header file. Some poorly formed #ifdef's caused the
DocHead methods not to be defined in this case. This is fixed in the
recent development snapshots, but for 3.1.1 users, here is the patch:

--- htcommon/DocumentRef.cc.zlibbug Tue Feb 16 23:03:52 1999
+++ htcommon/DocumentRef.cc Tue Mar 23 16:51:46 1999
@@ -15,17 +15,14 @@
 #include "WordList.h"
 #include "Configuration.h"
 #include "HtURLCodec.h"
 
-#ifdef HAVE_LIBZ
-#ifdef HAVE_ZLIB_H
+#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
 #include <zlib.h>
 #endif
-#endif
 
 extern Configuration config;
 
-#ifdef HAVE_LIBZ
-#ifdef HAVE_ZLIB_H
+#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
 //unsigned char DocumentRef::c_buffer[32000];
 //
 // Compress Function
@@ -117,7 +114,6 @@
   docHead=h;
   docHeadState=docHead.length()==0?Empty:Uncompressed;
 }
-#endif
 #else
  
 char *DocumentRef::DocHead() {
@@ -166,11 +162,9 @@
     docAnchors.Destroy();
     docHopCount = -1;
     docBackLinks = 0;
-#ifdef HAVE_LIBZ
-#ifdef HAVE_ZLIB_H
+#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
     docHeadState=Empty;
 #endif
-#endif
 }
 
 
@@ -212,14 +206,12 @@
     int length;
     String *str;
 
-#ifdef HAVE_LIBZ
-#ifdef HAVE_ZLIB_H
+#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
     if (docHeadState==Uncompressed) {
       Compress(docHead);
       docHeadState=Compressed;
     }
 #endif
-#endif
 //
 // The following macros make the serialization process a little easier
 // to follow. Note that if an object to be serialized has the default
@@ -503,11 +495,9 @@
             break;
         case DOC_HEAD:
             getstring(x, s, docHead);
-#ifdef HAVE_LIBZ
-#ifdef HAVE_ZLIB_H
+#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
             docHeadState=docHead.length()==0?Empty:Compressed;
 #endif
-#endif
             break;
         case DOC_METADSC:
             getstring(x, s, docMetaDsc);
--- htcommon/DocumentRef.h.zlibbug Tue Feb 16 23:03:52 1999
+++ htcommon/DocumentRef.h Mon Mar 22 19:22:09 1999
@@ -18,8 +18,7 @@
     Reference_noindex
 };
 
-#ifdef HAVE_LIBZ
-#ifdef HAVE_ZLIB_H
+#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
 enum HeadState
 {
     Empty,
@@ -27,7 +26,6 @@
     Uncompressed
 };
 #endif
-#endif
 
 class DocumentRef : public Object
 {
@@ -157,8 +155,7 @@
     int docScore;
     // This is the nearest anchor for the search word.
     int docAnchor;
-#ifdef HAVE_LIBZ
-#ifdef HAVE_ZLIB_H
+#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
     //
     // Compression functions
     //
@@ -166,7 +163,6 @@
     int Compress(String& s);
     int Decompress(String &s);
     HeadState docHeadState;
-#endif
 #endif
 };
 

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Mon Mar 29 1999 - 14:32:16 PST