RFE: Portable OpenSSH

Christopher Linn celinn at mtu.edu
Tue Mar 27 14:00:00 EST 2001


what am doing is to link the libz and openssl stuff static, because
of moving target issues, and then let solaris do what it wants with 
it's own libs, for exactly the reasons that darren moffat enumerates.

if you are going to run solaris, then get used to trusted code linking
shared libs, simple as that.  sun's recent offerings are getting very
good at this, though it means you must keep up with the patches  ;*)

On Mon, 26 Mar 2001, Dan Kaminsky wrote:
> It's all about options.  More than a few admins around here would jump at
> the chance to make SSH self-dependant; my most immediate goal may just be
> dealing with libz(the only real external runtime dependancy).

interestingly, in zlib-1.1.3 you must *ask* configure to build shared
libs, otherwise it just builds libz.a ... why is it an "external
runtime dependancy" for you, dan?

when building openssh, i use a directory structure like

	/someplace/openssh/5.6			for solaris 2.6
	/someplace/openssh/5.6/{include,lib}	openssl, zlib, libwrap
	/someplace/openssh/5.6/work		for building stuff

i install static libs and headers as above, building them in .../work.
then i build openssh (in .../work) with CPPFLAGS set with my include
area and LDFLAGS set with my lib area:

	MYINCLUDES=/someplace/openssh/5.6/include
	MYLIBS=/someplace/openssh/5.6/lib
	...
	CPPFLAGS="-I$MYINCLUDES -I$MYINCLUDES/openssl \
	CFLAGS="whatever" \
	LDFLAGS="-L$MYLIBS -R$MYLIBS" \
	./configure \
	--configure-options...

the reason i use the env based flags is that i found that the
--cflags/--cppflags/--ldflags options to configure would always put MY
stuff AFTER /usr/local stuff (grr, and what do you think is in
/usr/local... shared libs!  ;*)

ldd on the binaries lists only the native solaris shared libs.
i am using native sun compilers for all this.

chris

-- 
Christopher Linn, <celinn at mtu.edu>    | By no means shall either the CEC
Staff System Administrator            | or MTU be held in any way liable
  Center for Experimental Computation | for any opinions or conjecture I
    Michigan Technological University | hold to or imply to hold herein.



More information about the openssh-unix-dev mailing list