[Development] qt 4/5 co-installs

Jonathan Riddell jriddell at ubuntu.com
Wed Jun 27 10:48:01 CEST 2012


On 27 June 2012 06:12, Girish Ramakrishnan <girish at forwardbias.in> wrote:
> My reasoning for renaming tools and libraries was relatively
> straightforward: They are not backward compatible and thus shouldn't
> be given the same since Qt4 and Qt5 will have to live together for a
> long time. Qt4 and Qt5 should be able to exist in user's PATH
> simultaneously.
>
>> But I don't see why the libraries need to be renamed. The sonames are different
>> already. Most development software does not support installing the development
>> files of two different major versions at the same time, in the same prefix.
>>
>
> Is that true? gtk2 and gtk3 seems to reside together on my ubuntu 12.04.
>
> As you say, one solution is to have distros package the Qt4 and Qt5
> libs with different prefix as /usr/lib/qt4 and /usr/lib/qt5. Certainly
> makes it easy for us but I guess there is a reason why all libs are
> stuck under /usr/lib ?

As Thiago says it's pretty normal for libraries to keep the same names
in different versions, the changed SONAME allows for the runtime bits
both to be installed at the same time.  It's the development files
which can't be installed together, but that's not unusual.

However gtk2 & 3 do differ in the actual library name
/usr/lib/i386-linux-gnu/libgdk-3.so -> libgdk-3.so.0.504.0
/usr/lib/i386-linux-gnu/libgdk-x11-2.0.so -> libgdk-x11-2.0.so.0.2400.10

so changing library names is also not uncommon and allows for
developer environments to be co-installed.  The tools are more
important because this makes packaging fiddly.  The runtime plugin
environment variable $QT_PLUGIN_PATH is most important because the
runtime libraries should be co-installable.

Libraries need to be in /usr/lib so that they can be found, if they're
in a directory not in the known load library path they can't be loaded
when programmes that need them get run.

Jonathan



More information about the Development mailing list