Subject: Re: Compiling openssl-0.9.6e failed on pmax
To: NetBSD pmax <port-pmax@netbsd.org>
From: Uwe Lienig <Uwe.Lienig@fif.mw.htw-dresden.de>
List: port-pmax
Date: 08/16/2002 14:31:04
"Aaron J. Grier" wrote:
> 
> On Thu, Aug 08, 2002 at 11:00:01AM +0200, Uwe Lienig wrote:
> 
> > libcrypto.so.300.0 is not complete. There might be no reference to a
> > lib containing dlopen and the like. But I'm very new to the
> > pkgsrc-system and have no idea where to look in the many makefiles to
> > change this particular commandline, even I don't know how dlopen (and
> > the others) may be undefined! So, what should I do to get rid of this
> > problem.
> 
> I ran into this on my 1.4-running pmax as well... dlopen and friends are
> in /usr/lib/crt0.o, which the linker normally takes care of, but
> obviously shared libraries are a special case.  not knowing being an ELF
> shared library guru, I'm not quite sure how to fix it.

Well, may be to produce a shared lib from a static lib should use a command line
which includes crt0.o like this

gcc -shared -o libcrypto.so.300.0 -Wl,-soname=libcrypto.so.300 \
      -Wl,-Bsymbolic -Wl,--whole-archive libcrypto.a \
#
# next line inserted
      /usr/lib/crt0.o \
      -Wl,--no-whole-archive -L. -Wl,-R/usr/pkg/lib -lc

May be ld behaves different if it produces a executable or a library!

> 
> of course this is nothing compared to the gyrations required for older
> a.out systems.  there I just threw up my hands and am sticking with a
> statically linked openssl.  :P
> 
> --
>   Aaron J. Grier | "Not your ordinary poofy goof." | agrier@poofygoof.com
>     "i'm convinced that the cray cabinet has an outlet for plugging in
>     welding attachments."  --  Skeezics Boondoggle, on the cray CS6400

-- 
Uwe Lienig  | fon: (+49 351) 462 2780 | mailto:uwe.lienig@fif.mw.htw-dresden.de
            | fax: (+49 351) 462 3476 | http://www.fif.mw.htw-dresden.de
HTW Dresden | parcels: Gutzkowstr. 22 | letters: PF 12 07 01       
   -FiF-    |          01069 Dresden  |          01008 Dresden