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/08/08 08:00:25 UTC
Re: Linking mod_ssl with a specific OpenSSL version
On 06.08.2012 23:36, Rainer Jung wrote:
> On 05.08.2012 10:10, Kaspar Brand wrote:
>> It's a useful enhancement if mod_ssl can be linked with a specific
>> OpenSSL version in a non-default location, but the current approach has
>> at least one problem, AFAICT: it will only work if the directory pointed
>> to by --with-ssl does not include shared libraries for OpenSSL (by
>> default, OpenSSL only builds libssl.a and libcrypto.a, so the issue
>> might not be obvious at first sight).
>
> Why wouldn't it work with shared libs? Because they usually have
> dependencies themselves that are ignored?
Sorry, "will only work" is inaccurate... what I was (implicitly)
assuming is that the OpenSSL build directory would not be part of the
standard library search path - i.e., unless LD_LIBRARY_PATH is adapted,
httpd won't find the proper libraries at startup.
Forcing the linker to prefer the static over the shared libraries in a
particular directory (like I tried in the preliminary patch with the
"-Wl,-Bstatic,-lssl,-lcrypto,-Bdynamic" linker options) turns out to be
too linker/platform specific, however - I have abandoned this idea
meanwhile. I'm not sure what to really do about it... perhaps add the
OpenSSL builddir with "-R" and leave the rest to libtool?
>>> I would suggest to use a separate
>>> configure argument to support this build option, e.g. --with-ssl-srcdir.
>
> We could, but I think if it would be easy to just add the logic to
> with-ssl to also work with a src directory it would be easier to use. I
> have no strong opinion on this though.
My thinking was that people should explicitly tell configure that they
want to link with the libs in a build directory (so that they don't
"accidentally" use a directory which might only temporarily exist -
that's also the primary reason for preferring the static over the shared
libs from that dir).
> I do like the idea to give with-ssl priority over pkgconfig. If a user
> chooses the ssl directory explicitly that should not be overwritten by
> pkgconfig. Of course one can still use pkgconfig info in the chosen
> directory to find dependency libs etc.
OpenSSL doesn't have any further dependencies, AFAICT (cf.
http://cvs.openssl.org/fileview?f=openssl/Makefile.org and the
"Requires: " line it adds to openssl.pc). Are you referring to the
--libs-only-other option for pkg-config?
Kaspar
Re: Linking mod_ssl with a specific OpenSSL version
Posted by Ben Laurie <be...@links.org>.
On Thu, Aug 9, 2012 at 9:42 AM, Joe Orton <jo...@redhat.com> wrote:
> On Thu, Aug 09, 2012 at 04:56:03AM +0100, Ben Laurie wrote:
>> On Wed, Aug 8, 2012 at 5:03 PM, Joe Orton <jo...@redhat.com> wrote:
>> > This all seems totally crazy to me. Why are we adding complexity to the
>> > httpd build system so openssl devs can skip typing the " install" part
>> > of running "make install" when testing against modified versions of
>> > OpenSSL? Joe
>>
>> IIRC, the issue is that it doesn't build correctly even if you do that
>> (to a non-standard location - and clearly installing to a standard
>> location is nuts).
>
> Doesn't build correctly... in what way? I've done that loads of times
> building against OpenSSL from CVS. All the code is still there so it
> better work or else we need to see bug reports.
In that it uses (parts of) the default install instead of the install
you specify. At least for some versions. I forget the details coz I
fixed it...
>
> Regards, Joe
Re: Linking mod_ssl with a specific OpenSSL version
Posted by Joe Orton <jo...@redhat.com>.
On Thu, Aug 09, 2012 at 04:56:03AM +0100, Ben Laurie wrote:
> On Wed, Aug 8, 2012 at 5:03 PM, Joe Orton <jo...@redhat.com> wrote:
> > This all seems totally crazy to me. Why are we adding complexity to the
> > httpd build system so openssl devs can skip typing the " install" part
> > of running "make install" when testing against modified versions of
> > OpenSSL? Joe
>
> IIRC, the issue is that it doesn't build correctly even if you do that
> (to a non-standard location - and clearly installing to a standard
> location is nuts).
Doesn't build correctly... in what way? I've done that loads of times
building against OpenSSL from CVS. All the code is still there so it
better work or else we need to see bug reports.
Regards, Joe
Re: Linking mod_ssl with a specific OpenSSL version
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 8/8/2012 8:56 PM, Ben Laurie wrote:
> On Wed, Aug 8, 2012 at 5:03 PM, Joe Orton <jo...@redhat.com> wrote:
>> On Wed, Aug 08, 2012 at 08:00:25AM +0200, Kaspar Brand wrote:
>>> My thinking was that people should explicitly tell configure that they
>>> want to link with the libs in a build directory (so that they don't
>>> "accidentally" use a directory which might only temporarily exist -
>>> that's also the primary reason for preferring the static over the shared
>>> libs from that dir).
>>
>> This all seems totally crazy to me. Why are we adding complexity to the
>> httpd build system so openssl devs can skip typing the " install" part
>> of running "make install" when testing against modified versions of
>> OpenSSL? Joe
>
> IIRC, the issue is that it doesn't build correctly even if you do that
> (to a non-standard location - and clearly installing to a standard
> location is nuts).
I have no issues installing to a non-standard location, and with a very
few hacks, can even eliminate the -R compiled-in search paths and create
a build entirely managed by LD_LIBRARY_PATH.
It would help if you explained better what bug you see in handling the
--with-ssl arguement, and I think we could resolve this easily. If the
issue is that openssl.pc is not processed correctly by httpd or not
created correctly by openssl.org, then we can fix either defect.
Re: Linking mod_ssl with a specific OpenSSL version
Posted by Ben Laurie <be...@links.org>.
On Wed, Aug 8, 2012 at 5:03 PM, Joe Orton <jo...@redhat.com> wrote:
> On Wed, Aug 08, 2012 at 08:00:25AM +0200, Kaspar Brand wrote:
>> My thinking was that people should explicitly tell configure that they
>> want to link with the libs in a build directory (so that they don't
>> "accidentally" use a directory which might only temporarily exist -
>> that's also the primary reason for preferring the static over the shared
>> libs from that dir).
>
> This all seems totally crazy to me. Why are we adding complexity to the
> httpd build system so openssl devs can skip typing the " install" part
> of running "make install" when testing against modified versions of
> OpenSSL? Joe
IIRC, the issue is that it doesn't build correctly even if you do that
(to a non-standard location - and clearly installing to a standard
location is nuts).
The only extra complexity introduced by allowing a dev to skip "make
install" is that the lib is in <base> instead of <base>/lib.
Re: Linking mod_ssl with a specific OpenSSL version
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 8/8/2012 9:03 AM, Joe Orton wrote:
> On Wed, Aug 08, 2012 at 08:00:25AM +0200, Kaspar Brand wrote:
>> My thinking was that people should explicitly tell configure that they
>> want to link with the libs in a build directory (so that they don't
>> "accidentally" use a directory which might only temporarily exist -
>> that's also the primary reason for preferring the static over the shared
>> libs from that dir).
>
> This all seems totally crazy to me. Why are we adding complexity to the
> httpd build system so openssl devs can skip typing the " install" part
> of running "make install" when testing against modified versions of
> OpenSSL? Joe
I concur.
If lib devs wish to use a build tree, it should not be that hard to
properly craft the right symlinks for an 'install in place' model
used for rapid development.
I agree with Ben that this is desireable, but httpd is not the place
to solve it. openssl.pc can describe such an environment in a useful
manner for developers and solve the entire issue in the lib package.
Re: Linking mod_ssl with a specific OpenSSL version
Posted by Noel Butler <no...@ausics.net>.
On Wed, 2012-08-08 at 17:03 +0100, Joe Orton wrote:
> On Wed, Aug 08, 2012 at 08:00:25AM +0200, Kaspar Brand wrote:
> > My thinking was that people should explicitly tell configure that they
> > want to link with the libs in a build directory (so that they don't
> > "accidentally" use a directory which might only temporarily exist -
> > that's also the primary reason for preferring the static over the shared
> > libs from that dir).
>
> This all seems totally crazy to me. Why are we adding complexity to the
> httpd build system so openssl devs can skip typing the " install" part
> of running "make install" when testing against modified versions of
> OpenSSL? Joe
+1
Re: Linking mod_ssl with a specific OpenSSL version
Posted by Joe Orton <jo...@redhat.com>.
On Wed, Aug 08, 2012 at 08:00:25AM +0200, Kaspar Brand wrote:
> My thinking was that people should explicitly tell configure that they
> want to link with the libs in a build directory (so that they don't
> "accidentally" use a directory which might only temporarily exist -
> that's also the primary reason for preferring the static over the shared
> libs from that dir).
This all seems totally crazy to me. Why are we adding complexity to the
httpd build system so openssl devs can skip typing the " install" part
of running "make install" when testing against modified versions of
OpenSSL? Joe