Mailing List Archive

problems with compiling on SPARC solaris 2.7
ssh won't compile on this platform
log:
gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PROGRAM=\"/usr/local/bin/ssh\"
-DSSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh/ssh-askpass\" -DHAVE_CONFIG_H -c atomicio.c -o atomicio.o
In file included from config.h:294,
from bsd-misc.h:39,
from includes.h:91,
from atomicio.c:26:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
In file included from config.h:294,
from bsd-strlcpy.h:4,
from includes.h:92,
from atomicio.c:26:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
In file included from config.h:294,
from bsd-strlcat.h:4,
from includes.h:93,
from atomicio.c:26:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
In file included from config.h:294,
from bsd-mktemp.h:4,
from includes.h:94,
from atomicio.c:26:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
In file included from config.h:294,
from bsd-snprintf.h:4,
from includes.h:95,
from atomicio.c:26:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
In file included from config.h:294,
from bsd-daemon.h:4,
from includes.h:96,
from atomicio.c:26:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
In file included from config.h:294,
from bsd-login.h:4,
from includes.h:97,
from atomicio.c:26:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
In file included from config.h:294,
from rsa.h:21,
from ssh.h:27,
from atomicio.c:30:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
In file included from config.h:294,
from cipher.h:19,
from ssh.h:28,
from atomicio.c:30:
defines.h:74: redefinition of `u_int16_t'
defines.h:74: `u_int16_t' previously declared here
defines.h:75: redefinition of `u_int32_t'
defines.h:75: `u_int32_t' previously declared here
defines.h:76: redefinition of `u_int64_t'
defines.h:76: `u_int64_t' previously declared here
make: *** [atomicio.o] Error 1
Press any key to continue...
Re: problems with compiling on SPARC solaris 2.7 [ In reply to ]
Yo Max!

SCO UnixWare has the same problem, but it is a warning and not a
fatal error.

Looking at defines.h it seems to me that if you set:
#define HAVE_U_INTXX_T 1
in config.h that your problem should go away. I just tried that on
UnixWare and things are much better.

RGDS
GARY

On Fri, 7 Jan 2000, Max Shaposhnikov wrote:

> defines.h:74: redefinition of `u_int16_t'
> defines.h:74: `u_int16_t' previously declared here
> defines.h:75: redefinition of `u_int32_t'
> defines.h:75: `u_int32_t' previously declared here
> defines.h:76: redefinition of `u_int64_t'
> defines.h:76: `u_int64_t' previously declared here

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 20340 Empire Ave, Suite E-3, Bend, OR 97701
gem@rellim.com Tel:+1(541)382-8588 Fax: +1(541)382-8676
Re: problems with compiling on SPARC solaris 2.7 [ In reply to ]
On Fri, 7 Jan 2000, Max Shaposhnikov wrote:

> ssh won't compile on this platform
> log:
> gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PROGRAM=\"/usr/local/bin/ssh\"
> -DSSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh/ssh-askpass\" -DHAVE_CONFIG_H -c atomicio.c -o atomicio.o
> In file included from config.h:294,
> from bsd-misc.h:39,
> from includes.h:91,
> from atomicio.c:26:
> defines.h:74: redefinition of `u_int16_t'
> defines.h:74: `u_int16_t' previously declared here
> defines.h:75: redefinition of `u_int32_t'
> defines.h:75: `u_int32_t' previously declared here
> defines.h:76: redefinition of `u_int64_t'
> defines.h:76: `u_int64_t' previously declared here

apply the following patch to your defines.h

*** defines.h Tue Jan 4 14:23:15 2000
--- defines.h.orig Tue Jan 4 14:22:50 2000
***************
*** 71,77 ****
/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
#ifndef HAVE_U_INTXX_T
# ifdef HAVE_UINTXX_T
- #define HAVE_U_INTXX_T
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
--- 71,76 ----

Since it's included in multiple files it keeps getting redefined.
(there is probably a more elegant way of doing this but I didn't look for it)

Brian



Brian Harvell harvell@aol.net http://ToolBoy.com/
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc