public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2] gcc-runtime: Move gdb pretty printer file to auto-load location
Date: Sat, 03 Feb 2024 07:53:02 +0000	[thread overview]
Message-ID: <8fbde10440b97a7d1fae483c192b9d17c450124d.camel@linuxfoundation.org> (raw)
In-Reply-To: <CAMKF1sonSbNt3bsxBznXXTxEErULs57op81VSbyx_dHB2kPZzg@mail.gmail.com>

On Fri, 2024-02-02 at 16:23 -0800, Khem Raj wrote:
> On Fri, Feb 2, 2024 at 2:58 PM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > 
> > On Tue, 2024-01-30 at 08:20 -0800, Khem Raj wrote:
> > > When debugging a C++ program on target using libcstdc++, gdb does not
> > > find the pretty printer python support, this is because the init file is
> > > installed into /usr/lib which is excluded from gdb's default list of
> > > directories to load config's from, where as defaults to load from
> > > datadir is still on, it therefore does not load this file
> > > 
> > > warning: File "/usr/lib/libstdc++.so.6.0.33-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
> > > 
> > > This leaves the libstdc++ pretty-printers disabled even though added via
> > > IMAGE_INSTALL += "gcc-runtime-dbg"
> > > 
> > > Add missing runtime dependency on datetime python module for the pretty
> > > printer to work/load successfully.
> > > 
> > > Once the pretty-printer gdb file is moved out of libdir, it may become
> > > empty therefore delete it if its empty.
> > > 
> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > ---
> > > v2: Fix build on mingw
> > > 
> > >  meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
> > >  1 file changed, 8 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
> > > index 64b6168ba76..004deb6e41f 100644
> > > --- a/meta/recipes-devtools/gcc/gcc-runtime.inc
> > > +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
> > > @@ -85,6 +85,8 @@ do_install () {
> > >               cd ${B}/${TARGET_SYS}/$d/
> > >               oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install
> > >       done
> > > +     install -d ${D}${datadir}/gdb/auto-load/${libdir}
> > > +     mv ${D}${libdir}/libstdc++*-gdb.py ${D}${datadir}/gdb/auto-load/${libdir}
> > >       if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then
> > >               install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include
> > >               mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include
> > > @@ -99,6 +101,9 @@ do_install () {
> > >       if [ -d ${D}${infodir} ]; then
> > >               rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
> > >       fi
> > > +     if [ -d ${D}${libdir} ]; then
> > > +             rmdir --ignore-fail-on-non-empty -p ${D}${libdir}
> > > +     fi
> > >  }
> > > 
> > >  do_install:append:class-target () {
> > > @@ -182,9 +187,11 @@ RRECOMMENDS:${PN}-dbg = ""
> > > 
> > >  # include python debugging scripts
> > >  FILES:${PN}-dbg += "\
> > > -    ${libdir}/libstdc++.*-gdb.py \
> > >      ${datadir}/gcc-${BINV}/python/libstdcxx \
> > > +    ${datadir}/gdb/auto-load \
> > >  "
> > > +# Needed by libstdcxx pretty printer
> > > +RDEPENDS:${PN}-dbg += "python3-datetime"
> > > 
> > >  FILES:libg2c = "${target_libdir}/libg2c.so.*"
> > >  SUMMARY:libg2c = "Companion runtime library for g77"
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/6381/steps/14/logs/stdio
> > 
> > Missing or unbuildable dependency chain was: ['selftest-ed',
> > 'virtual/x86_64-poky-linux-compilerlibs', 'python3-datetime', 'bash']
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/8533
> 
> Hmm, so I wonder if using RRECOMMEND is better here. Where is bash
> being pulled from ?

bash appears to be a dependency of python3-datetime. I don't think a
RRECOMMEND will help unfortunately.

Cheers,

Richard






  reply	other threads:[~2024-02-03  7:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 16:20 [PATCH v2] gcc-runtime: Move gdb pretty printer file to auto-load location Khem Raj
2024-02-02 22:58 ` [OE-core] " Richard Purdie
2024-02-03  0:23   ` Khem Raj
2024-02-03  7:53     ` Richard Purdie [this message]
2024-02-04  3:55       ` Tim Orling
2024-02-04 10:28         ` Richard Purdie
2024-02-04 16:36           ` Tim Orling
2024-02-04 18:00             ` Khem Raj
2024-02-04 19:04               ` Richard Purdie
2024-02-04 19:06                 ` Khem Raj
2024-02-04 19:09             ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8fbde10440b97a7d1fae483c192b9d17c450124d.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox