Mailing List Archive

Re: status of openssh for solaris?
In message <19991122110826.A23851@wdawson-sun.sbs.siemens.com>, Willard Dawson
writes:
>I just tried to compile, this time with openssh-1.2pre14, openssl-0.9.4
>and egd-0.6. I get considerably further along, but still not completely
>compiled. Here are the last bits:
>
>gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PR
>OGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-as
>kpass\" -DHAVE_CONFIG_H -c bsd-daemon.c
>bsd-daemon.c: In function `daemon':
>bsd-daemon.c:70: `_PATH_DEVNULL' undeclared (first use in this function)
>bsd-daemon.c:70: (Each undeclared identifier is reported only once
>bsd-daemon.c:70: for each function it appears in.)
>*** Error code 1
>make: Fatal error: Command failed for target `bsd-daemon.o'
>
>I cannot find any reference to DEVNULL in /usr/include or .../sys. This
>must be a bsd-ism, not supported under native Solaris, I guess.
Okay, I cc'ed this to the openssh-unix-dev mailing list.

It should just be like this:

/usr/include/paths.h:#define _PATH_DEVNULL "/dev/null"

Niels.
Re: status of openssh for solaris? [ In reply to ]
In message <19991122112513.A24003@wdawson-sun.sbs.siemens.com>, Willard Dawson
writes:
>Should I forward this to you, or go the mailing list?
For compiling problems, the mailing list is probably the best place.
I cc'ed it again ;)

Niels.

>I proceeded further, after modifying _PATH_DEVNULL with the actual
>path string for "/dev/null", to find similar errors due to _PATH_UTMP
>and _PATH_WTMP in bsd-login.c. So, after using "/var/adm/utmp" and
>"/var/adm/wtmp", respectively, I did proceed further.
>
>I see some additional potential problems:
>
>gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PR
>OGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-as
>kpass\" -DHAVE_CONFIG_H -c canohost.c
>canohost.c: In function `get_remote_hostname':
>canohost.c:60: warning: subscript has type `char'
>
>gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PR
>OGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-as
>kpass\" -DHAVE_CONFIG_H -c channels.c
>channels.c: In function `x11_create_display_inet':
>channels.c:1087: warning: `sock' might be used uninitialized in this function
>
>gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PR
>OGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-as
>kpass\" -DHAVE_CONFIG_H -c hostfile.c
>hostfile.c: In function `match_hostname':
>hostfile.c:136: warning: subscript has type `char'
>
>gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PR
>OGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-as
>kpass\" -DHAVE_CONFIG_H -c login.c
>login.c: In function `record_login':
>login.c:92: warning: implicit declaration of function `login'
>
>gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PR
>OGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-as
>kpass\" -DHAVE_CONFIG_H -c sshconnect.c
>sshconnect.c: In function `ssh_login':
>sshconnect.c:1047: warning: subscript has type `char'
>
>gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PR
>OGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-as
>kpass\" -DHAVE_CONFIG_H -c bsd-mktemp.c
>bsd-mktemp.c: In function `_gettemp':
>bsd-mktemp.c:173: warning: subscript has type `char'
>
>gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PR
>OGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-as
>kpass\" -DHAVE_CONFIG_H -c bsd-login.c
>bsd-login.c: In function `login':
>bsd-login.c:55: warning: unused variable `old_ut'
>
>
>Finally, at the very end, it does not compile:
>
>gcc -o ssh -lpam -ldl -lsocket -lnsl -lz -lcrypto -L/usr/local/ssl/lib -lss
>l -lcrypto
>Undefined first referenced
> symbol in file
>main /usr/local/lib/gcc-lib/sparc-sun-solaris2.
>7/2.95/crt1.o
>ld: fatal: Symbol referencing errors. No output written to ssh
>collect2: ld returned 1 exit status
>*** Error code 1
>make: Fatal error: Command failed for target `ssh'
Re: status of openssh for solaris? [ In reply to ]
Thanks Niels. From hereon, I'll just send my comments to the mailing
list.

On Mon, Nov 22, 1999 at 11:35:40AM -0500, Niels Provos wrote:
> In message <19991122112513.A24003@wdawson-sun.sbs.siemens.com>, Willard Dawson
> writes:
> >Should I forward this to you, or go the mailing list?
> For compiling problems, the mailing list is probably the best place.
> I cc'ed it again ;)
>
> Niels.
>
> >I proceeded further, after modifying _PATH_DEVNULL with the actual
> >path string for "/dev/null", to find similar errors due to _PATH_UTMP
> >and _PATH_WTMP in bsd-login.c. So, after using "/var/adm/utmp" and
> >"/var/adm/wtmp", respectively, I did proceed further.

