Results 1 to 3 of 3

Thread: Qt4.7 and GDB probems

  1. #1
    Join Date
    Mar 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt4.7 and GDB probems

    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/2650...614#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/2650...614#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/2650...614#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
    Qt Code:
    1. sudo ldconfig -v
    To copy to clipboard, switch view to plain text mode 
    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?
    Last edited by theunsheydenrych; 22nd March 2012 at 14:22.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt4.7 and GDB probems

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

  3. #3
    Join Date
    Mar 2012
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt4.7 and GDB probems

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.