Qt World Summit: Submit your Presentation

Linux Library Mess

  • Hello everyone,

    I’m trying to solve a run time issue. After seeking on the web, I’am still stucked.

    I’m working in a corporate managed linux environment (RedHat 7.0). (I can’t install neither manage my environment. I can only select pre-installed applications and set env. vars.)

    I’ve tried selecting both QT 5.11.1 and 5.14.0 without succeeding at making it work.

    Project compiles, but at run time I got this error:

    …: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by … exited with code 1

    Looking at the lib version present in /lib64, I actually found the latest version of GLIBCXX being 3.4.19 instead of 3.4.21

    strings /lib64/libstdc++.so.6 | grep GLIB


    I’ve tried to cancel all the references to /lib64 in LD_LIBRARY_PATH and a couple of env. vars without any effect.

    I’ve just managed to got it to work in Build: Debug and Run Mode (by setting the Kit using gcc 8.20 instead of the default gcc of the corporate env.). Even in this case, I got the same error when I try to start a debug session…

    I can't figure-out where this library incoherency comes from and how to solve this.
    Any help or hints would be greatly appreciated.

    Thank’s in advance.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    From the looks of it you are using prebuilt packages that used a more recent release of your system.

    Either use the originally Qt provided with that release or build your own copy of the version of Qt you want to use.

  • Thank's for your answear.

    I've noticed that the same binary is running (Build Mode : Debug Then Run), and the crash occurs only at the start of the gdb debug session (Build Mode : Debug Then Start Debuging). Don't you think this is more a gdb related issue?( Playing with he different version of gdb available on the system (this is a corporate lsf env) I could'nt manage to start a debug session))

    Kind regards

  • Lifetime Qt Champion

    How is your machine setup ?
    Where does gdb come from ?
    How was Qt installed ?

  • We are using remote connections on linux machines in a compute farm. I have no control on the way OS neither applications are installed. As any logged-in user, I can invoke applications to be set in my environment, by choosing only the version of the tool, through a utility that allows you to just select the version of a pre-installed software.

    In the past, using RedHat6.x, I used QT 5.6.3. It was compiling and running fine, but default gdb version (/bin/gdb) crashes. I had to force gdb 7.9 in the QtCreator Kit settings, and then debug worked fine.

    Now updgrading the tools to redhat:enterprise_linux:7.9, I'm falling into the same issue. I've chosen QT 5.11.1, and all works excepted that gdb crashes right from the start of the debug session. But this time, no way to overcome this playing with gdb versions. Got the message : Cannot mix incompatible Qt library (version 0x50907) with this library (version 0x50b01)
    Playing with gcc version, I got a the slightly different message I posted at the top of this thread.

    Thank's for your help

  • Lifetime Qt Champion

    It looks like you are linking two different sets of Qt libraries what happens if you call ldd on your application ?

  • Hi SGAist,
    Here below it is. Nothing wrong for me, but not sure:

    ldd myApp
    linux-vdso.so.1 => (0x00007fffa40c8000)
    libQt5Widgets.so.5 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libQt5Widgets.so.5 (0x00002b4c0a90a000)
    libQt5Gui.so.5 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libQt5Gui.so.5 (0x00002b4c0b14e000)
    libQt5Core.so.5 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libQt5Core.so.5 (0x00002b4c0b94a000)
    libGL.so.1 => /lib64/libGL.so.1 (0x00002b4c0c0a4000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b4c0c330000)
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00002b4c0c54c000)
    libm.so.6 => /lib64/libm.so.6 (0x00002b4c0c854000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b4c0cb56000)
    libc.so.6 => /lib64/libc.so.6 (0x00002b4c0cd6c000)
    libz.so.1 => /lib64/libz.so.1 (0x00002b4c0d13a000)
    libicui18n.so.56 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libicui18n.so.56 (0x00002b4c0d350000)
    libicuuc.so.56 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libicuuc.so.56 (0x00002b4c0d7e9000)
    libicudata.so.56 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libicudata.so.56 (0x00002b4c0dba1000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00002b4c0f584000)
    libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00002b4c0f788000)
    libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00002b4c0f98a000)
    /lib64/ld-linux-x86-64.so.2 (0x00002b4c0a6e6000)
    libGLX.so.0 => /lib64/libGLX.so.0 (0x00002b4c0fca0000)
    libX11.so.6 => /lib64/libX11.so.6 (0x00002b4c0fed2000)
    libXext.so.6 => /lib64/libXext.so.6 (0x00002b4c10210000)
    libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00002b4c10422000)
    libpcre.so.1 => /lib64/libpcre.so.1 (0x00002b4c106d8000)
    libxcb.so.1 => /lib64/libxcb.so.1 (0x00002b4c1093a000)
    libXau.so.6 => /lib64/libXau.so.6 (0x00002b4c10b62000)

    ldd myApp | grep qt
    libQt5Widgets.so.5 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libQt5Widgets.so.5 (0x00002b4b0bd84000)
    libQt5Gui.so.5 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libQt5Gui.so.5 (0x00002b4b0c5c8000)
    libQt5Core.so.5 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libQt5Core.so.5 (0x00002b4b0cdc4000)
    libicui18n.so.56 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libicui18n.so.56 (0x00002b4b0e7ca000)
    libicuuc.so.56 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libicuuc.so.56 (0x00002b4b0ec63000)
    libicudata.so.56 => /sw/freetools/qt/5.11.1/rh70_64/5.11.1/gcc_64/lib/libicudata.so.56 (0x00002b4b0f01b000)

  • Lifetime Qt Champion

    What if you start gdb directly from the command line ?

  • I forgot to mention that gdb is well alive.

    GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-redhat-linux-gnu".
    For bug reporting instructions, please see:

    There's a message at qtcreator startup that I have'nt considered. It seems to be a usual one not related to Qt:
    (qtcreator:45145): dbind-WARNING **: 12:06:00.552: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-weLonQnAOp: Connection refused

  • Lifetime Qt Champion

    Silly question, are you sure you have only one gdb on the system ?

Log in to reply