User avatar
Gert van Loo
Posts: 2482
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Stretch missing QT4 runtime libraries

Fri Jan 12, 2018 1:22 pm

I received a complaint that my SW is no longer working:

error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory

I compared /usr/lib in stretch and and jessie and yes! in stretch the qt4 libs have disappeared.
I had not noticed that, because I developed QT 4.8 software on stretch.
Turns out that if you install the QT4 development SW apt-get installs the runtime libraries.

But that solution is not acceptable for normal use.
For now I have put the most important QT4 libraries on a website with instruction how to download, unpack and install them.
But it completely invalidates all the effort I have put in to make my product 'run out of the box'.
That effort was already heavily jeopardized by the decision to steal the UART for bluetooth.
(And NO, enabling the UART using the GUI interfaces tab does NOT work!)

So I do not agree with the statement that
"The differences between Jessie and Stretch are mostly under-the-hood optimisations, and you really shouldn’t notice any differences in day-to-day use of the desktop and applications."
How can that be if you remove support for a whole class of applications....

Any chance of correcting that?
Also it would be nice to have a 'really, really enable UART' in the interfaces tab.

User avatar
topguy
Posts: 5685
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Stretch missing QT4 runtime libraries

Fri Jan 12, 2018 2:04 pm

Debian says that the file you refers to exist in this package: https://packages.debian.org/stretch/libqtgui4
Are you sure you just cant install just that package (and its dependencies)? You dont need full Qt4 developer setup.
But it completely invalidates all the effort I have put in to make my product 'run out of the box'.
If you want this then your software should be distributed as a deb-package and correctly refer to the dependency packages you need. Then those will be downloaded and installed automatically.

User avatar
Gert van Loo
Posts: 2482
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Stretch missing QT4 runtime libraries

Fri Jan 12, 2018 8:06 pm

Thank you for the link. I asked at stack exchange but did not get a reply.
I will update my web page to tell user to use "sudo apt-get install libqtgui4"

Is there a command to list all possible packages?
something like: "apt-get list -all"
Then I could have found that package myself using something like "apt-get list -all | grep -i qt"

I don't know how to debianise my sw but I will try to hire somebody to do it for me.

Now if only the UART problem could be solved so easy.

User avatar
topguy
Posts: 5685
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Stretch missing QT4 runtime libraries

Fri Jan 12, 2018 8:40 pm

Code: Select all

apt-cache search something
Is a nice command to search for packages, but you can get a lot oh hits so I often do more filtering with grep.

There is another command ( dpkg -S /path/tofile ) that can tell you which package a file belongs to, but that require that the file is already installed.

Also a tip, if you want to know exactly all missing libraries for a binary use the command "ldd program".
When you run your program you will only get an error for the first library not found. Then you install that and try again and then find that another library is missing and so on and so on.

User avatar
Gert van Loo
Posts: 2482
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Stretch missing QT4 runtime libraries

Fri Jan 12, 2018 8:58 pm

so I often do more filtering with grep.
As per my remark in the post: "apt-get list -all | grep -i qt" :-)
if you want to know exactly all missing libraries for a binary use the command "ldd program".
I know and used that one. In this case it only worked partially. My program was running but all the icons on the buttons where missing.
I ran it again on the PC in side the Microsoft development environment.
That showed that Qt was using plug-ins for the graphics. (On Linux it silently decided NOT to show my icons.)
I therefore also added the graphics plugins: /usr/lib/arm-linux-gnueabihf/qt4/plugins/imageformats/*
I am looking forward to see if the debian package generate would know about the plugins?

Return to “Raspbian”