Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Find out which library is causing "Cannot mix incompatible Qt library"



  • Hello,

    I have been fighting with this message:
    "Cannot mix incompatible Qt library (version 0x50d01) with this library (version 0x50d02)"
    after updating all qt packages. I compiled the individual packages found here:
    http://download.qt.io/official_releases/qt/5.13/5.13.2/submodules/

    I do not see any old version libQt5*.so file on my system.

    I have been reading the forums but cannot find an answer.
    I have tried setting QT_PLUGINS_DEBUG and inspected the output.
    I have run ldd on the executable (goldendict) but neither helps me to figure out what is wrong.
    Is there a way to determine which file is causing this message?

    Thank you for any help.



  • @JonB Hi,

    Thank you for your help. I figured out what went wrong. I compiled the packages with the old libraries and development headers still installed. Apparently somehow this confused the resulting libraries. I have uninstalled the developement packages while re-compiling and the resulting libraries work.

    To go back to your suggestions and the recommendations i found in the forum:
    I had already inspected the output from
    ldd,
    running with the QT_DEBUG_PLUGINS=1
    I grepped through the output from strace.
    And I ran the binary under gdb
    all of those did not help me to track down the culprit

    It would be very helpful if the error message contained more information:
    An exception occurred while loading /usr/lib64/qt5/plugins/XXX.so
    Cannot mix incompatible ...
    From reading the web forums I believe this change would help more users.

    Also I did not find a clear description on the web in which order one is supposed to compile the individual modules in order to get a fully functional QT5 environment.

    Still problem seems to be solved,

    Sacha


  • Qt Champions 2017

    Do you have two versions of Qt installed on your system ? Did you copy the shared libraries from somewhere else ?



  • @dheerendra

    I have only one version installed and I compiled the packages locally before installing. All libraries listed by ldd are from version 5.13.2.

    The error would be much more helpful if it would list the file in which version 0x50d01 is found. Can I use grep to find out the offending library?


  • Lifetime Qt Champion

    Then maybe a plugin is loading a wrong library - try with QT_DEBUG_PLUGINS=1 as env var.



  • @Christian-Ehrlicher
    OP says he has done that.

    @Sacha-Hony
    You might post the output from ldd, and from QT_PLUGINS_DEBUG, in case someone else spots something. If it's not too voluminous....

    You might run your app under strace, if you're lucky the last library you see it load might be the offending one....

    You might uninstall your Qt completely, check your machine for any remaining Qt libraries anywhere, then reinstall.

    grep is not going to help you here, as you're looking for some binary bytes in binaries,

    I don't know whether Qt actually stores its version number as any recognisable "resource" on the library files, like you might on Windows. We'd need something like that to do a search.

    From a search your goldendict looks like it was last Qt 5.5-ish 6 years ago, that might not be great against latest Qt?



  • @JonB Hi,

    Thank you for your help. I figured out what went wrong. I compiled the packages with the old libraries and development headers still installed. Apparently somehow this confused the resulting libraries. I have uninstalled the developement packages while re-compiling and the resulting libraries work.

    To go back to your suggestions and the recommendations i found in the forum:
    I had already inspected the output from
    ldd,
    running with the QT_DEBUG_PLUGINS=1
    I grepped through the output from strace.
    And I ran the binary under gdb
    all of those did not help me to track down the culprit

    It would be very helpful if the error message contained more information:
    An exception occurred while loading /usr/lib64/qt5/plugins/XXX.so
    Cannot mix incompatible ...
    From reading the web forums I believe this change would help more users.

    Also I did not find a clear description on the web in which order one is supposed to compile the individual modules in order to get a fully functional QT5 environment.

    Still problem seems to be solved,

    Sacha



  • @Sacha-Hony said in Find out which library is causing "Cannot mix incompatible Qt library":

    seems to be solved,

    so please don't forget to mark your post as such! Thanks.


Log in to reply