PDA

View Full Version : Qt4.7 and GDB probems



theunsheydenrych
22nd March 2012, 14:24
HI, i have read in some forums that gdb 7+ is not compatible with Qt.
Is this still the case?
If so how do i get a gdb version that works with Qt4.7 on Ubuntu Natty (11.04)

I have build a shared library in Qt4.7
When compiling a gui app that uses this shared libary, i get the following error:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"

Sometimes i get this error:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"
~/dev/cpp/symgen/SymgenAPITest-build-desktop/SymgenAPITest: error while loading shared libraries: libSymgenAPI.so.1: cannot open shared object file: No such file or directory

The debugger works (does hit breakpoints) in qt when i debug a normal gui application, but gives this in the application output:

Debugging starts
&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"

Or is my problem more that the shared library is not found by the application, during debugging?
If thats the case how do i fix that?
I did create a Qt.conf file like this post suggest http://www.qtcentre.org/threads/26506-amp-quot-warning-GDB-Failed-to-set-controlling-terminal-Invalid-argument%5Cn-quot?p=160614#post160614
but still i get the errors above, and here is it again:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"
~/dev/cpp/symgen/SymgenAPITest-build-desktop/SymgenAPITest: error while loading shared libraries: libSymgenAPI.so.1: cannot open shared object file: No such file or directory

Any help will be highly appreciated

HI, i have read in some forums that gdb 7+ is not compatible with Qt.
Is this still the case?
If so how do i get a gdb version that works with Qt4.7 on Ubuntu Natty (11.04)

I have build a shared library in Qt4.7
When compiling a gui app that uses this shared libary, i get the following error:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"

Sometimes i get this error:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"
~/dev/cpp/symgen/SymgenAPITest-build-desktop/SymgenAPITest: error while loading shared libraries: libSymgenAPI.so.1: cannot open shared object file: No such file or directory

The debugger works (does hit breakpoints) in qt when i debug a normal gui application, but gives this in the application output:

Debugging starts
&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"

Or is my problem more that the shared library is not found by the application, during debugging?
If thats the case how do i fix that?
I did create a Qt.conf file like this post suggest http://www.qtcentre.org/threads/26506-amp-quot-warning-GDB-Failed-to-set-controlling-terminal-Invalid-argument%5Cn-quot?p=160614#post160614
but still i get the errors above, and here is it again:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"
~/dev/cpp/symgen/SymgenAPITest-build-desktop/SymgenAPITest: error while loading shared libraries: libSymgenAPI.so.1: cannot open shared object file: No such file or directory

Any help will be highly appreciated

HI, i have read in some forums that gdb 7+ is not compatible with Qt.
Is this still the case?
If so how do i get a gdb version that works with Qt4.7 on Ubuntu Natty (11.04)

I have build a shared library in Qt4.7
When compiling a gui app that uses this shared libary, i get the following error:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"

Sometimes i get this error:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"
~/dev/cpp/symgen/SymgenAPITest-build-desktop/SymgenAPITest: error while loading shared libraries: libSymgenAPI.so.1: cannot open shared object file: No such file or directory

The debugger works (does hit breakpoints) in qt when i debug a normal gui application, but gives this in the application output:

Debugging starts
&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"

Or is my problem more that the shared library is not found by the application, during debugging?
If thats the case how do i fix that?
I did create a Qt.conf file like this post suggest http://www.qtcentre.org/threads/26506-amp-quot-warning-GDB-Failed-to-set-controlling-terminal-Invalid-argument%5Cn-quot?p=160614#post160614
but still i get the errors above, and here is it again:

&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"
~/dev/cpp/symgen/SymgenAPITest-build-desktop/SymgenAPITest: error while loading shared libraries: libSymgenAPI.so.1: cannot open shared object file: No such file or directory

Any help will be highly appreciated

Added after 1 32 minutes:

HI, after playing around with ldconfig, i figured out that the libSymgenAPI.so.1 is not a symbolic link, after i corrected that i could run

sudo ldconfig -v and the chache for ldconfig was updated and libSymgenAPI.so.1 was part of it.
So the Qt.conf file in /etc/ld.so.conf.d/ directory did work for me, according to this post http://www.qtcentre.org/threads/2650...614#post160614
BUt i had to execute the ldconfig -v command for qt to get the shared library at runtime.

So the error:

~/dev/cpp/symgen/SymgenAPITest-build-desktop/SymgenAPITest: error while loading shared libraries: libSymgenAPI.so.1: cannot open shared object file: No such file or directory
is sorted out.

The error

Debugging starts
&"warning: GDB: Failed to set controlling terminal: Invalid argument\n"
still remains?

ChrisW67
23rd March 2012, 00:48
"Qt.conf" probably failed because:

The file name should be "qt.conf"
Qt only looks in the locations specified in the documentation and "/etc/ld.so.conf.d/" is certainly not one of those places.
qt.conf has nothing to do with the files in that location anyway.


The "/etc/ld.so.conf.d/" directory is a mechanism to adjust the system library path. You should generally not stuff about with the system library path to get code you are developing to find its own dev libraries: use LD_LIBRARY_PATH in the environment. This is especially true if you share the dev machine with others.

I am quite happily using gdb 7.3.1. The gdb warning regarding the terminal is just that, a warning, and has no discernible negative effect for me.

theunsheydenrych
23rd March 2012, 06:04
Thank you for the reply.

I understand also the more about the usages for qt.conf.
I set the LD_LIBRARY_PATH in the projects run environment settings and it works, it finds the shared library at runtime.

Thanks again.