It seems that some real effort to make a Solaris-clean version minus any
remnant of paths.h is still needed.

> >I see some additional potential problems:

... which I'm willing to ignore for a moment...

> >gcc -o ssh -lpam -ldl -lsocket -lnsl -lz -lcrypto -L/usr/local/ssl/lib -lss
> >l -lcrypto
> >Undefined first referenced
> > symbol in file
> >main /usr/local/lib/gcc-lib/sparc-sun-solaris2.
> >7/2.95/crt1.o
> >ld: fatal: Symbol referencing errors. No output written to ssh
> >collect2: ld returned 1 exit status
> >*** Error code 1
> >make: Fatal error: Command failed for target `ssh'

Ok, so it's been a while since I did real work. Trying gmake, instead,
gets me further along:

gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PROGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-askpass\" -DHAVE_CONFIG_H -c ssh-add.c -o ssh-add.o
ssh-add.c: In function `main':
ssh-add.c:187: conflicting types for `__progname'
ssh-add.c:32: previous declaration of `__progname'
gmake: *** [ssh-add.o] Error 1

That one's easy enough to work around by simply copying the same ifdef's
into the next declaration. Similar problem in ssh-keygen.c.

After all that, I finally got it to compile. *whew*

Now, to see if it runs...

--
Willard Francis Otto Dawson +1 770 814 5099 / +1 770 814 5202 FAX
Siemens Business Services, ENS mailto:willard.dawson@sbs.siemens.com
4570 River Green Pkwy, Ste 140 http://www.sbs.siemens.com/
Duluth, GA 30096-2564 Standard disclaimer applies.
Re: status of openssh for solaris? [ In reply to ]
On Mon, 22 Nov 1999, Willard Dawson wrote:

> Thanks Niels. From hereon, I'll just send my comments to the mailing
> list.
>
> On Mon, Nov 22, 1999 at 11:35:40AM -0500, Niels Provos wrote:
> > In message <19991122112513.A24003@wdawson-sun.sbs.siemens.com>, Willard Dawson
> > writes:
> > >Should I forward this to you, or go the mailing list?
> > For compiling problems, the mailing list is probably the best place.
> > I cc'ed it again ;)
> >
> > Niels.
> >
> > >I proceeded further, after modifying _PATH_DEVNULL with the actual
> > >path string for "/dev/null", to find similar errors due to _PATH_UTMP
> > >and _PATH_WTMP in bsd-login.c. So, after using "/var/adm/utmp" and
> > >"/var/adm/wtmp", respectively, I did proceed further.
>
> It seems that some real effort to make a Solaris-clean version minus any
> remnant of paths.h is still needed.

actually, in some of these cases, its just a mis-organization of
include/header files...the UTMP/WTMP problems are all fixed in
config.h.in, just not in the respective .c files ...

> gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/usr/local/etc\" -DSSH_PROGRAM=\"/usr/local/bin/ssh\" -DASKPASS_PROGRAM=\"/usr/local/libexec/ssh/ssh-askpass\" -DHAVE_CONFIG_H -c ssh-add.c -o ssh-add.o
> ssh-add.c: In function `main':
> ssh-add.c:187: conflicting types for `__progname'
> ssh-add.c:32: previous declaration of `__progname'
> gmake: *** [ssh-add.o] Error 1

this one is work that Damien did to get around problems where an OS
doesn't define __progname, but missed a few occurances further in the C
files...basically, delete line 187 and you'll be fine...

Marc G. Fournier marc.fournier@acadiau.ca
Senior Systems Administrator Acadia University

"These are my opinions, which are not necessarily shared by my employer"
Re: status of openssh for solaris? [ In reply to ]
On Mon, 22 Nov 1999, Niels Provos wrote:

> >I cannot find any reference to DEVNULL in /usr/include or .../sys. This
> >must be a bsd-ism, not supported under native Solaris, I guess.
> Okay, I cc'ed this to the openssh-unix-dev mailing list.
>
> It should just be like this:
>
> /usr/include/paths.h:#define _PATH_DEVNULL "/dev/null"

Fixed in my tree.

Damien

--
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)
Re: status of openssh for solaris? [ In reply to ]
On Mon, 22 Nov 1999, Willard Dawson wrote:

> That one's easy enough to work around by simply copying the same ifdef's
> into the next declaration. Similar problem in ssh-keygen.c.

Fixed in my tree. Thanks,

Damien

--
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)