When configuring OpenSSL 0.9.6g for solaris-sparcv8-gcc/solaris-x86-gcc
shared, the way the shared libcrypto.so and libssl.so are built is wrong:

* gcc is invoked with gcc -G, but unfortunately this doesn't suffice to
  trigger shared library generation.  Instead, gcc creates a cross of a
  dynamic executable and a shared object, as can be seen with gcc -v:
  crt1.o is linked in, which leads to an unresolved reference to main:

  ldd -d libcrypto.so reports

        symbol not found: main          (./libcrypto.so.0)

  The correct way to build shared libraries with gcc on (almost?) any
  platform is to use gcc -shared instead.

  Unfortunately, this adds another problem with gcc 3.x releases: gcc
  -shared adds a dynamic dependency on the shared libgcc_s.so, so in order
  for libcrypto.so and libssl.so to be self-contained, one needs to add a
  runpath pointing to the directory where libgcc_s.so is installed,
  e.g. with -R/vol/gnu/lib (i.e. gcc's libdir) on Solaris 2 or -rpath
  /vol/gnu/lib on IRIX 6 and Tru64 UNIX.

Here's the solaris8-x86-gcc test report for reference:

OpenSSL self-test report:

OpenSSL version:  0.9.6g
Last change:      [In 0.9.6g-engine release:]...
Options:          --prefix=/vol/openssl --openssldir=/vol/openssl/share shared
OS (uname):       SunOS arenal 5.8 Generic_111920-01 i86pc i386
OS (config):      i86pc-whatever-solaris2
Target (default): solaris-x86-cc
Target:           solaris-x86-gcc
Compiler:         Configured with: /vol/gnu/src/gcc/gcc-3.1-branch-dist/configur
e --prefix=/vol/gnu --with-local-prefix=/vol/gnu --disable-nls
Thread model: posix
gcc version 3.1

Test passed.

        Rainer

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to