Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [SOLVED] The selected build of GDB does not support Python scripting. It cannot be used in Qt Creator.

    General and Desktop
    ubuntu debugger gdb python
    2
    5
    11663
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ratzz
      Ratzz last edited by Ratzz

      I am using Linux(Ubuntu 10.04) . i configured QT5.5 (qt-opensource-linux-x86-5.5.0.run) . When i create any new sample project my debugger was finishing without debugging. then i followed this link and found minimal supported version is GDB 7.5 using Python version 2.7, or 3.3, or newer. so I installed gdb-7.10.tar.xz . Then i got the following error.

      The selected build of GDB does not support Python scripting.
      It cannot be used in Qt Creator.
      

      So i installed Python (Python-3.4.3.tar.xz) . I found versions as shown below.

      root@user-desktop:/home/user# gdb --version
      GNU gdb (GDB) 7.10
      Copyright (C) 2015 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 "i686-pc-linux-gnu".
      Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      <http://www.gnu.org/software/gdb/bugs/>.
      Find the GDB manual and other documentation resources online at:
      <http://www.gnu.org/software/gdb/documentation/>.
      For help, type "help".
      Type "apropos word" to search for commands related to "word".
      root@user-desktop:/home/user# python --version
      Python 3.4.3
      

      Still i get the same same error (The selected build..........)
      I followed this link . I still had doubt on the version so i used this to find out .

      root@rathan-desktop:/usr/local/bin/gdb# (gdb) python (print sys.version)
      bash: syntax error near unexpected token `python'
      and same for (gdb) python print sys.version
      

      The advise here prefixing with python did not install gdb at /usr/local/gdb-python2/bin/gdb

      ./configure --prefix /usr/local/gdb-python2 --with-python
      make
      make install
      

      If i install using ./configure and make i get gdb at /usr/local/bin/gdb.

      Previous python version was 2.6.5 . Did i do mistake by installing 3.4.3 ?
      how can i configure debugger now ? why advise here did not work?

      --Alles ist gut.

      1 Reply Last reply Reply Quote 0
      • K
        kuzulis Qt Champions 2020 last edited by

        You can take the build script from here: http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/dist/gdb to build of GDB.

        1 Reply Last reply Reply Quote 0
        • Ratzz
          Ratzz last edited by

          @kuzulis
          Thanks for the reply.
          I am newbie to Linux . I am not aware how to run such file.
          I created a new file and copied the Makefile.linux content and renamed file to makefile.
          I then ran the makefile using three methods.

          root@user-desktop:/home/user/Downloads# -rw-r--r-- Makefile 
          Could not find platform independent libraries <prefix>
          Could not find platform dependent libraries <exec_prefix>
          Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
          Fatal Python error: Py_Initialize: Unable to get the locale encoding
          ImportError: No module named 'encodings'
          Aborted
          root@user-desktop:/home/user/Downloads# chmod +x Makefile 
          root@user-desktop:/home/user/Downloads# ./Makefile 
          ./Makefile: line 3: i686-unknown-linux-gnu: command not found
          uname: extra operand `sed'
          Try `uname --help' for more information.
          ./Makefile: line 10: addprefix: command not found
          : command not found: 
          : command not found: allpackage
          : command not found: 
          : command not found: clean
          : command not found: 
          : command not found: makesourcedir
          ./Makefile: line 19: @test: command not found
          : command not found: 
          : command not found: maketargetdir
          ./Makefile: line 22: @test: command not found
          : command not found: 
          : command not found: makestagingdir
          ./Makefile: line 25: @test: command not found
          : command not found: 
          .tar.gz: No such file or directoryDownloads
          : No such file or directoryome/user/Downloads
          Downloading expat...
          : command not found: 
          : command not found: 
          .tgz: No such file or directoryan/Downloads
          : No such file or directoryome/user/Downloads
          Downloading python...
          : command not found: 
          : command not found: 
          .tar.xz: No such file or directoryDownloads
          : No such file or directoryome/user/Downloads
          Downloading gdb...
          : command not found: 
          --2015-09-12 10:19:50--  http://gdb-7.9%0D.tar.xz/
          Resolving gdb-7.9\r.tar.xz... failed: Name or service not known.
          wget: unable to resolve host address `gdb-7.9\r.tar.xz'
          --2015-09-12 10:19:50--  http://httpftp.gnu.orggnugdbgdb-7.9%0Da.tar.xz/
          Resolving httpftp.gnu.orggnugdbgdb-7.9\ra.tar.xz... failed: Name or service not known.
          wget: unable to resolve host address `httpftp.gnu.orggnugdbgdb-7.9\ra.tar.xz'
          : command not found: 
          liblibexpat.a: No such file or directoryads
          : No such file or directoryome/user/Downloads
          Extracting expat...
          : command not found: 
          tar: /home/user/Downloads\rsource\rexpat-2.1.0\r.tar.gz: Cannot open: No such file or directory
          tar: Error is not recoverable: exiting now
          ./Makefile: line 50: .configure: command not found
          : command not found: 
          .a: No such file or directorythan/Downloads
          : No such file or directoryome/user/Downloads
          Extracting python...
          : command not found: 
          tar: /home/user/Downloads\rsource\rPython-2.7\r.tgz: Cannot open: No such file or directory
          tar: Error is not recoverable: exiting now
          : No such file or directorython-2.7
          ./Makefile: line 57: export: `-lm': not a valid identifier
          ./Makefile: line 58: .configure: command not found
          : command not found: 
          pyconfig.h: No such file or directorynloads
          cp: cannot stat `/home/user/Downloads\rstaging\rlibpython2.7\r': No such file or directory
          cp: cannot stat `/home/user/Downloads\rstaging\rincludepython2.7\rpyconfig.h': No such file or directory
          : command not found: 
          configure: No such file or directorywnloads
          : No such file or directoryome/user/Downloads
          Extracting gdb...
          : command not found: 
          tar: /home/user/Downloads\rsource\rgdb-7.9\r.tar.xz: Cannot open: No such file or directory
          tar: Error is not recoverable: exiting now
          : No such file or directoryb-7.9
          : command not found: 
          : command not found: 
          ./Makefile: line 72: test: too many arguments
          : command not found: 
          : command not found: 
          ./Makefile: line 75: export: `-pthread': not a valid identifier
          ./Makefile: line 75: export: `-lm': not a valid identifier
          -$: No such file or directorye/user/Downloads
          configure: No such file or directorywnloads
          ./Makefile: line 78: --disable-werror: command not found
          ./Makefile: line 79: sleep: command not found
          ./Makefile: line 80: MAKEFLAGS+=-j1: command not found
          ./Makefile: line 81: strip: command not found
          : command not found: 
          ./Makefile: line 83: package: command not found
          ./Makefile: line 84: mv: command not found
          Packing...
          ./Makefile: line 86: tar: command not found
          ./Makefile: line 87: mv: command not found
          

          The downloads folder now have three files named "q" , "gdb.-tar.xz " and "configure".
          How to run such file? should i download the file seperately and run again??

          --Alles ist gut.

          1 Reply Last reply Reply Quote 0
          • K
            kuzulis Qt Champions 2020 last edited by kuzulis

            I don't know, I used this script on Windows only. Maybe you can update GDB from your Ubuntu repository, as option.

            Ratzz 1 Reply Last reply Reply Quote 0
            • Ratzz
              Ratzz @kuzulis last edited by

              @kuzulis
              I downloaded the versions of gdb and python as mentioned in the script you mentioned . now my project is working fine. I used this link to install gdb .

              --Alles ist gut.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post