Re: [htdig] problems compiling hdig on solaris


Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Fri, 19 Mar 1999 15:58:44 -0600 (CST)


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.



This archive was generated by hypermail 2.0b3 on Fri Mar 19 1999 - 17:32:55 PST