Re: gdb/head build, --with-python=<path to working python> FAILs @ "no usable python found " ?

Christian Biesinger via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAPTJ0XE0YSEB4F8Qm_MvTOXgdCdzajwkXXrn3ALRU539QPN=yA@mail.gmail.com>
Yes, Python 3 is known to work, though Python 2.7 is also supported.

Questions:
- What does gdb/config.log say?
- Do you also have the headers and libraries installed?
- Just to confirm,  /usr/local/pyenv/versions/3.8-dev/bin/python3.8 is the
binary and not a directory, right?

Christian

On Wed, Mar 25, 2020 at 4:51 PM PGNet Dev via Gdb <[email protected]>
wrote:

> with a local/non-distro python 3.8 installed, via pyenv,
>
>         pyenv global
>                 3.8-dev
>         pyenv which python3.8
>                 /usr/local/pyenv/versions/3.8-dev/bin/python3.8
>         python3.8 -V
>                 Python 3.8.2+
>         python3.8 -c "import sys; print('\n'.join(sys.path))"
>                 /usr/local/pyenv/versions/3.8-dev/lib/python38.zip
>                 /usr/local/pyenv/versions/3.8-dev/lib/python3.8
>                 /usr/local/pyenv/versions/3.8-dev/lib/python3.8/lib-dynload
>
> /usr/local/pyenv/versions/3.8-dev/lib/python3.8/site-packages
>
> building GDB head
>
>         git clone git://sourceware.org/git/binutils-gdb.git
>         cd binutils-gdb
>         git log | head
>                 commit 33aa3c10f663b834c9573ede439b2df3c92f0cfe
>                 Author: Tom Tromey <[email protected]>
>                 Date:   Wed Mar 25 10:26:38 2020 -0600
>
>             Fix error message in compile-object-load.c
>                 ...
>
>         ./configure \
>          --prefix=/usr/local/gdb \
>          --with-python=/usr/local/pyenv/versions/3.8-dev/bin/python3.8
>
>                 ...
>                 configure: creating ./config.status
>                 config.status: creating Makefile
>
> fails @ make, "no usable python found",
>
>         make V=1
>
>                 ...
>                 checking whether to use MPFR... auto
>                 checking for libmpfr... yes
>                 checking how to link with libmpfr... -lmpfr -lgmp
>                 checking whether to use python...
> /usr/local/pyenv/versions/3.8-dev/bin/python3.8
>                 checking for python... no
>                 configure: error: no usable python found at
> /usr/local/pyenv/versions/3.8-dev/bin/python3.8
>                 make[1]: *** [Makefile:11664: configure-gdb] Error 1
>                 make[1]: Leaving directory '/usr/local/src/binutils-gdb'
>                 make: *** [Makefile:854: all] Error 2
>
> In gdb src, the find-python code's a bit challenging to wade through, and
> possibly (?) outdated -- as I still see multiple references to EOL'd python
> 2.7x .
>
>
> IS gdb/head from upstream known to work with python3?
>
> what is the correct config for sufficiently spec'ing a local python
> install?
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.