cancel
Showing results for 
Search instead for 
Did you mean: 

CodeXL

codexllll
Adept II

Cannot debug Qt application under Linux

Jump to solution

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".

Tags (3)
0 Likes
Reply
1 Solution

Accepted Solutions
dorono
Staff
Staff

Re: Cannot debug Qt application under Linux

Jump to solution

Hi,

Thanks for this report. This is indeed annoying, although easy to work around.

It will be fixed in the next CodeXL release.

Doron

View solution in original post

0 Likes
Reply
4 Replies
codexllll
Adept II

Re: Cannot debug Qt application under Linux

Jump to solution

Please, don't just approve this post, but also move it to its normal location (CodeXL). Or let me do that.

0 Likes
Reply
codexllll
Adept II

Re: Cannot debug Qt application under Linux

Jump to solution

If you suffer from this bug, the solution is simple, after all, fortunately. In Debug Settings > General > Environment variables set „LD_LIBRARY_PATH” to „/usr/lib64/” which invalidates CodeXL's own override.

0 Likes
Reply
pinform
Staff
Staff

Re: Cannot debug Qt application under Linux

Jump to solution

Approved and moved. Happy posting!

0 Likes
Reply
dorono
Staff
Staff

Re: Cannot debug Qt application under Linux

Jump to solution

Hi,

Thanks for this report. This is indeed annoying, although easy to work around.

It will be fixed in the next CodeXL release.

Doron

View solution in original post

0 Likes
Reply