You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Kaspar Brand <ht...@velox.ch> on 2012/09/16 08:00:00 UTC

Re: Linking mod_ssl with a specific OpenSSL version

On 23.08.2012 09:22, Kaspar Brand wrote:
> On 17.08.2012 10:11, Joe Orton wrote:
>> On Thu, Aug 16, 2012 at 08:36:31PM +0200, Kaspar Brand wrote:
>>> I wonder if we should add support for module-specific CFLAGS etc.,
>>> which would always appear before the EXTRA_XXX stuff in the compile
>>> and link commands, i.e. in rules.mk we would have:
>>>
>>> ALL_CFLAGS   = $(MOD_CFLAGS) $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)
>>> ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(MOD_CPPFLAGS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
>>> ALL_INCLUDES = $(INCLUDES) $(MOD_INCLUDES) $(EXTRA_INCLUDES)
>>>
>>> ALL_LDFLAGS  = $(MOD_LDFLAGS) $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS)
>>>
>>> A particular module could then set its specific MOD_CFLAGS etc. in
>>> modules.mk, and these would always have priority over those possibly
>>> inserted by other modules.
>>
>> Doing CFLAGS et al like that doesn't generalise brilliantly, because 
>> they are per-directory (modules/xxx) not strictly per-module, but it 
>> could be done anyway, and that wouldn't matter for mod_ssl.  Yeah, 
>> probably a good idea.
> 
> I gave it a try, and so far it seems to work as expected, see the
> attached patch (against r1358166, to reduce clutter).

I have committed an improved version in r1385214 (in particular, more
tweaking was required to properly handle support/ab, which can't make
use of MOD_CFLAGS etc.). Reviews, further testing and feedback welcome.

Kaspar

Re: Linking mod_ssl with a specific OpenSSL version

Posted by Kaspar Brand <ht...@velox.ch>.
On 18.09.2012 15:05, Joe Orton wrote:
> one minor nit/bikeshed-colour-review:
> 
> -           APR_ADDTO(MOD_SSL_LDADD, [-export-symbols-regex ssl_module])
> +           APR_ADDTO(MOD_LDFLAGS, [-export-symbols-regex ssl_module])
> 
> this is currently equivalent but keeping _LDADD seems better.

No strong feelings about that, so switched back in r1387610.

Kaspar

Re: Linking mod_ssl with a specific OpenSSL version

Posted by Joe Orton <jo...@redhat.com>.
On Sun, Sep 16, 2012 at 08:00:00AM +0200, Kaspar Brand wrote:
> I have committed an improved version in r1385214 (in particular, more
> tweaking was required to properly handle support/ab, which can't make
> use of MOD_CFLAGS etc.). Reviews, further testing and feedback welcome.

Looks good to me, thanks Kaspar.

one minor nit/bikeshed-colour-review:

-           APR_ADDTO(MOD_SSL_LDADD, [-export-symbols-regex ssl_module])
+           APR_ADDTO(MOD_LDFLAGS, [-export-symbols-regex ssl_module])

this is currently equivalent but keeping _LDADD seems better.

Regards, Joe

Re: Linking mod_ssl with a specific OpenSSL version

Posted by Kaspar Brand <ht...@velox.ch>.
On 18.09.2012 17:55, Ben Laurie wrote:
> though I still have to actually install openssl somewhere,
> which would be irritating if I had to do any serious development. That
> said, I could probably figure out how to work around that if I needed
> to...

Something like the following will make your OpenSSL build directory
behave like an installation directory to httpd's configure:

  cd /wherever/the/compiled/openssl/sources/are
  mkdir -p lib/pkgconfig
  echo prefix=`pwd` > lib/pkgconfig/openssl.pc
  tail +2 openssl.pc >> lib/pkgconfig/openssl.pc
  cd lib
  for l in ../*.a ../*.so*; do ln -s $l; done

(by omitting the symlinks for *.so*, it's possible to force the static
versions of libcrypto and libssl being used for mod_ssl)

> Now ... what about the backport? :-)

Proposed for 2.4 in r1387613.

Kaspar

Re: Linking mod_ssl with a specific OpenSSL version

Posted by Ben Laurie <be...@links.org>.
On Sun, Sep 16, 2012 at 7:24 AM, Kaspar Brand <ht...@velox.ch> wrote:
> On 16.09.2012 08:00, Kaspar Brand wrote:
>> I have committed an improved version in r1385214
>
> Um, make that read r1385216. I left out the acinclude.m4 changes in the
> first attempt, unfortunately.

OK, I just checked it out and tested it - it does indeed solve my
problem, though I still have to actually install openssl somewhere,
which would be irritating if I had to do any serious development. That
said, I could probably figure out how to work around that if I needed
to...

So ... thanks!

Now ... what about the backport? :-)

Re: Linking mod_ssl with a specific OpenSSL version

Posted by Kaspar Brand <ht...@velox.ch>.
On 16.09.2012 08:00, Kaspar Brand wrote:
> I have committed an improved version in r1385214

Um, make that read r1385216. I left out the acinclude.m4 changes in the
first attempt, unfortunately.

Kaspar