After upgrading my Linux Mint installation to the current 18.3 (Sylvia) release I also wanted to check if QtCreator still works. I took the offline installer from
and run it as before on Linux Mint 17.1:
However, I could run the harmattan-postinstall.sh from the command line without errors so I just selected Ignore and the installation finished successfully.
When the installer is run with sudo some folders are created under $HOME/.config and $HOME/.local that are owned by root and will generate “permission denied” errors. So before invoking QtCreator the ownership should be fixed..
$ sudo chown -R $USER:$USER $HOME/.config $HOME/.local
There are some libraries that rely on libjpeg62 that is not available by default. So let’s install the required version.
$ sudo apt-get install libjpeg62
Another issue is that the help contents are missing. If I select Tools>Help>Documentation I will get an empty list:
However, all the help files (.pch) are in the installation folder (/opt/QtSdk/Documentation in my case) so I can add them by clicking the Add… button.
Now if I select Help>Contents I can browse the documentation.
The last issue I encountered was in the debugger. The debugger couldn’t display Qt variable contents (e.g. QString value). QtCreator is relying on gdb python bindings to display the variable values. The gdb that is bundled with Linux Mint 18.3 (gdb version 7.11.1) is compiled with python3 support but QtCreator only supports python v2. You can check the python version with the commands:
$ gdb (gdb) python print(sys.version)
I solved this issue simply by fetching the gdb sources and recompiling. The source code repositories can be enabled by selecting “Software Sources” from the Administration menu and then checking “Enable source code repositories”. I will install gdb under /opt/gdb.
$ sudo apt install ncurses-dev python-dev $ sudo apt install dpkg-dev texinfo $ apt source gdb $ export MAKEINFO=makeinfo $ cd gdb-7.11.1/ $ ./configure -with-separate-debug-dir=/usr/lib/debug --prefix=/opt/gdb $ make -j 4 $ sudo make install
As a final step I will replace the original gdb with a symbolic link to the new one.
# mv /usr/bin/gdb /usr/bin/gdb.orig # ln -s /opt/gdb/bin/gdb /usr/bin/gdb
After this the gdb should show python v2.
$ gdb (gdb) python print sys.version 2.7.12 (default, Dec 4 2017, 14:50:18)
And the debugger should work as before.