Skip to contentSkip to conversation

gcc-runtime: Move gdb pretty printer file to auto-load location

PATCH Superseded Khem Raj 3 participants 11 messages Jan 30, 2024 – Feb 4, 2024

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 gcc-runtime: Move gdb pretty printer file to auto-load location

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.

---
v2: Fix build on mingw

 meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +8 -1
index 64b6168ba76..004deb6e41f 100644
@@ -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"
Signature · 1 line
2.43.0
#1 lore raw
Quoted 50 lines · Khem Raj

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.

---
v2: Fix build on mingw

 meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +5 -0
index 64b6168ba76..004deb6e41f 100644
@@ -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

meta/recipes-devtools/gcc/gcc-runtime.inc RRECOMMENDS:${PN}-dbg = "" · line 197

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +3 -1
 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

Cheers,

Richard

author
#2 lore raw
Quoted 65 lines · Richard Purdie
Quoted 50 lines · Khem Raj

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.

---
v2: Fix build on mingw

 meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +5 -0
index 64b6168ba76..004deb6e41f 100644
@@ -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

meta/recipes-devtools/gcc/gcc-runtime.inc RRECOMMENDS:${PN}-dbg = "" · line 197

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +3 -1
 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

Quoted 4 lines

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 ?

Quoted 5 lines

Cheers,

Richard

#3 lore raw
Quoted 67 lines · Khem Raj
Quoted 65 lines · Richard Purdie
Quoted 50 lines · Khem Raj

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.

---
v2: Fix build on mingw

 meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +5 -0
index 64b6168ba76..004deb6e41f 100644
@@ -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

meta/recipes-devtools/gcc/gcc-runtime.inc RRECOMMENDS:${PN}-dbg = "" · line 197

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +3 -1
 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

Quoted 7 lines
Quoted 4 lines

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

#4 lore raw
Quoted 82 lines · Richard Purdie
Quoted 6 lines · Khem Raj
Quoted 4 lines · Richard Purdie
Quoted 2 lines · Khem Raj

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

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

This leaves the libstdc++ pretty-printers disabled even though added

via

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

IMAGE_INSTALL += "gcc-runtime-dbg"

Add missing runtime dependency on datetime python module for the

pretty

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

printer to work/load successfully.

Once the pretty-printer gdb file is moved out of libdir, it may

become

Quoted 10 lines
Quoted 10 lines

Review

Quoted 10 lines

empty therefore delete it if its empty.

---
v2: Fix build on mingw

 meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/recipes-devtools/gcc/gcc-runtime.inc

Quoted 6 lines
Quoted 6 lines

meta/recipes-devtools/gcc/gcc-runtime.inc do_install () { · line 86

Quoted 6 lines

index 64b6168ba76..004deb6e41f 100644

meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
@@ -85,6 +85,8 @@ do_install () {
              cd ${B}/${TARGET_SYS}/$d/
              oe_runmake 'DESTDIR=${D}'

MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install

Quoted 3 lines
Quoted 3 lines

meta/recipes-devtools/gcc/gcc-runtime.inc do_install () {

Quoted 3 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +2 -0
      done
+     install -d ${D}${datadir}/gdb/auto-load/${libdir}
+     mv ${D}${libdir}/libstdc++*-gdb.py

${D}${datadir}/gdb/auto-load/${libdir}

Quoted 3 lines
Quoted 3 lines

meta/recipes-devtools/gcc/gcc-runtime.inc do_install () {

Quoted 3 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
      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

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +6 -1
@@ -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"
 
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/gcc/gcc-runtime.inc RRECOMMENDS:${PN}-dbg = "" · line 197

Quoted 2 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
 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

Quoted 4 lines
Quoted 4 lines

Missing or unbuildable dependency chain was: ['selftest-ed', 'virtual/x86_64-poky-linux-compilerlibs', 'python3-datetime', 'bash']

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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.

It seems to be required for tests/ (test_venv.py, test_subprocess.py and test_zipfile/test_core.py are the obvious ones)
https://github.com/search?q=repo%3Apython%2Fcpython+%28%22bash%22+OR+%22bash+required%22%29+path%3A%2F%5ELib%5C%2Ftest%5C%2F%2F&type=code

I didn’t see any hard requirement in Lib/datetime.py nor its test cases. But searching on a phone can lead to missing things…

Quoted 19 lines

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#194830):
https://lists.openembedded.org/g/openembedded-core/message/194830
Mute This Topic: https://lists.openembedded.org/mt/104056687/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw
Quoted 84 lines · Tim Orling
Quoted 71 lines · Richard Purdie
Quoted 70 lines · Khem Raj
Quoted 68 lines · Richard Purdie
Quoted 58 lines · Khem Raj

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.

---
v2: Fix build on mingw

  meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-

  1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
index 64b6168ba76..004deb6e41f 100644
@@ -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

meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
@@ -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 () {

meta/recipes-devtools/gcc/gcc-runtime.inc +1 -1
@@ -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 \

  "

meta/recipes-devtools/gcc/gcc-runtime.inc +2 -0
+# Needed by libstdcxx pretty printer
+RDEPENDS:${PN}-dbg += "python3-datetime"
Quoted 2 lines

  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']

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 4 lines

It seems to be required for tests/ (test_venv.py, test_subprocess.py and test_zipfile/test_core.py are the obvious ones)
https://github.com/search?q=repo%3Apython%2Fcpython+%28%22bash%22+OR+%22bash+required%22%29+path%3A%2F%5ELib%5C%2Ftest%5C%2F%2F&type=code

I didn’t see any hard requirement in Lib/datetime.py nor its test cases. But searching on a phone can lead to missing things…

The dependency is definitely coming from the python3 tests.

It looks like whilst the python3-ptest is conditional on enabling ptests, the python3-tests package is not, and it is that which contains the bash dependency.

Cheers,

Richard

#6 lore raw
Quoted 126 lines · Richard Purdie
Quoted 3 lines · Tim Orling

On Fri, Feb 2, 2024 at 11:53 PM Richard Purdie <

Quoted 6 lines · [email protected]> wrote:
Quoted 6 lines · Khem Raj
Quoted 5 lines
Quoted 3 lines · Richard Purdie
Quoted 1 line · Khem Raj

When debugging a C++ program on target using libcstdc++, gdb

does not

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

find the pretty printer python support, this is because the init

file is

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

installed into /usr/lib which is excluded from gdb's default

list of

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

This leaves the libstdc++ pretty-printers disabled even though

added via

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

IMAGE_INSTALL += "gcc-runtime-dbg"

Add missing runtime dependency on datetime python module for the

pretty

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

printer to work/load successfully.

Once the pretty-printer gdb file is moved out of libdir, it may

become

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

Review

Quoted 10 lines

empty therefore delete it if its empty.

---
v2: Fix build on mingw

  meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/recipes-devtools/gcc/gcc-runtime.inc

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

meta/recipes-devtools/gcc/gcc-runtime.inc do_install () { · line 86

Quoted 6 lines

index 64b6168ba76..004deb6e41f 100644

meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
@@ -85,6 +85,8 @@ do_install () {
               cd ${B}/${TARGET_SYS}/$d/
               oe_runmake 'DESTDIR=${D}'

MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

meta/recipes-devtools/gcc/gcc-runtime.inc do_install () {

Quoted 3 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +2 -0
       done
+     install -d ${D}${datadir}/gdb/auto-load/${libdir}
+     mv ${D}${libdir}/libstdc++*-gdb.py

${D}${datadir}/gdb/auto-load/${libdir}

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/recipes-devtools/gcc/gcc-runtime.inc do_install () { · line 90

Quoted 1 line
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
       if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include

]; then

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/recipes-devtools/gcc/gcc-runtime.inc do_install () { · line 91

Quoted 1 line
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
               install -d

${D}${libdir}/${TARGET_SYS}/${BINV}/include

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/recipes-devtools/gcc/gcc-runtime.inc do_install () { · line 92

Quoted 1 line
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
               mv

${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/*
${D}${libdir}/${TARGET_SYS}/${BINV}/include

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +6 -1
@@ -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"
 
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/gcc/gcc-runtime.inc RRECOMMENDS:${PN}-dbg = "" · line 197

Quoted 2 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
  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

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Missing or unbuildable dependency chain was: ['selftest-ed', 'virtual/x86_64-poky-linux-compilerlibs', 'python3-datetime',

'bash']

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/8533

Quoted 10 lines
Quoted 7 lines
Quoted 3 lines

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.

It seems to be required for tests/ (test_venv.py, test_subprocess.py and

test_zipfile/test_core.py are the obvious ones)

Quoted 1 line

https://github.com/search?q=repo%3Apython%2Fcpython+%28%22bash%22+OR+%22bash+required%22%29+path%3A%2F%5ELib%5C%2Ftest%5C%2F%2F&type=code

Quoted 2 lines

I didn’t see any hard requirement in Lib/datetime.py nor its test cases.

But searching on a phone can lead to missing things…

The dependency is definitely coming from the python3 tests.

It looks like whilst the python3-ptest is conditional on enabling ptests, the python3-tests package is not, and it is that which contains the bash dependency.

So perhaps we should rework python3 recipe to package tests/ into -ptest?

Cheers,

Richard

author
#7 lore raw
Quoted 95 lines · Tim Orling
Quoted 91 lines · Richard Purdie
Quoted 88 lines · Tim Orling
Quoted 71 lines · Richard Purdie
Quoted 70 lines · Khem Raj
Quoted 68 lines · Richard Purdie
Quoted 50 lines · Khem Raj

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.

---
v2: Fix build on mingw

  meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +5 -0
index 64b6168ba76..004deb6e41f 100644
@@ -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

meta/recipes-devtools/gcc/gcc-runtime.inc RRECOMMENDS:${PN}-dbg = "" · line 197

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +3 -1
  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']

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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.

It seems to be required for tests/ (test_venv.py, test_subprocess.py and test_zipfile/test_core.py are the obvious ones)
https://github.com/search?q=repo%3Apython%2Fcpython+%28%22bash%22+OR+%22bash+required%22%29+path%3A%2F%5ELib%5C%2Ftest%5C%2F%2F&type=code

I didn’t see any hard requirement in Lib/datetime.py nor its test cases. But searching on a phone can lead to missing things…

Quoted 7 lines
Quoted 6 lines

The dependency is definitely coming from the python3 tests.

It looks like whilst the python3-ptest is conditional on enabling ptests, the python3-tests package is not, and it is that which contains the bash dependency.

So perhaps we should rework python3 recipe to package tests/ into -ptest?

if test package is pulling in bash and imposing it on non ptest builds then it would be good to
fix that.

Quoted 6 lines
Quoted 6 lines

Cheers,

Richard

#8 lore raw
Quoted 102 lines · Khem Raj
Quoted 101 lines · Tim Orling
Quoted 97 lines · Richard Purdie
Quoted 84 lines · Tim Orling
Quoted 71 lines · Richard Purdie
Quoted 70 lines · Khem Raj
Quoted 68 lines · Richard Purdie
Quoted 50 lines · Khem Raj

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.

---
v2: Fix build on mingw

  meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +5 -0
index 64b6168ba76..004deb6e41f 100644
@@ -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

meta/recipes-devtools/gcc/gcc-runtime.inc RRECOMMENDS:${PN}-dbg = "" · line 197

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +3 -1
  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']

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 4 lines

It seems to be required for tests/ (test_venv.py, test_subprocess.py and test_zipfile/test_core.py are the obvious ones)
https://github.com/search?q=repo%3Apython%2Fcpython+%28%22bash%22+OR+%22bash+required%22%29+path%3A%2F%5ELib%5C%2Ftest%5C%2F%2F&type=code

I didn’t see any hard requirement in Lib/datetime.py nor its test cases. But searching on a phone can lead to missing things…

The dependency is definitely coming from the python3 tests.

It looks like whilst the python3-ptest is conditional on enabling ptests, the python3-tests package is not, and it is that which contains the bash dependency.

Quoted 5 lines
Quoted 1 line

So perhaps we should rework python3 recipe to package tests/ into -ptest?

if test package is pulling in bash and imposing it on non ptest builds then it would be good to
fix that.

I've sent a couple of patches which create a common "no-gplv3" include file and move configuration there which works around this.

Cheers,

Richard

author
#9 lore raw
Quoted 104 lines · Richard Purdie
Quoted 102 lines · Khem Raj
Quoted 101 lines · Tim Orling
Quoted 97 lines · Richard Purdie
Quoted 84 lines · Tim Orling
Quoted 71 lines · Richard Purdie
Quoted 70 lines · Khem Raj
Quoted 68 lines · Richard Purdie
Quoted 50 lines · Khem Raj

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.

---
v2: Fix build on mingw

  meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +5 -0
index 64b6168ba76..004deb6e41f 100644
@@ -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

meta/recipes-devtools/gcc/gcc-runtime.inc RRECOMMENDS:${PN}-dbg = "" · line 197

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-runtime.inc +3 -1
  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']

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 4 lines

It seems to be required for tests/ (test_venv.py, test_subprocess.py and test_zipfile/test_core.py are the obvious ones)
https://github.com/search?q=repo%3Apython%2Fcpython+%28%22bash%22+OR+%22bash+required%22%29+path%3A%2F%5ELib%5C%2Ftest%5C%2F%2F&type=code

I didn’t see any hard requirement in Lib/datetime.py nor its test cases. But searching on a phone can lead to missing things…

The dependency is definitely coming from the python3 tests.

It looks like whilst the python3-ptest is conditional on enabling ptests, the python3-tests package is not, and it is that which contains the bash dependency.

Quoted 9 lines
Quoted 5 lines
Quoted 1 line

So perhaps we should rework python3 recipe to package tests/ into -ptest?

if test package is pulling in bash and imposing it on non ptest builds then it would be good to
fix that.

I've sent a couple of patches which create a common "no-gplv3" include file and move configuration there which works around this.

ah thanks Richard. So ignore v3 of this patch and take this one ( v2 ) instead.

Quoted 3 lines

Cheers,

Richard

#10 lore raw
In reply to Tim Orling
Quoted 95 lines · Tim Orling
Quoted 92 lines · Richard Purdie
Quoted 84 lines · Tim Orling
Quoted 71 lines · Richard Purdie
Quoted 70 lines · Khem Raj
Quoted 68 lines · Richard Purdie
Quoted 58 lines · Khem Raj

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.

---
v2: Fix build on mingw

  meta/recipes-devtools/gcc/gcc-runtime.inc | 9 ++++++++-

  1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
index 64b6168ba76..004deb6e41f 100644
@@ -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

meta/recipes-devtools/gcc/gcc-runtime.inc +0 -0
@@ -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 () {

meta/recipes-devtools/gcc/gcc-runtime.inc +1 -1
@@ -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 \

  "

meta/recipes-devtools/gcc/gcc-runtime.inc +2 -0
+# Needed by libstdcxx pretty printer
+RDEPENDS:${PN}-dbg += "python3-datetime"
Quoted 2 lines

  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']

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 4 lines

It seems to be required for tests/ (test_venv.py, test_subprocess.py and test_zipfile/test_core.py are the obvious ones)
https://github.com/search?q=repo%3Apython%2Fcpython+%28%22bash%22+OR+%22bash+required%22%29+path%3A%2F%5ELib%5C%2Ftest%5C%2F%2F&type=code

I didn’t see any hard requirement in Lib/datetime.py nor its test cases. But searching on a phone can lead to missing things…

The dependency is definitely coming from the python3 tests.

Quoted 7 lines
Quoted 5 lines

It looks like whilst the python3-ptest is conditional on enabling ptests, the python3-tests package is not, and it is that which contains the bash dependency.

So perhaps we should rework python3 recipe to package tests/ into -ptest?

ptests are packaged conditionally so it all gets a bit messy.

I've worked around it in a no-gplv3 inc file for now.

Cheers,

Richard