Re: htdig: compiling problem


Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Mon, 14 Dec 1998 15:38:29 -0600 (CST)


According to Jesús Arribi:
> I execute ./configure and everything is ok. I execute make and the
> compiling starts but I obtain this output:
>
> "Connection.cc", line 93: Error: Formal argument 3 of type int* in call
> to getpeername(int, sockaddr
> *, int*) is being passed unsigned*.
> "Connection.cc", line 317: Error: Formal argument 3 of type int* in call
> to getsockname(int, sockadd
> r*, int*) is being passed unsigned*.
> "Connection.cc", line 343: Error: Formal argument 3 of type int* in call
> to accept(int, sockaddr*, i
> nt*) is being passed unsigned*.
> "Connection.cc", line 355: Error: Formal argument 3 of type int* in call
> to getpeername(int, sockadd
> r*, int*) is being passed unsigned*.
> "Connection.cc", line 396: Warning: buffer hides io::buffer.
> "Connection.cc", line 434: Warning: buffer hides io::buffer.
> "Connection.cc", line 456: Warning: buffer hides io::buffer.
> "Connection.cc", line 476: Error: Formal argument 3 of type int* in call
> to getpeername(int, sockadd
> r*, int*) is being passed unsigned*.
> "Connection.cc", line 497: Warning: peer hides Connection::peer.
> "Connection.cc", line 500: Error: Formal argument 3 of type int* in call
> to getpeername(int, sockadd
> r*, int*) is being passed unsigned*.
> 6 Error(s) and 4 Warning(s) detected.
> *** Error code 6
> make: Fatal error: Command failed for target `Connection.o'
> Current working directory /servicios/agi/tmp/htdig-3.1.0b2/htlib
> *** Error code 1
> make: Fatal error: Command failed for target `all'
>
> My OS is SunOS 5.6. I am using the cc compiler in /opt/SUNWspro/bin.
>
> Does anybody know what is wrong?

This is a fairly common problem with compiling ht://Dig. The problem is
that different OSes have different expectations of the type used for the
length argument to getpeername, getsockname and accept. You have a few
options.

1) you can edit htlib/Connection.cc and look for all the lines where the
error occurs. For each of the six errors, see where the length variable
is declared, and change it from "unsigned int" to "int". For the call to
accept, it's a type cast right in the function call.

2) you can wait for 3.1.0b3 to come out. It will be out quite soon, and
it includes code to automatically select the argument type.

3) you can use the latest snapshot of the pre-release 3.1.0b3 code, from
http://www.htdig.org/files/snapshots/htdig-3.1.0b3-121398.tar.gz

-- 
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-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:29:53 PST