Bug 152 - Build failure on Sparc/Solaris 2.8 with Sun cc or gcc
Summary: Build failure on Sparc/Solaris 2.8 with Sun cc or gcc
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: SPARC Solaris
: P2 major
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-09 06:24 AEDT by Zed Pobre
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zed Pobre 2002-03-09 06:24:34 AEDT
This affects both 3.0.2p1 and 3.1p1.  Somehow, data from header files is being
lost during compiles.  Configure is run as:

CC=gcc ./configure --prefix=$PREFIX \
    --infodir=$PREFIX/share/info \
    --mandir=$PREFIX/share/man \
    --sysconfdir=$PREFIX/etc \
    --with-xauth=/usr/openwin/bin/xauth \
    --with-rsh=/usr/bin/rsh \
    --with-4in6 --with-pam \
    --disable-suid-ssh \
   
--with-default-path=/usr/local/free/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/openwin/bin


Running make from here gets to:

gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.
-I/usr/local/free/include  -I/usr/local/include -DSSHDIR=\"/usr/local/free/etc\"
-D_PATH_SSH_PROGRAM=\"/usr/local/free/bin/ssh\"
-D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/free/libexec/ssh-askpass\"
-D_PATH_SFTP_SERVER=\"/usr/local/free/libexec/sftp-server\"
-D_PATH_SSH_PIDDIR=\"/var/run\"
-DSSH_RAND_HELPER=\"/usr/local/free/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c
ttymodes.c
In file included from ttymodes.c:297:
ttymodes.h: In function `tty_make_modes':
ttymodes.h:125: `IXANY' undeclared (first use in this function)
ttymodes.h:125: (Each undeclared identifier is reported only once
ttymodes.h:125: for each function it appears in.)
ttymodes.h:159: `ONLCR' undeclared (first use in this function)
In file included from ttymodes.c:392:
ttymodes.h: In function `tty_parse_modes':
ttymodes.h:125: `IXANY' undeclared (first use in this function)
ttymodes.h:159: `ONLCR' undeclared (first use in this function)

which of course are defined in /usr/include/sys/termios.h, which is pulled in
from /usr/include/termios.h.  Manually adding #include <sys/termios.h> to the
top of ttymodes.h has no effect.  Adding in the IXANY and ONLCR #defines to the
top of ttymodes.h gets it a little farther, but then it dies at:

gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.
-I/usr/local/free/include  -I/usr/local/include -DSSHDIR=\"/usr/local/free/etc\"
-D_PATH_SSH_PROGRAM=\"/usr/local/free/bin/ssh\"
-D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/free/libexec/ssh-askpass\"
-D_PATH_SFTP_SERVER=\"/usr/local/free/libexec/sftp-server\"
-D_PATH_SSH_PIDDIR=\"/var/run\"
-DSSH_RAND_HELPER=\"/usr/local/free/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c
ssh.c
ssh.c: In function `main':
ssh.c:620: warning: implicit declaration of function `snprintf'
ssh.c: In function `x11_get_proto':
ssh.c:835: warning: implicit declaration of function `strlcpy'
ssh.c: In function `ssh_session':
ssh.c:898: storage size of `ws' isn't known
ssh.c:936: warning: implicit declaration of function `ioctl'
ssh.c:936: `TIOCGWINSZ' undeclared (first use in this function)
ssh.c:936: (Each undeclared identifier is reported only once
ssh.c:936: for each function it appears in.)
ssh.c:898: warning: unused variable `ws'
ssh.c: In function `ssh_session2_setup':
ssh.c:1055: storage size of `ws' isn't known
ssh.c:1061: `TIOCGWINSZ' undeclared (first use in this function)
ssh.c:1055: warning: unused variable `ws'
make: *** [ssh.o] Error 1


I can get around the TIOCGWINSZ problem the same way, but I'm defeated by
whatever strange thing is going on with ws.
At first, I thought I had somehow managed to mangle my gcc install, but
upgrading from gcc 2.94 to gcc 3.0.4 had no effect, and I didn't do anything out
of the ordinary on the compile procedure.  So then I tried again, only with
CC=cc, using the sun compiler.  I got stopped at exactly the same points, albeit
with slightly different errors:

cc -g -I. -I. -I/usr/local/free/include  -I/usr/local/include
-DSSHDIR=\"/usr/local/free/etc\" -D_PATH_SSH_PROGRAM=\"/usr/local/free/bin/ssh\"
-D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/free/libexec/ssh-askpass\"
-D_PATH_SFTP_SERVER=\"/usr/local/free/libexec/sftp-server\"
-D_PATH_SSH_PIDDIR=\"/var/run\"
-DSSH_RAND_HELPER=\"/usr/local/free/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c
ssh.c
"ssh.c", line 898: incomplete struct/union/enum winsize: ws
"ssh.c", line 936: undefined symbol: TIOCGWINSZ
"ssh.c", line 938: undefined struct/union member: ws_row
"ssh.c", line 939: undefined struct/union member: ws_col
"ssh.c", line 940: undefined struct/union member: ws_xpixel
"ssh.c", line 941: undefined struct/union member: ws_ypixel
"ssh.c", line 1055: incomplete struct/union/enum winsize: ws
"ssh.c", line 1061: undefined symbol: TIOCGWINSZ
"ssh.c", line 1066: undefined struct/union member: ws_col
"ssh.c", line 1067: undefined struct/union member: ws_row
"ssh.c", line 1068: undefined struct/union member: ws_xpixel
"ssh.c", line 1069: undefined struct/union member: ws_ypixel
cc: acomp failed for ssh.c
make: *** [ssh.o] Error 2


At first I thought that somehow the header protective #defines were being set
without the header data actually being loaded, but when I removed the specific
#defines I mentioned above and tried adding:

#undef _TERMIO_H
#undef _SYS_TERMIO_H
#include <termio.h>

to the top of ttymodes.h, it again stopped at the same spot.


A complete build log can be made available upon request.

-- 
Zed Pobre <zed@math.lsu.edu>
Department of Mathematics, Louisiana State University
Comment 1 Carson Gaspar 2002-03-10 03:41:03 AEDT
I just built stock 3.1p1 on Solaris 8/SPARC with Forte 6 (cc 5.1) with no 
problems. I suspect something on your system is unhappy. Try removing the -
I/usr/local/include and see if that fixes things. If so, track down what you 
have in /usr/local/include that's breaking stuff.
Comment 2 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED