mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] gdb python support
@ 2018-02-22 19:05 Jon Ringle
  2018-02-22 20:34 ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Ringle @ 2018-02-22 19:05 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 5986 bytes --]

In building the OSELAS.Toolchain 2018.02.0 for arm-v5te, I noticed that the
resulting cross-gdb didn't have python support in it. I'm a bit perplexed
on how this is:

~/oselas/OSELAS.Toolchain-2018.02.0$ readelf -d
/opt/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/bin/arm-v5te-linux-gnueabi-gdb
|grep python
1 ~/oselas/OSELAS.Toolchain-2018.02.0$

1) I built on ubuntu 14.04

2) ~/oselas/OSELAS.Toolchain-2018.02.0$ ll p
lrwxrwxrwx 1 jringle-admin jringle-admin 44 Feb 18 09:41 p ->
/usr/local/lib/ptxdist-2018.02.0/bin/ptxdist*

3) I have `python-dev` package installed

4) rules/cross-gdb.make has the following, but I do not have
CROSS_GDB_WITHOUT_PYTHON set at all in my environment:

# define this from the outside to build without python
ifeq ($(CROSS_GDB_WITHOUT_PYTHON),y)
CROSS_GDB_CONF_OPT += --without-python
else
CROSS_GDB_CONF_OPT += --with-python=python3
endif

5)
The platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/logfile
contains the following output showing that `--without-python` is set (see
the very last option):

-------------------------
target: cross-gdb.prepare
-------------------------

ptxdist: executing:
PATH=/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/inst/opt/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/bin:/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/inst/opt/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sbin:\/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-host/lib/wrapper:/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-host/bin:/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-host/sbin:/usr/local/lib/ptxdist-2018.02.0/bin:/home/jringle-admin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/OSELAS.Toolchain-2016.06.1/arm-v5te-linux-gnueabi/gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.9-sanitized/bin:/opt/CodeSourcery/Sourcery_G++_Lite/bin
PKGCONFIG_WHITELIST='bash-completion botan-1.10 compositeproto damageproto
dbus-python dri2proto fixesproto fontutil glproto gnome-icon-theme gtk-doc
inputproto iso-codes kbproto libpq libquvi-scripts m17n-db
mobile-broadband-provider-info pm-utils pygtksourceview-2.0 randrproto
renderproto ripperX scrnsaverproto shared-desktop-ontologies
shared-mime-info udev usbutils valgrind wayland-scanner xbitmaps xextproto
xf86vidmodeproto xineramaproto xkbcomp xkeyboard-config xorg-sgml-doctools
xproto xtrans yelp-xsl bash-completion botan-1.10 compositeproto
damageproto dbus-python dri2proto fixesproto fontutil glproto
gnome-icon-theme gtk-doc inputproto iso-codes kbproto libpq libquvi-scripts
m17n-db mobile-broadband-provider-info pm-utils pygtksourceview-2.0
randrproto renderproto ripperX scrnsaverproto shared-desktop-ontologies
shared-mime-info udev usbutils valgrind wayland-scanner xbitmaps xextproto
xf86vidmodeproto xineramaproto xkbcomp xkeyboard-config xorg-sgml-doctools
xproto xtrans yelp-xsl bash-completion botan-1.10 compositeproto
damageproto dbus-python dri2proto fixesproto fontutil glproto
gnome-icon-theme gtk-doc inputproto iso-codes kbproto libpq libquvi-scripts
m17n-db mobile-broadband-provider-info pm-utils pygtksourceview-2.0
randrproto renderproto ripperX scrnsaverproto shared-desktop-ontologies
shared-mime-info udev usbutils valgrind wayland-scanner xbitmaps xextproto
xf86vidmodeproto xineramaproto xkbcomp xkeyboard-config xorg-sgml-doctools
xproto xtrans yelp-xsl' PKGCONFIG_WHITELIST_SRC='cross-gdb'
PKG_CONFIG_LIBDIR='/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-host/lib/pkgconfig:/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-host/share/pkgconfig'
SYSROOT='/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/inst/opt/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized'
V=0 VERBOSE= PTXDIST_ICECC= enable_option_checking=fatal
enable_maintainer_mode=no enable_static=no CC="gcc" CXX="g++"
PKG_CONFIG_PATH=''
PKG_CONFIG_LIBDIR='/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-host/lib/pkgconfig:/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-host/share/pkgconfig'
PYTHONPATH="/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-host/lib/python2.7/site-packages"
./configure --build=x86_64-host-linux-gnu --host=x86_64-host-linux-gnu
--target=arm-v5te-linux-gnueabi
--prefix=""/opt"/"OSELAS.Toolchain-2018.02.0"/arm-v5te-linux-gnueabi/"gcc-"7.3.1"-glibc-"2.27"-binutils-"2.30"-kernel-"4.15""-sanitized"""
--with-build-sysroot=/home/jringle-admin/oselas/OSELAS.Toolchain-2018.02.0/inst/opt/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v5te-linux-gnueabi
--with-sysroot=/opt/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v5te-linux-gnueabi
--disable-werror --enable-tui --with-expat --without-python


How else could the `--without-python` option be getting set?

[-- Attachment #1.2: Type: text/html, Size: 6480 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] gdb python support
  2018-02-22 19:05 [ptxdist] gdb python support Jon Ringle
@ 2018-02-22 20:34 ` Michael Olbrich
  2018-02-22 20:57   ` Jon Ringle
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2018-02-22 20:34 UTC (permalink / raw)
  To: ptxdist

Hi,

On Thu, Feb 22, 2018 at 02:05:03PM -0500, Jon Ringle wrote:
> In building the OSELAS.Toolchain 2018.02.0 for arm-v5te, I noticed that the
> resulting cross-gdb didn't have python support in it. I'm a bit perplexed
> on how this is:
> 
> ~/oselas/OSELAS.Toolchain-2018.02.0$ readelf -d
> /opt/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/bin/arm-v5te-linux-gnueabi-gdb
> |grep python
> 1 ~/oselas/OSELAS.Toolchain-2018.02.0$
> 
> 1) I built on ubuntu 14.04
> 
> 2) ~/oselas/OSELAS.Toolchain-2018.02.0$ ll p
> lrwxrwxrwx 1 jringle-admin jringle-admin 44 Feb 18 09:41 p ->
> /usr/local/lib/ptxdist-2018.02.0/bin/ptxdist*
> 
> 3) I have `python-dev` package installed

This should probably be python3-dev

> 4) rules/cross-gdb.make has the following, but I do not have
> CROSS_GDB_WITHOUT_PYTHON set at all in my environment:

Are you using build_all_v2.mk or build_one.sh? Then
CROSS_GDB_WITHOUT_PYTHON is set to 'y' by default.

Michael

> # define this from the outside to build without python
> ifeq ($(CROSS_GDB_WITHOUT_PYTHON),y)
> CROSS_GDB_CONF_OPT += --without-python
> else
> CROSS_GDB_CONF_OPT += --with-python=python3
> endif
> 
> 5)
> The platform-arm-v5te-linux-gnueabi-gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/logfile
> contains the following output showing that `--without-python` is set (see
> the very last option):
[...]

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] gdb python support
  2018-02-22 20:34 ` Michael Olbrich
@ 2018-02-22 20:57   ` Jon Ringle
  2018-02-22 22:10     ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Ringle @ 2018-02-22 20:57 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 952 bytes --]

On Thu, Feb 22, 2018 at 3:34 PM, Michael Olbrich <m.olbrich@pengutronix.de>
wrote:

> Hi,
>
> On Thu, Feb 22, 2018 at 02:05:03PM -0500, Jon Ringle wrote:
> > 3) I have `python-dev` package installed
>
> This should probably be python3-dev
>
> Ok


> > 4) rules/cross-gdb.make has the following, but I do not have
> > CROSS_GDB_WITHOUT_PYTHON set at all in my environment:
>
> Are you using build_all_v2.mk or build_one.sh? Then
> CROSS_GDB_WITHOUT_PYTHON is set to 'y' by default.
>
>
Ok. I see that there now. It would be nice if this default was consistent.
Reading the `cross-gdb.make` it appears that the default is with python,
but the `build_all_v2.mk` has the default the opposite. Can we pick a
default and stick to it?

Also. At this point, do I need to rebuild my whole toolchain again to get a
cross-gdb with python support, or can I get away with just doing:
$ ./p clean cross-gdb
$ CROSS_GDB_WITHOUT_PYTHON=n ./build_one.sh arm-v5te

-Jon

