Solaris Problem

Brian Friday bfriday at LaSierra.edu
Wed Jan 17 09:18:39 EST 2001


On Tue, 16 Jan 2001, Michael H. Warfield wrote:

> On Tue, Jan 16, 2001 at 01:03:28PM -0800, Brian Friday wrote:
>
> > I've been compiling openssh on solaris machines (OS 2.5.1, 2.6, 2.7, 2.8
> > all sparc) for at least a year and I've never come across that problem
> > using either Sun's C compiler product or multiple versions of GCC.
>
> 	And I can take a wild guess why...  Check in /usr/local/include
> and see if you have the file "stdarg.h".  If you do, that's why.  It's
> a development environment dependency.
>
> 	The stdarg.h that's in /usr/include won't work with gcc because it
> tries to use some funky buildin for va_start.  You apparently need the
> gcc version of stdarg.h instead of the Solaris version.  The stock Makefile
> contains the sequence "-I/usr/local/include -I/usr/include" so, if stdarg.h
> is in /usr/local/include, that version should get included instead of the one
> in /usr/include.


I have stdarg.h in the following locations on each system (OS number
differs as well as gcc number)

/usr/include/stdarg.h
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/include/stdarg.h

I think the difference between the two of us might be our environment
variables. Long ago (and far away) a number of compilation attempts for
some other software (way before I met openssh) required specifically the
search to start in /usr/local then default to /usr/include|lib. For all I
remember it could have been a how to compile using gcc document I read in
the past.  Regardless you will notice that instead of defaulting to
looking first in /usr/[include|lib] we default our search to
/usr/local/[include|lib].

I just recently reinstalled the OS on one of my machines completely. I
installed a few packages after patching the system before bringing it on
to our network

Perl
GCC
TCSH
autoconf

-----
set path=(/usr/bin /usr/local/bin /opt/SUNWspro/bin /usr/ucb /usr/ccs/bin
/opt/sbin /etc .)

setenv LD_LIBRARY_PATH "/usr/local/lib:/lib:/usr/lib:/usr/local/X11/lib:/usr/dt/
lib:/usr/openwin/lib:/usr/ucblib:/usr/local/ssl/lib"

setenv PATH "/usr/bin:/usr/sbin:/usr/local/bin:/opt/SUNWspro/bin:/usr/local/sbin
:/usr/ccs/bin:/etc:/usr/etc:/usr/local/X11/bin:/usr/openwin/bin:/usr/local/etc:/
opt/sbin:/opt/sbin"
-----


> 	I built up two fresh sparc systems this way and both were broken the
> same way when it came to building OpenSSH.

Whatever your shell may be it is defaulting to look first in
/usr/include and /usr/lib. Once it finds the file it errors as you
describe because it is not the file you are supposed to use (ie the gcc
version).

Trying setting your shell environment variables to the above and see what
happens.  One thing that stay standard on all my systems is my
LD_LIBRARY_PATH and some portions of the PATH/path.

> your include path you have a working stdarg.h prior to the one in
> /usr/include.

Exactly. In my case my search path defaults to /usr/local/lib before it
searches /usr/lib or /usr/include thus it picks up the gcc stdarg.h as
opposed to the system stdarg.h.

I've found that this is not necessarily a problem with a open source
software package as much as it is a problem with varying standards of open
source programming.  Perhaps if the program config/makefiles start in a OS
that by its nature supports or uses a number of Open Source programs as
its main components then defaulting to the /usr/include is appropriate.
Whereas if a program is developed for open source on an OS like Solaris
which does not rely on open source programs by default. The config/makefiles
correctly look in /usr/local and avoid /usr.

I don't know that there is an easy solution but if your going to work
frequently with open source apps I'd make the above changes to your
default search paths.

Sincerely,

Brian Friday
Systems Administrator
La Sierra University
(909) 785-2554 x2










More information about the openssh-unix-dev mailing list