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

Creator quit working...



  • ...and I have no idea what change I made to cause it.

    Instr-55:~$ qtcreator
    qtcreator: relocation error: /home/mzimmers/Qt/5.14.2/gcc_64/lib/libQt5XcbQpa.so.5: symbol _ZN22QWindowSystemInterface24setPlatformFiltersEventsEb version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference
    Instr-55:~$
    

    A web search on this didn't reveal much -- similar reports seem to have been caused by missing 3rd party libraries, but I have no such 3rd party. Can someone tell me what happened here, and what the remedy is? Thanks...


  • Lifetime Qt Champion

    Hi,

    Calling Qt Creator raises a question, are you using the one from your system ?
    If not, did you alter the PATH environment variable ?
    Did you modify the LD_LIBRARY_PATH environment variable ?



  • @SGaist said in Creator quit working...:

    Hi,
    Calling Qt Creator raises a question, are you using the one from your system ?

    Yes:

    Instr-55:~/Qt$ which qtcreator
    /home/mzimmers/Qt/Tools/QtCreator/bin/qtcreator
    Instr-55:~/Qt$
    

    If not, did you alter the PATH environment variable ?

    Yes; here's the end of my PATH:

    /home/mzimmers/Qt/Tools/QtCreator/bin:/home/mzimmers/Qt/5.14.2/gcc_64/bin
    

    Did you modify the LD_LIBRARY_PATH environment variable ?

    Yes...all Qt users here do. From a startup file:

    if [ -d "$QT_GCC/lib" ] ; then
        export LD_LIBRARY_PATH="$QT_GCC/lib:$LD_LIBRARY_PATH"
    fi
    

    Resulting in:

    Instr-55:~/Qt$ env | grep LD_
    LD_LIBRARY_PATH=/home/mzimmers/Qt/5.14.2/gcc_64/lib:
    Instr-55:~/Qt$
    

    Thanks...


  • Lifetime Qt Champion

    Then there's your issue, Qt Creator gets to load the Qt version from the pre-built package rather than the one it was deployed with.

    Why are you modifying your LD_LIBRARY_PATH like that ?



  • @SGaist I was just following the example in this company's instructions. They may be unnecessary or incorrect, though Creator was running up until earlier today.

    Our wiki advises to add this to our .profile files:

    QT_VERSION=5.14.2
    QT_ROOT=$HOME/Qt$QT_VERSION
    QT_GCC=$QT_ROOT/gcc_64
    export QT_QML_DEBUG=1
    
    # QT is installed in this specific user's directory
    if [ -d "$QT_ROOT/Tools/QtCreator/bin" ] ; then
        PATH="$QT_ROOT/Tools/QtCreator/bin:$PATH"
    fi
    if [ -d "$QT_GCC" ] ; then
        export CMAKE_PREFIX_PATH="$QT_GCC"
    fi
    if [ -d "$QT_GCC/lib" ] ; then
        export LD_LIBRARY_PATH="$QT_GCC/lib:$LD_LIBRARY_PATH"
    fi
    

    Does this seem incorrect to you?

    Also, I didn't understand this:

    Qt Creator gets to load the Qt version from the pre-built package rather than the one it was deployed with

    Thanks...


  • Lifetime Qt Champion

    On Linux libraries are searched in a specific order. The paths from LD_LIBRARY_PATH, are searched before the others.

    IIRC, there's a script in the bin folder of Qt Creator to launch it so that it ensures the current folder is searched before so the version used for deployment are correctly loaded before any other in the system.



  • Ah yes, that would be the qtcreator.sh file. So it appears that we should use this instead of manually modifying LD_LIBRARY_PATH, yes?


  • Lifetime Qt Champion

    I currently don't see the use of modifying the LD_LIBRARY_PATH in your case unless there's some linking/loading issue with the application when you use the command line.

    If only using Qt Creator there's even less reason for doing that since Qt Creator does the work for you through the Kit you use to develop your application.



  • @SGaist good enough...thanks for the help. The key was using that shell script instead of directly invoking the binary.


Log in to reply