4 Replies Latest reply on Sep 30, 2015 2:32 PM by dorono

    Cannot debug Qt application under Linux

    codexllll

      In CodeXL 1.8.9654 under Linux it's not possible to debug Qt applications because your init script overrides the LD_LIBRARY_PATH to be your current CodeXL path. GDB, as a sub-process, inherits this variable and wants to start my application with wrong libraries.

       

      This is problematic, since you use an „A” version of Qt, but if I don't use exactly that version, errors are popping up, like this one:

       

      $> LD_LIBRARY_PATH=/usr/local/AMD_CodeXL_Linux/:$LD_LIBRARY_PATH ./MyProgram

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Widgets.so.5: no version information available (required by ./MyProgram)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Qml.so.5: no version information available (required by ./MyProgram)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Quick.so.5: no version information available (required by ./MyProgram)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by ./MyProgram)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by ./MyProgram)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Gui.so.5: no version information available (required by ./MyProgram)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Gui.so.5: no version information available (required by libMyProgram.so.1)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by libMyProgram.so.1)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by libMyProgram.so.1)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5OpenGL.so.5: no version information available (required by /usr/local/lib/libopencv_highgui.so.3.0)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by /usr/local/lib/libopencv_highgui.so.3.0)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by /usr/local/lib/libopencv_highgui.so.3.0)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Gui.so.5: no version information available (required by /usr/local/lib/libopencv_highgui.so.3.0)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Widgets.so.5: no version information available (required by /usr/local/lib/libopencv_highgui.so.3.0)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by /usr/lib64/libQt5Test.so.5)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by /usr/lib64/libQt5Test.so.5)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by /usr/lib64/libQt5Concurrent.so.5)

      ./MyProgram: /usr/local/AMD_CodeXL_Linux/libQt5Core.so.5: no version information available (required by /usr/lib64/libQt5Concurrent.so.5)

      ./MyProgram: relocation error: /usr/lib64/libQt5Concurrent.so.5: symbol qt_version_tag, version Qt_5.5 not defined in file libQt5Core.so.5 with link time reference

       

      Since I cannot start my program inside CodeXL, but CodeXL also won't start with other versions Qt, please don't use the LD_LIBRARY_PATH „solution” in order to start your application with your version of Qt. Instead I would suggest using RUNPATH with ORIGIN processing, like this one at linking time: LDFLAGS="-Wl,-rpath,'\$\$ORIGIN' -Wl,-z,origin".