Re: [htdig] problems compiling hdig on solaris


Carlos Mejia (Carlos.Mejia@lodyc.jussieu.fr)
Fri, 2 Apr 1999 12:24:22 +0200


The problem was partially solved now.

I had simultaneously the old libg++ and the new libstdc++. I erase the the
old one, recompile and almost all is ok. I have a new compiler error that I
solve by comming back in the Display.cc.0 patch. Yes, this problem was
introduced by this patch. Here is the new error message :

============================== CC ERROR ==============================
c++ -c -DCONFIG_DIR=\"/usr/local/apache/conf\"
-DDEFAULT_CONFIG_FILE=\"/usr/local/apache/conf/htdig.conf\" -I../htlib
-I../htcommon -I../db/dist -I../rx/rx -I../include -g -O2 Display.cc
Display.cc: In method `void Display::displayMatch(class ResultMatch *, int)':
Display.cc:343: no match for `String & = String *'
./htlib/htString.h:55: candidates are: String::operator =(char *)
./htlib/htString.h:54: String::operator =(const String &)
*** Error code 1
make: Fatal error: Command failed for target `Display.o'
Current working directory /usr/local/apache/utils/htdig-3.1.1/htsearch
*** Error code 1
make: Fatal error: Command failed for target `all'
=======================================================================

 I think the solution should not be difficult but I dont know c++. For this
reason I backtrak the patch. After that, compilation and installation runs
smoth. Here is part of the Display.cc.0 patch:

============================== PATCH DISPLAY.CC.0
==============================
*************** Display::displayMatch(ResultMatch *match
*** 337,343 ****
              *str << ((String*) (*list)[i])->get() << "<br>\n";
          }
          vars.Add("DESCRIPTIONS", str);
! vars.Add("DESCRIPTION", ((String*) (*list)[1]));
      }

      expandVariables(currentTemplate->getMatchTemplate());
--- 342,350 ----
              *str << ((String*) (*list)[i])->get() << "<br>\n";
          }
          vars.Add("DESCRIPTIONS", str);
! String *description = new String();
! *description = ((String*) (*list)[0]);
! vars.Add("DESCRIPTION", description);
      }

      expandVariables(currentTemplate->getMatchTemplate());
================================================================================
=

But search doesnt work (with Netscape 4.07 ). Here is the message:

============================== WEB ERROR ==============================
    Internal Server Error

    The server encountered an internal error or misconfiguration and was
    unable to complete your request.

    Please contact the server administrator, webmaster@lodyc.jussieu.fr
    and inform them of the time the error occurred, and anything you
    might have done that may have caused the error.
=======================================================================

Running htsearch manually I have a core dump. Here are last lines from
command 'truss htsearch' :

