Re: building shared libraries with OpenSSL

2003-06-18 Thread Carlos Villegas

We moved to apache 2 several months ago, but this looks familiar. Looking 
through some old notes I found that I used the following options to configure
(for apache 1.3.27):

 --enable-module=most \
--enable-shared=max \
--enable-module=so \
--enable-module=ssl \
--enable-rule=SHARED_CORE 

I remember that the last of those args made it possible to compile it. Hope
it helps.

Carlos

On Tue, Jun 17, 2003 at 10:05:59PM -0400, Cliff Woolley wrote:
 On Tue, 17 Jun 2003, Percy Rotteveel wrote:
 
  I've read your article regarding: building shared libraries with OpenSSL
  (http://www.mail-archive.com/[EMAIL PROTECTED]/msg15745.html). The
  instructions are very clear and very helpful. When I execute make
  build-shared, I get the following error message:
 
  ld: fatal: relocations remain against allocatable but non-writable sections
  collect2: ld returned 1 exit status
  *** Error code 1
  make: Fatal error: Command failed for target `do_solaris-shared'
 
  Do you have any clue what is wrong and how to solve it?
 
  In advance, thank you so much!
 
  With kind regards,
  Percy
 
 
 I've had somebody else running Solaris report the same thing to me.
 Unfortunately I've not had any experience building OpenSSL on Solaris...
 I've only done it on Linux.  Maybe somebody else on the modssl-users list
 has, so I'm cc:ing this to the list...
 
 --Cliff
 __
 Apache Interface to OpenSSL (mod_ssl)   www.modssl.org
 User Support Mailing List  [EMAIL PROTECTED]
 Automated List Manager[EMAIL PROTECTED]
__
Apache Interface to OpenSSL (mod_ssl)   www.modssl.org
User Support Mailing List  [EMAIL PROTECTED]
Automated List Manager[EMAIL PROTECTED]


Re: building shared libraries with OpenSSL

2003-06-17 Thread Cliff Woolley
On Tue, 17 Jun 2003, Percy Rotteveel wrote:

 I've read your article regarding: building shared libraries with OpenSSL
 (http://www.mail-archive.com/[EMAIL PROTECTED]/msg15745.html). The
 instructions are very clear and very helpful. When I execute make
 build-shared, I get the following error message:

 ld: fatal: relocations remain against allocatable but non-writable sections
 collect2: ld returned 1 exit status
 *** Error code 1
 make: Fatal error: Command failed for target `do_solaris-shared'

 Do you have any clue what is wrong and how to solve it?

 In advance, thank you so much!

 With kind regards,
 Percy


I've had somebody else running Solaris report the same thing to me.
Unfortunately I've not had any experience building OpenSSL on Solaris...
I've only done it on Linux.  Maybe somebody else on the modssl-users list
has, so I'm cc:ing this to the list...

--Cliff
__
Apache Interface to OpenSSL (mod_ssl)   www.modssl.org
User Support Mailing List  [EMAIL PROTECTED]
Automated List Manager[EMAIL PROTECTED]


Re: building shared libraries with OpenSSL

2003-01-09 Thread Cliff Woolley
On Thu, 9 Jan 2003, Tai Do wrote:

 I'm trying to get Apache2 working on Solaris 8.  I have the following error
 and saw that your answer on the mailing list work.  I was wondering if you
 can help me out with it because I'm not too sure what to do.

 Syntax error on line 234 of /usr/local/apache2/conf/httpd.conf:

 Cannot load /usr/local/apache2/modules/mod_ssl.so into server: ld.so.1:
 /usr/local/apache2/bin/httpd: fatal: relocation error: file
 /usr/local/apache2/modules/mod_ssl.so: symbol X509_INFO_free: referenced
 symbol not found.

 Here is the answer you posted:

 Yes, it's a fairly frequently asked question.  The problem is that
 you've built a shared mod_ssl against a static OpenSSL (ie, libssl.a
 and libcrypto.a instead of .so).  That won't work because the way the
 build system currently works, OpenSSL is linked into httpd, not
 mod_ssl.  httpd doesn't need the symbols from the OpenSSL libraries, so
 the static linker throws them away, meaning they're no longer available
 when mod_ssl is dynamically linked at runtime.

 Solution: use a shared OpenSSL.

 I was wondering how I use a shared OpenSSL.  I was wondering if you can
 point me to where I can find steps to do this or show me how.


I'm CC:'ing this to the modssl-users list, since I'm sure somebody else
out there probably has the same question.

It's kind of annoying, because the shared library support in OpenSSL is
experimental, which in practice just means that the Makefile is
non-intuitive.  I just ran through it again to make sure I got all the
steps right... here's what you do.

I'm going to assume that you have the static version of OpenSSL installed
in /usr/local/lib in this example... just fix the path to match where
OpenSSL gets installed on your machine.

So let's say you've installed OpenSSL previously, but it's the static
version, so you have /usr/local/lib/libssl.a and
/usr/local/lib/libcrypto.a .  Remove those.

Go back to the OpenSSL source directory and do the following:

./config
make
make build-shared
mv libssl.so* /usr/local/lib
mv libcrypto.so* /usr/local/lib
ldconfig

(note: do NOT run make install, or it will remove all your shared
libraries and install the static ones, and you'll have to start over
again.  :-)

That ought to do it.  I recommend doing a search on your filesystem for
other, older copies of libssl* and libcrypto* that might be hanging
around, as sometimes copies get put in strange places and you want to be
sure to only have one: the most recent.

Hope that helps...

--Cliff

__
Apache Interface to OpenSSL (mod_ssl)   www.modssl.org
User Support Mailing List  [EMAIL PROTECTED]
Automated List Manager[EMAIL PROTECTED]