View Full Version : "Cannot mix incompatible Qt library" error
tetelee
03-13-2010, 01:11 PM
Hi everyone,
I am running Qt4.6 on both Scratchbox and My N900 (at least I believe I have installed it on both of them). However, when I transfer my binary to the device and run it, I got such a message:
"Cannot mix incompatible Qt library (version 0x40503) with this library (version 0x40602)". I found this thread which had similiary problem as me: http://talk.maemo.org/showthread.php?t=40562 . However, I don't quite understand the reply. At least my question now is: which library is 0x40503? The one the binary stated to use or the one the device is using?
I also tried "ldd name-of-my-app" on the device but there is neither version 0x40503 nor 0x40602.
How can I fix it? Thanks for help!
Cheers
Andre Klapper
03-13-2010, 01:54 PM
Just guessing, but 0x40503 is maybe 4.5.3 and 0x40602 is maybe 4.6.2?
Sure that you don't have *also* Qt4.5 installed in parallel and accidentially linked against it when compiling?
Qt 4.5 and Qt 4.6 are not binary compatible...
tetelee
03-13-2010, 03:10 PM
Andre,
Thanks for your reply. That is also my guessing. And I checked the packages installed on the device, it seems that there are quite many qt4.5 packages. However, I don't know how to remove them and install qt4.6. On the tutorial I am only supposed to install libqt4-maemo5-gui. But I still can't have all 4.6 packages (for example D-Bus module). And I followed the instruction on here: http://aloogobi.nl/blog/2009/10/qt4-6-for-maemo-5/, but no luck.
Does any one know how to remove qt4.5 and install qt4.6 on the device? Thanks!
Andre Klapper
03-13-2010, 03:51 PM
So you used some ancient (October) 3rd party packages for qt...
I'd rather go here: http://wiki.maemo.org/Qt
VDVsx
03-13-2010, 04:46 PM
This happens because you compiled your application against a specific version that is only partially available on the device, here's a example:
Your app depends on Qt-Gui(4.6) and Qt-dbus(4.6) because you linked against Qt 4.6, but on the device you only have Qt-Gui(4.6) and Qt-dbus(4.5), so the system complains about the mix.
So don't remove Qt 4.5 because so stuff need it, just install Qt 4.6.
SDK:
apt-get install libqt4-maemo5-*
Device:
libqt4-maemo5-gui
libqt4-maemo5-maemo5
HTH
tetelee
03-14-2010, 08:30 AM
VDVsx,
Thanks. Now it is working. I installed manually the corresponding packages of version 4.6, for example, Qt-dbus, Qt-network. I was hoping to get a whole package of every modules but could find such thing. This "libqt4-maemo5-maemo5" is not a package there. Or I thought if I installed one module, other ones should have been installed because of dependencies, however they didn't get installed automatically.
krk969
03-14-2010, 09:06 AM
..... I was hoping to get a whole package of every modules but could find such thing. This "libqt4-maemo5-maemo5" is not a package there. Or I thought if I installed one module, other ones should have been installed because of dependencies, however they didn't get installed automatically.
you could try
apt-get install libqt4-maemo5*
or try installing one of the packages that has a lot of dependencies
like
apt-get install libqt4-maemo5-dev
to list the dependencies of maemo5-dev for example
apt-cache showpkg libqt4-maemo5-dev
VDVsx
03-14-2010, 11:02 AM
VDVsx,
Thanks. Now it is working. I installed manually the corresponding packages of version 4.6, for example, Qt-dbus, Qt-network. I was hoping to get a whole package of every modules but could find such thing. This "libqt4-maemo5-maemo5" is not a package there. Or I thought if I installed one module, other ones should have been installed because of dependencies, however they didn't get installed automatically.
Humm, I've "libqt4-maemo5-maemo5":
[sbox-FREMANTLE_ARMEL: ~] > apt-cache search libqt4-maemo5-maemo5
libqt4-maemo5-maemo5-dbg - Qt 4 library debugging symbols
libqt4-maemo5-maemo5 - Qt 4 Maemo5 module
Probably you need to run "apt-get update"
tetelee
03-14-2010, 11:38 AM
krk969 and VDVsx,
I meant the packages on the device. My scratchbox had 4.6 but on the device only had qt-core and qt-gui of 4.6. So there is no dev package for the device. And there seemed not to be wildcard install. I had to install every single one manually :(.
tetelee
03-14-2010, 11:40 AM
And VDVsx, there is libqt4-maemo5-maemo5 after "apt-get update"
krk969
03-15-2010, 06:04 AM
.... And there seemed not to be wildcard install. I had to install every single one manually :(.
did you try what i mentioned above ?
apt-get install libqt4-maemo5*
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.