This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Using two versions of Qt?

Tags: None
(comma "," separated)
bolenti
Registered Member
Posts
18
Karma
0
OS

Using two versions of Qt?

Fri Oct 16, 2009 5:52 am
Hello,

I'm wondering if it is possible to install two different versions of Qt on the same Linux machine. If yes, how should I set my environment?

The purpose of this question is that I have compiled KDE 4.3.2 against some version of Qt (< 4.6) and now I want to compile kdewebkit and Arora using Qt 4.6 version which I read had "some very significant improvements to QtWebKit".

Thanks,
bolenti
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using two versions of Qt?

Fri Oct 16, 2009 6:25 am
It is possible to use two different versions of KDE on the same system. You need to compile Qt yourself and install it in a seperate prefix however, then set the following environment variables for applications you wish to use the updated Qt.

Code: Select all
export QTDIR="/path/to/new/qt/"
export PATH="${QTDIR}/bin:${PATH}"
export LD_LIBRARY_PATH="${QTDIR}/lib"
export CMAKE_PREFIX_PATH="${QTDIR}"
export PKG_CONFIG_PATH="${QTDIR}/lib/pkgconfig"


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
bolenti
Registered Member
Posts
18
Karma
0
OS

Re: Using two versions of Qt?

Fri Oct 16, 2009 8:34 am
In fact if i set the environment variables as stated above, all the system will be affected. I need to change these variables only for the two applications I want to compile with Qt 4.6 (Arora and kdewebkit). Is this possible? If yes how?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using two versions of Qt?

Fri Oct 16, 2009 8:55 am
Yes it is possible. You just set the variables when building Arora / kdewebkit and when you wish to run them. When you set variables in a terminal it only affects that terminal and applications spawned by it, not any other processes.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
bolenti
Registered Member
Posts
18
Karma
0
OS

Re: Using two versions of Qt?

Fri Oct 16, 2009 9:15 am
Cool. KDE 4.3.2 is really great and the forum too.

Thanks for the response.

bolenti
warnec
Registered Member
Posts
96
Karma
0

Re: Using two versions of Qt?

Sat Oct 24, 2009 9:15 am
So if I want to compile
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using two versions of Qt?

Sat Oct 24, 2009 9:23 am
Part of your posting has appeared to have been chopped off. Can you please edit the post to contain its entirety?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
warnec
Registered Member
Posts
96
Karma
0

Re: Using two versions of Qt?

Sat Oct 24, 2009 1:59 pm
Yep, apparently something went wrong ;)

My original message was:

So if I want to compile Arora with qt 4.6, would I simply need this package?:

http://aur.archlinux.org/packages.php?ID=30289

Note: it's not really a package itself, it installs as a package but is a script in fact (see PKGBUILD file) for Archlinux for downloading qt 4.6 stable branch from git and installing it to /opt.

So what I would need to do, is simply download Arora source code, then specify the right $PATH (something like /opt/qt4.6/ propably) like seen here:
http://groups.google.com/group/arora-de ... d2b7724f6f

compile it, and that's it? Would this also make Arora use the QtWebKit from qt 4.6?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using two versions of Qt?

Sat Oct 24, 2009 7:25 pm
That package definitely sounds like it will do the job.

You should only need to set $PATH and $LD_LIBRARY_PATH to make it use Qt4.6.

Code: Select all
export PATH=/opt/qt4.6/bin:$PATH
export LD_LIBRARY_PATH=/op/qt4.6/lib:$LD_LIBRARY_PATH


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
warnec
Registered Member
Posts
96
Karma
0

Re: Using two versions of Qt?

Sun Oct 25, 2009 8:05 pm
Thanks a lot. Will try it out.

BTW, will this also make Arora use latest QtWebKit? Is it included into qt 4.6, or is it a separate branch?

Another question - I've got 3.9GB free space on my root partition. Is it enough to store the downloaded the source, build, and then install it?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using two versions of Qt?

Sun Oct 25, 2009 8:19 pm
3.9GB should be enough, on my system the Qt build directory uses 1.7GB


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
warnec
Registered Member
Posts
96
Karma
0

Re: Using two versions of Qt?

Sun Oct 25, 2009 9:00 pm
Ok, that's good. I'm planning to enlarge my / partition anyway.

How about the QtWebKit question? Will Arora use it, or do I need a package like this:

http://aur.archlinux.org/packages.php?ID=28644

With PKGBUILD edited to link to /opt/qt4.6 ?

I love Archlinux for those user-made unoffcial package scripts ;)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using two versions of Qt?

Mon Oct 26, 2009 5:46 am
Arora will use it as long as you set LD_LIBRARY_PATH to /opt/qt4.6/lib ( where_you_install_qt4.6/lib )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
warnec
Registered Member
Posts
96
Karma
0

Re: Using two versions of Qt?

Fri Dec 04, 2009 4:46 pm
Doesn't work for me, see here :

http://bbs.archlinux.org/viewtopic.php?id=86149
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Using two versions of Qt?

Fri Dec 04, 2009 7:53 pm
Run 'which qmake' and post its output please.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]