Hi All,

  An update on shared library support for Solaris 2.5.1,

  I did setup yet another Solaris 2.5.1 server and was
successfully able to build OpenSSL with shared libraries.
This time the first thing I did after installing the gcc
2.7.2 package, was to compile and install gcc 2.95.3

  The only problem I had under Solaris is that while you
can compile a program with an RPATH in it, which lists
the locations of shared libraries on the system for the
runtime linker, you cannot do this to libraries.  As a
result if you link openssl with zlib, libz.so must be
softlinked into /usr/lib before building openssl.

  Solaris 2.6 and later have the crle command that fixes
this.

Ted

> -----Original Message-----
> From: Ted Mittelstaedt [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 11, 2005 12:21 PM
> To: [email protected]
> Subject: RE: Having problems building shared libraries under Solaris
> 2.5.1
> 
> 
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Andy Polyakov
> > Sent: Tuesday, January 11, 2005 2:57 AM
> > To: [email protected]
> > Subject: Re: Having problems building shared libraries under Solaris
> > 2.5.1
> > 
> > 
> > >   I have a Solaris 2.5.1 x86 system and openssl 0.9.7e and I
> > > want to build it with shared libraries, so I tried the following
> > > with the openssl-0.9.7-stable-SNAP-20050109:
> > > 
> > > ./Configure solaris-x86-gcc zlib shared no-asm
> > > 
> > > and part way into the compilation it aborts with the following:
> > > 
> > > + gcc -shared -G -dy -z text -o libcrypto.so.0.9.7 -h
> > > libcrypto.so.0.9.7 -Wl,-Bsymbolic -Wl,-z,allextract
> > > libcrypto.a -Wl,-z,defaultextract -L. -lsocket -lnsl -ldl -lc
> > > Undefined                       first referenced
> > >  symbol                             in file
> > > __umoddi3                           libcrypto.a(bn_word.o)
> > > __udivdi3                           libcrypto.a(b_print.o)
> > > ld: warning: Symbol referencing errors
> > > Text relocation remains                         referenced
> > >     against symbol                  offset      in file
> > > <unknown>                           0x154       
> > libcrypto.a(ocsp_prn.o)
> > > <unknown>                           0x15c       
> > libcrypto.a(ocsp_prn.o)
> > > <unknown>                           0x164       
> > libcrypto.a(ocsp_prn.o)
> > > <unknown>                           0x16c       
> > libcrypto.a(ocsp_prn.o)
> > > <unknown>                           0x174       
> > libcrypto.a(ocsp_prn.o)
> > > <unknown>                           0x184       
> > libcrypto.a(ocsp_prn.o)
> > > <unknown>                           0x18c       
> > libcrypto.a(ocsp_prn.o)
> > > <unknown>                           0x17c       
> > libcrypto.a(ocsp_prn.o)
> > 
> > Well, 0.9.7-stable snapshot was recently tested on Solaris x86 
> > with gcc 
> > 2.95 and it succeeded to build shared. 
> 
> Hi Andy,
> 
>   Could you please put that in the documentation with OpenSSL?
> 
>   This was all under gcc 2.7.2 which I readily admit is old -
> it was off the sunfreeware site.
> 
>   If I had known in advance I probably would have updated gcc
> first before building a bunch of other things.  I did look at the
> openssl docs early, actually.
> 
> > As for relocations. This is 
> > *pure* compiler domain, there is nothing one can do in C code to 
> > eliminate a "text relocation." So it must be a compiler bug, 
> something 
> > beyond our control.
> 
> OK no problem - then put in the openssl docs that openssl cannot
> be built shared under Solaris 2.5.1 with gcc 2.7.2, you must
> upgrade the complier to a later version of gcc.
> 
> Interesting how it only affects ocsp_prn.o
> 
> > As for __u[mod|div]di3 symbols. As you pointed out 
> > they do rezide in libgcc, but gcc driver used to add -lgcc all by 
> > itself. At least I can confirm that it does so on my system 
> > and symbols 
> > in question are properly resolved.
> > 
> 
> Probably a problem with how gcc 2.7.2 was built.  The gcc 2.7.2
> that is on sunfreeware was put up years ago on sunsite, before
> that was taken down.  Supposedly it was built with Sun's cc.
> It is really the only readily available precompiled gcc for
> Solaris 2.5.1 x86 that has any credibility, I'm afraid.  I
> should have used it to bootstrap gcc 2.95 but I was in a hurry
> to get the system up.
> 
> > In other words. Upgrade your compiler or give up shared 
> support. There 
> > hardly are other options. A.
> 
> Thanks!  I'll do that the next time I build another 2.5.1 system
> (if I build another 2.5.1. system that is, the one I'm working on
> is kind of a special case, actually)
> 
> Fortunately for this one shared support wasn't a requirement.
> 
> Ted
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to