In Linux Mint 17.2 (i.e. Ubuntu 14.04), how to make qt 5.4 as the default qt5 library version of programs? - linux

I install the latest qt version from the official website http://www.qt.io/qt5-4/ successfully. I follow this tutorial http://sysads.co.uk/2014/05/install-qt-5-3-ubuntu-14-04 and install the qt 5.4 version. Besides, I have the Ubuntu repository version of qt 5.2.1 installed.
Now I want to make the default version of 5.4 due to a program can't work well in the old qt5 version. That is to say, when I start a program which need to use qt5 library the program will use the version 5.4 rather than the version qt 5.2. Though I have installed the version 5.4 and 5.2, the program still use qt 5.2 version.
I try to use qtchooser to choose the 5.4 version as the default option, however, the program installed in the system still use the qt 5.2 library.
I endeavor to modify the related files regarding qtchooser, nothing changes.

If the library version is not in some regular repository, I would strongly suggest not relying on the user to install it somehow from an "unofficial" install location. Or provide a package for the library version yourself to install alongside your application. But don't replace the system Qt version. That would be Bad®.
Instead, either compile your program with a specific rpath, or wrap your program in scripts that use something like LD_PRELOAD and/or LD_LIBRARY_PATH to load the library version you're shipping in your application package.
Both ways are clunky, and I would try to at least work around the Qt version bug if at all possible.

The latest Qt version (non-alpha) actually is Qt 5.5.
If you install it through the installer provided by Qt, you should change the default Qt version by editing/creating:
/etc/xdg/qtchooser/default.conf
which should contain first the bin directory, then the lib directory, for example:
/opt/Qt/5.5/gcc_64/bin
/opt/Qt/5.5/gcc_64/lib
At least this works for the qmake version. Otherwise you might need to change LD_LIBRARY_PATH as commented by rubenvb.

Related

New C++ GPP device in RedHawk2.0

The release notes for RedHawk 2.0 say that the GPP device previously written in Python has been replaced with one written in "Written in C++, so it is more responsive". But I find it still running in Python (according to ps command python is running GPP.py, and the $SDRROOT/dev/devices/GPP/GPP.spd.xml which also has softpkg version="1.10.0". Was my installation defective and I still have parts of the 1.10 runtime system? My IDE says 2.0.
It sounds like REDHAWK 2.0 was not properly installed on your system, the IDE and the framework/assets are separate and it is possible to get into a situation with conflicting versions depending on the installation steps taken.
Determining what version of REDHAWK you have installed can be determined in a handful of ways. If you installed via yum or rpm you can check the versions of the rpms installed with:
rpm -qa | grep -i redhawk
The redhawk package, and redhawk-ide package should both be at 2.0. Note that the REDHAWK assets are versioned independently.
If you installed via source, you can use the package config files to obtain version information. The framework keeps it's pc files in $OSSIEHOME/lib64/pkgconfig:
cat $OSSIEHOME/lib64/pkgconfig/ossie.pc
Will print out version information for the core framework installed. Depending on what is installed, there are pc files for the framework, bulkio, frontend, and burstio.
I am sorry. The GPP-2.0.0-3.el6.x86_64 DOES contain an ELF executable for GPP device. But the rpm does not install unless I manually erase the GPP-1.10 pkg. Until erased yum says "nothing to do" for some reason. I saw the source code in GPP-debuginfo but did not notice the executable in GPP-2.0.0 since it was all caps and looked like the directory.

Qt5 on Linux - where is Linguist?

I'm using Linux Mint 16 and I got a problem.
I installed Qt Creator 5.2.1 from binary package, downloaded from Qt site. I don't have Qt Linguist... Also, I have installed qtcreator and qt5-dev-tools (or similar name) from repository, still no Linguist. Where I can download it?
I prefer binary version from Qt site because it's newer than version from repository.
It should be in the bin folder. You can always do this to figure it out:
find $installdir/ -name \*linguist\*
By the way, there is also another option: install Archlinux and get all the fancy latest stuff. ;-)

How to upgrade Qt installed in linux from one version to higher

