Comment 15 for bug 155784

Revision history for this message
Thorvald Natvig (slicer) wrote :

This is the reply from Trolltech:

Hi Thorvald,

On Saturday, 27. Oct 2007 18:44 <email address hidden> wrote:
[snip]
> > Short description:
> > QSslSocket fails because libssl.so isn't found
> >
> > What I did:
> > Compiled a program using QSslSocket
[snip]
> > What I got instead:
> > QSslSocket: cannot find ssl library: QLibrary::load_sys: Cannot load
> > ssl (....)
> >
> > More info:
> > Any program using the new QSslSocket will fail on Ubuntu 7.10 unless
> > it has libssl-dev installed. This is a development pacakge and as such
> > should not be necesarry for normal operation.
> >
> > The reason for this is that Qt uses dlopen() on "libssl.so" at
> > runtime. libssl.so is a symlink, and this symlink is provided by the
> > development package. There's been discussion about this on the Ubuntu
> > bugtracker (https://bugs.launchpad.net/bugs/155784) and their
> > conclusion is that it's a bug in Qt that it opens libssl.so instead of
> > libssl.so.0.9.8
> >
> > I just checked, and a similar situation exists on RHEL5; the
> > "libssl.so" symlink is provided by the dev package.

Thank you for your report. Indeed, the libssl.so symlink is only
provided by the development package. I believe this is in accordance
with the unix convention.

Thus, we should pass the major version number of the OpenSSL library
when trying to resolve it. QLibrary already supports loading libraries
based on major version:

 http://doc.trolltech.com/4.3/qlibrary.html#QLibrary-3

However, I also believe that by unix convention, the base libarary
package should provde the following symlinks:

libssl.so.0
libssl.so.0.9

I cannot see that the base library package provides these, so I believe
this is a bug in the base OpenSSL library package.

Qt should not have to specify the entire version as this will force us
to rely on a particular patch version of the OpenSSL library, which may
be rather limiting. Instead, only the major version should be needed,
as minor and patch releases should be binary compatible with the major
version.

So if we fix the resiolving of the OpenSSL library to include the major
version number, the vendor of the base OpenSSL library package needs to
provide the conventional symlinks.

I have passed the informtion on to our development team. I created task
185864 in the process, and you can use this ID to follow the status of
the task online at:

 http://www.trolltech.com/developer/task-tracker

In the meantime, the workarounds are to create the conventional
symlinks, including libssl.so, or create the conventional symlinks and
modify the source to use the major version number for the OpenSSL
library. This is done in qsslsocket_openssl_symbols.cpp (QLibrary
libssl(QLatin1String("ssl")) etc.).

Thank you for bringing this to our attention. Have a nice day!

Kind regards,

Stian Thomassen, Support Engineer
Trolltech ASA, Norway