============================== TRUSS HTSEARCH ==============================
write(1, " < i > < a h r e f = "".., 183) = 183
 <font size=-1>02/15/99, 4247 bytes</font>
write(1, " < f o n t s i z e =".., 43) = 43
</dd></dl>
write(1, " < / d d > < / d l >\n", 11) = 11
    Incurred fault #6, FLTBOUNDS %pc = 0x00000008
      siginfo: SIGSEGV SEGV_MAPERR addr=0x00000008
    Received signal #11, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0x00000008
        *** process killed ***
============================================================================

>Strange. The string functions are usually declared in stdlib.h
>or string.h (either directly or indirectly in files they include)
>on most systems, so I haven't heard of this problem arising before.
>Which include file on your system declares strstr, strchr, strrchr,
>strncmp, and strtok? Does any other header file include this file?
>If you find a different file that declares these functions, you may
>want to include in in htlib/lib.h, which should be included indirectly
>by every htdig source file. Also let us know your findings on this
>mailing list, so someone can add a test for it.
>
>According to Carlos Mejia:
>> I am a new participant to this list and I need some help. I am trying to
>> compile 'htdig-3.1.1' in a Sun Ultra2 under Solaris 2.5.1, I use
>>
>> gnu make,
>> gcc2.8.1 and
>> libstdc++ 2.8.1.1
>>
>> I have compiler errors when compiling files:
>>
>> htdig/Document.cc
>> htdig/Server.cc
>> htmerge/words.cc
>>
>> maybe is there a known problem and someone can help me.
>>
>> Thanks for all,
>>
>> Carlos
>>
>> P.S here is the compiler repport after a 'make -k' command
>> ...
>>
>> make_gnu1: Entering directory `/usr/local/apache/utils/htdig-3.1.1/htdig'
>> c++ -c -DDEFAULT_CONFIG_FILE=\"/usr/local/apache/conf/htdig.conf\"
>>-I../htlib -I../htcommon -I../db/dist -I../rx/rx -I../include -g -O2
>>Document.cc
>> Document.cc: In method `long int Document::getdate(char *)':
>> Document.cc:208: warning: implicit declaration of function `int strchr(...)'
>> Document.cc:208: warning: assignment to `char *' from `int' lacks a cast
>> Document.cc: In method `int Document::readHeader(class Connection &)':
>> Document.cc:481: warning: implicit declaration of function `int
>>strncmp(...)'
>> Document.cc:481: warning: cannot pass objects of type `String' through `...'
>> Document.cc:487: warning: implicit declaration of function `int strtok(...)'
>> Document.cc:487: warning: cannot pass objects of type `String' through `...'
>> Document.cc:488: warning: initialization to `char *' from `int' lacks a cast
>> Document.cc:514: warning: cannot pass objects of type `String' through `...'
>> Document.cc:515: no matching function for call to `Document::getdate (int)'
>> Document.cc:193: candidates are: Document::getdate(char *)
>> Document.cc:520: warning: cannot pass objects of type `String' through `...'
>> Document.cc:521: warning: passing `int' to argument 1 of `atoi(const
>>char *)' lacks a cast
>> Document.cc:525: warning: cannot pass objects of type `String' through `...'
>> Document.cc:526: warning: initialization to `char *' from `int' lacks a cast
>> Document.cc:538: warning: cannot pass objects of type `String' through `...'
>> Document.cc: In method `enum Document::DocStatus
>>Document::RetrieveLocal(long int, char *)':
>> Document.cc:570: warning: implicit declaration of function `int
>>strrchr(...)'
>> Document.cc:570: warning: initialization to `char *' from `int' lacks a cast
>> make_gnu[1]: *** [Document.o] Error 1
>> make_gnu[1]: Leaving directory `/usr/local/apache/utils/htdig-3.1.1/htdig'
>> make_gnu: *** [all] Error 1
>>
>>
>> c++ -c -DDEFAULT_CONFIG_FILE=\"/usr/local/apache/conf/htdig.conf\"
>>-I../htlib -I../htcommon -I../db/dist -I../rx/rx -I../include -g -O2
>>Server.cc
>> Server.cc: In method `void Server::robotstxt(class Document &)':
>> Server.cc:138: warning: implicit declaration of function `int strtok(...)'
>> Server.cc:138: warning: cannot pass objects of type `String' through `...'
>> Server.cc:138: warning: initialization to `char *' from `int' lacks a cast
>> Server.cc:138: warning: assignment to `char *' from `int' lacks a cast
>> Server.cc:146: warning: implicit declaration of function `int strchr(...)'
>> Server.cc:148: invalid type argument of `unary *'
>> Server.cc: In method `void Server::push(char *, int, char *)':
>> Server.cc:243: warning: initialization to `char *' from `int' lacks a cast
>> make_gnu[1]: *** [Server.o] Error 1
>>
>> make_gnu[1]: Target `all' not remade because of errors.
>> make_gnu[1]: Leaving directory `/usr/local/apache/utils/htdig-3.1.1/htdig'
>> make_gnu[1]: Entering directory
>>`/usr/local/apache/utils/htdig-3.1.1/htsearch'
>> make_gnu[1]: Nothing to be done for `all'.
>> make_gnu[1]: Leaving directory
>>`/usr/local/apache/utils/htdig-3.1.1/htsearch'
>>
>>
>> make_gnu[1]: Entering directory
>>`/usr/local/apache/utils/htdig-3.1.1/htmerge'
>> c++ -c -DSORT_PROG=\"/usr/bin/sort\"
>>-DDEFAULT_CONFIG_FILE=\"/usr/local/apache/conf/htdig.conf\" -I../htlib
>>-I../htcommon -I../db/dist -I../rx/rx -I../include -g -O2 words.cc
>> words.cc: In function `void mergeWords(char *, char *)':
>> words.cc:122: warning: implicit declaration of function `int strtok(...)'
>> words.cc:122: no matching function for call to `Dictionary::Add (int, int)'
>> ./htlib/Dictionary.h:40: candidates are: Dictionary::Add(char *, Object *)
>> words.cc:129: no matching function for call to `Dictionary::Add (int, int)'
>> ./htlib/Dictionary.h:40: candidates are: Dictionary::Add(char *, Object *)
>> words.cc:146: warning: assignment to `char *' from `int' lacks a cast
>> words.cc:147: warning: assignment to `char *' from `int' lacks a cast
>> make_gnu[1]: *** [words.o] Error 1
>> make_gnu[1]: Target `all' not remade because of errors.
>> make_gnu[1]: Leaving directory `/usr/local/apache/utils/htdig-3.1.1/htmerge'
>> make_gnu[1]: Entering directory
>>`/usr/local/apache/utils/htdig-3.1.1/htnotify'
>> make_gnu[1]: Nothing to be done for `all'.
>> make_gnu[1]: Leaving directory
>>`/usr/local/apache/utils/htdig-3.1.1/htnotify'
>> make_gnu: *** [all] Error 1
>
>--
>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.

 ------------------------------------------------------------------------
|Carlos Mejia |e-mail: carlos@lodyc.jussieu.fr|
|LODYC Universite de Paris VI, T.26, 4eme| |
|4 place Jussieu |tel: (33 1) 44 27 27 09 |
|75005 PARIS |fax: (33 1) 44 27 71 59 |
 ------------------------------------------------------------------------

------------------------------------
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 Fri Apr 02 1999 - 04:08:56 PST