While porting Qt project from windows to linux(ubuntu) i faced with the following issue:
on windows Qt version 4.8.1 is installed
on linux 4.6.3 in which some functionalities availiable in higer version 4.8.1 don`t yet implemented (ex. QUdpSocket::joinMultiCastGroup).
I see only one solution to this problem: upgrade Qt version on linux to 4.8.1.
How can I do this?
On linux I got installed libqt4-dev, qmake.
Solved: I changed repository from squeeze (stable) to wheezy(testing), in wheezy latest Qt version is 4.8.1, which is perfectly suits my needs.
Using package manager I found package libqt4-dev and selected it for update.
That is all, the whole process took 5 minutes.
Disadvantages:
- As I run Debian on Virtual Box after changing repository I had to reinstall guest additions
- wheezy is less stable than squeeze (I haven`t faced yet with stablilty problem)
I guess you can use Upgrade option in the Qt Creator.
Or you can download latest version from Download Qt, the cross-platform application framework
Or you could try to update using something like apt-get install(upgrade) libqt4-dev if you using Debian based system.
This depends on the distro you are using. If there are binary packages for your distro you can update through your package manager. Otherwise you have to download the source of your prefered Qt version and build it yourself.
I'm not sure if this will help in your situation, but you can download the Qt Online Installer at the following link:
https://www.qt.io/download-qt-installer

Installing Qt on Linux (Debian distribution)

I have Qt 4.6.3 on Debian. I need version 4.8.1.
To install it I downloaded the Qt SDK 1.2.1 from the Qt site, where is said that it contains version 4.8.1
After installation I checked Qt version and it is 4.6.3 instead of expected 4.8.1.
What I am doing wrong? And how can I install 4.8.1?
First of all I recommend getting 'official' Debian Qt upgrades by adding the testing (wheezy) repo to your package manager, this way everything on your system will be updated seamlessly in a few clicks.
If you can't do this, then:
Use your package manager to uninstall the existing Qt installation (so that's the runtime libs, plugins, and Qt Creator).
Install the SDK anywhere you like, it installs under one folder anyway.
Update your $PATH to point to the directory with qtcreator, qmake, etc., there are numerous ways of doing this, the simplest is exporting the updated $PATH in your .bashrc. (And optionally make some nice shortcuts for your DE).
Create symlinks in /usr/lib (or /usr/lib64) to point to the Qt libraries the SDK provides, or add a qt.conf file containing the path in your /etc/ld.conf.so.d/ directory and run ldconfig as root.
I'm an openSUSE user myself, so some of the above may slightly different on Debian, hopefully someone with Debian experience can chime in if I'm incorrect.

Qt version is invalid

I am working on Linux and I have installed Qt Creator 2.5.2, Qt libraries 4.7.4 and 4.4.3 all from sources. I cannot install the binaries directly for incompatibility between versions. The installation processes for both Qt 4.7.4 and Qt 4.4.3 were the same. The issue I am facing is that Qt Creator recognizes Qt 4.7.4 but not Qt 4.4.3, with the error
The Qt version is invalid : Could not determine the path to the
binaries of the Qt installation, maybe the path is wrong.
Well each library is installed in /home/$username/qt/Qt-$version. When I manually compile a project with
cd directory
/home/$username/qt/Qt-4.4.3/qmake $PATHPRO
make
Everything work as a charm and I can run the app.
What did I tried?
Recompile Qt-4.4.3
Check the folder permissions
Restart Qt Creator
Smash my head on my desktop
Any thoughts? The OS is SUSE Enterprise 11-32bits.
Problem solved :D.
QtCreator find libraries by using some qmake properties. It query for these properties by executing the command qmake -query. The issue was that none of these variables were set in the Qt 4.4.3 library while they were present in the Qt 4.7.4 library.
So the solution is to set the properties using
home/$username/qt/Qt-4.4.3/bin/qmake -set VARIABLE VALUE
where value is usually a path to a directory
Variables in 4.7.4:
QT_INSTALL_PREFIX: home/$username/qt/Qt-4.7.4/
QT_INSTALL_DATA:
QT_INSTALL_DOCS:
QT_INSTALL_HEADERS:
QT_INSTALL_LIBS:
QT_INSTALL_BINS:
QT_INSTALL_PLUGINS:
QT_INSTALL_IMPORTS:
QT_INSTALL_TRANSLATIONS:
QT_INSTALL_CONFIGURATION:
QT_INSTALL_EXAMPLES:
QT_INSTALL_DEMOS:
QMAKE_MKSPECS:
QMAKE_VERSION:2.01a
QT_VERSION:4.7.4
I think the most important are QT_INSTALL_LIBS, QT_INSTALL_LIBS and QT_VERSION.
see configuring qmake environment.

Resources