[-- Attachment #1.2: Type: text/html, Size: 1715 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] gdb python support
  2018-02-22 20:57   ` Jon Ringle
@ 2018-02-22 22:10     ` Michael Olbrich
  2018-02-23 14:20       ` Jon Ringle
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2018-02-22 22:10 UTC (permalink / raw)
  To: ptxdist

On Thu, Feb 22, 2018 at 03:57:32PM -0500, Jon Ringle wrote:
> On Thu, Feb 22, 2018 at 3:34 PM, Michael Olbrich <m.olbrich@pengutronix.de>
> wrote:
> 
> > Hi,
> >
> > On Thu, Feb 22, 2018 at 02:05:03PM -0500, Jon Ringle wrote:
> > > 3) I have `python-dev` package installed
> >
> > This should probably be python3-dev
> >
> > Ok
> 
> 
> > > 4) rules/cross-gdb.make has the following, but I do not have
> > > CROSS_GDB_WITHOUT_PYTHON set at all in my environment:
> >
> > Are you using build_all_v2.mk or build_one.sh? Then
> > CROSS_GDB_WITHOUT_PYTHON is set to 'y' by default.
> >
> >
> Ok. I see that there now. It would be nice if this default was consistent.
> Reading the `cross-gdb.make` it appears that the default is with python,
> but the `build_all_v2.mk` has the default the opposite. Can we pick a
> default and stick to it?

It's just a hack from a long time ago when the dependency handling was
broken. I just never bothered to change this. Patches are welcome.

> Also. At this point, do I need to rebuild my whole toolchain again to get a
> cross-gdb with python support, or can I get away with just doing:
> $ ./p clean cross-gdb
> $ CROSS_GDB_WITHOUT_PYTHON=n ./build_one.sh arm-v5te

That works just fine.

Michael


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] gdb python support
  2018-02-22 22:10     ` Michael Olbrich
@ 2018-02-23 14:20       ` Jon Ringle
  2018-02-23 14:24         ` Tim Sander
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Ringle @ 2018-02-23 14:20 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1086 bytes --]

>
> > > > 4) rules/cross-gdb.make has the following, but I do not have
> > > > CROSS_GDB_WITHOUT_PYTHON set at all in my environment:
> > >
> > > Are you using build_all_v2.mk or build_one.sh? Then
> > > CROSS_GDB_WITHOUT_PYTHON is set to 'y' by default.
> > >
> > >
> > Ok. I see that there now. It would be nice if this default was
> consistent.
> > Reading the `cross-gdb.make` it appears that the default is with python,
> > but the `build_all_v2.mk` has the default the opposite. Can we pick a
> > default and stick to it?
>
> It's just a hack from a long time ago when the dependency handling was
> broken. I just never bothered to change this. Patches are welcome.
>
>
I'd be happy to create a patch. Which way is preferable?
1) default --without-python and require an "opt-in" for
--with-python=python3
or
2) default --with-python=python3 and require an "opt-out" for
--without-python

If 1) is preferred, is it ok to rename CROSS_GDB_WITHOUT_PYTHON =>
CROSS_GDB_WITH_PYTHON?
The reason is that we'd want the non-existence of the env variable to be
applied as the default

-Jon

[-- Attachment #1.2: Type: text/html, Size: 5410 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] gdb python support
  2018-02-23 14:20       ` Jon Ringle
@ 2018-02-23 14:24         ` Tim Sander
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Sander @ 2018-02-23 14:24 UTC (permalink / raw)
  To: ptxdist

Hi Jon

Am Freitag, 23. Februar 2018, 09:20:57 CET schrieb Jon Ringle:
> > > > > 4) rules/cross-gdb.make has the following, but I do not have
> > > > 
> > > > > CROSS_GDB_WITHOUT_PYTHON set at all in my environment:
> > > > Are you using build_all_v2.mk or build_one.sh? Then
> > > > CROSS_GDB_WITHOUT_PYTHON is set to 'y' by default.
> > > 
> > > Ok. I see that there now. It would be nice if this default was
> > 
> > consistent.
> > 
> > > Reading the `cross-gdb.make` it appears that the default is with python,
> > > but the `build_all_v2.mk` has the default the opposite. Can we pick a
> > > default and stick to it?
> > 
> > It's just a hack from a long time ago when the dependency handling was
> > broken. I just never bothered to change this. Patches are welcome.
> 
> I'd be happy to create a patch. Which way is preferable?
> 1) default --without-python and require an "opt-in" for
> --with-python=python3
> or
> 2) default --with-python=python3 and require an "opt-out" for
> --without-python
I would really prefer if no python would be opt out. Given that python 
scripting gets more and more important with gdb.

Best regards
Tim

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-23 14:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22 19:05 [ptxdist] gdb python support Jon Ringle
2018-02-22 20:34 ` Michael Olbrich
2018-02-22 20:57   ` Jon Ringle
2018-02-22 22:10     ` Michael Olbrich
2018-02-23 14:20       ` Jon Ringle
2018-02-23 14:24         ` Tim Sander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox