Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] python3: RDEPEND on libgcc
@ 2019-12-30 20:59 Joshua Watt
  2019-12-31 19:06 ` [PATCH v2] " Joshua Watt
  2019-12-31 19:32 ` ✗ patchtest: failure for python3: RDEPEND on libgcc (rev2) Patchwork
  0 siblings, 2 replies; 6+ messages in thread
From: Joshua Watt @ 2019-12-30 20:59 UTC (permalink / raw)
  To: openembedded-core

Python uses features of glibc that require it to dynamically load (i.e.
dlopen()) libgcc_s at runtime. However, since this isn't a link time
dependency, it doesn't get picked up automatically by bitbake so
manually add it to RDEPENDS.

There is an outstanding bug in Python to make it explicitly link against
libgcc at link time which would remove the need for this. See:
https://bugs.python.org/issue37395

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/recipes-devtools/python/python3_3.7.5.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/python/python3_3.7.5.bb b/meta/recipes-devtools/python/python3_3.7.5.bb
index 57eaaea5e7..4c8d5134a7 100644
--- a/meta/recipes-devtools/python/python3_3.7.5.bb
+++ b/meta/recipes-devtools/python/python3_3.7.5.bb
@@ -336,6 +336,8 @@ FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MA
 PACKAGES += "${PN}-man"
 FILES_${PN}-man = "${datadir}/man"
 
+# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
+RDEPENDS_${PN} = "libgcc"
 RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
 RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9"
 RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
-- 
2.23.0



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

* [PATCH v2] python3: RDEPEND on libgcc
  2019-12-30 20:59 [PATCH] python3: RDEPEND on libgcc Joshua Watt
@ 2019-12-31 19:06 ` Joshua Watt
  2019-12-31 19:11   ` Khem Raj
  2019-12-31 19:32 ` ✗ patchtest: failure for python3: RDEPEND on libgcc (rev2) Patchwork
  1 sibling, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2019-12-31 19:06 UTC (permalink / raw)
  To: openembedded-core

Python uses features of glibc that require it to dynamically load (i.e.
dlopen()) libgcc_s at runtime. However, since this isn't a link time
dependency, it doesn't get picked up automatically by bitbake so
manually add it to RDEPENDS.

There is an outstanding bug in Python to make it explicitly link against
libgcc at link time which would remove the need for this. See:
https://bugs.python.org/issue37395

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/recipes-devtools/python/python3_3.7.5.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/python/python3_3.7.5.bb b/meta/recipes-devtools/python/python3_3.7.5.bb
index 137b540dba..78312b05f3 100644
--- a/meta/recipes-devtools/python/python3_3.7.5.bb
+++ b/meta/recipes-devtools/python/python3_3.7.5.bb
@@ -306,6 +306,8 @@ RPROVIDES_${PN}-venv += "python3-pyvenv"
 PACKAGES =+ "libpython3 libpython3-staticdev"
 FILES_libpython3 = "${libdir}/libpython*.so.*"
 FILES_libpython3-staticdev += "${prefix}/lib/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-*/libpython${PYTHON_BINABI}.a"
+# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
+RDEPENDS_libpython3 += "libgcc"
 INSANE_SKIP_${PN}-dev += "dev-elf"
 
 # catch all the rest (unsorted)
-- 
2.23.0



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

* Re: [PATCH v2] python3: RDEPEND on libgcc
  2019-12-31 19:06 ` [PATCH v2] " Joshua Watt
@ 2019-12-31 19:11   ` Khem Raj
  2019-12-31 19:25     ` Joshua Watt
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2019-12-31 19:11 UTC (permalink / raw)
  To: Joshua Watt; +Cc: Patches and discussions about the oe-core layer

On Tue, Dec 31, 2019 at 11:07 AM Joshua Watt <jpewhacker@gmail.com> wrote:
>
> Python uses features of glibc that require it to dynamically load (i.e.
> dlopen()) libgcc_s at runtime. However, since this isn't a link time
> dependency, it doesn't get picked up automatically by bitbake so
> manually add it to RDEPENDS.
>
> There is an outstanding bug in Python to make it explicitly link against
> libgcc at link time which would remove the need for this. See:
> https://bugs.python.org/issue37395
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
>  meta/recipes-devtools/python/python3_3.7.5.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-devtools/python/python3_3.7.5.bb b/meta/recipes-devtools/python/python3_3.7.5.bb
> index 137b540dba..78312b05f3 100644
> --- a/meta/recipes-devtools/python/python3_3.7.5.bb
> +++ b/meta/recipes-devtools/python/python3_3.7.5.bb
> @@ -306,6 +306,8 @@ RPROVIDES_${PN}-venv += "python3-pyvenv"
>  PACKAGES =+ "libpython3 libpython3-staticdev"
>  FILES_libpython3 = "${libdir}/libpython*.so.*"
>  FILES_libpython3-staticdev += "${prefix}/lib/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-*/libpython${PYTHON_BINABI}.a"
> +# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
> +RDEPENDS_libpython3 += "libgcc"

while this is glibc specific change depending on gcc runtime, it seems
we should only apply is when we use gcc runtime and glibc

glibc part is easy just use libc-glibc override for gcc runtime piece
perhaps, its good to introduce, virtual/compiler-runtime and let
libgcc
provide it by default, but let apps depend on virtual/compiler-runtime


>  INSANE_SKIP_${PN}-dev += "dev-elf"
>
>  # catch all the rest (unsorted)
> --
> 2.23.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH v2] python3: RDEPEND on libgcc
  2019-12-31 19:11   ` Khem Raj
@ 2019-12-31 19:25     ` Joshua Watt
  2019-12-31 20:31       ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2019-12-31 19:25 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Tue, Dec 31, 2019 at 1:11 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Tue, Dec 31, 2019 at 11:07 AM Joshua Watt <jpewhacker@gmail.com> wrote:
> >
> > Python uses features of glibc that require it to dynamically load (i.e.
> > dlopen()) libgcc_s at runtime. However, since this isn't a link time
> > dependency, it doesn't get picked up automatically by bitbake so
> > manually add it to RDEPENDS.
> >
> > There is an outstanding bug in Python to make it explicitly link against
> > libgcc at link time which would remove the need for this. See:
> > https://bugs.python.org/issue37395
> >
> > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> > ---
> >  meta/recipes-devtools/python/python3_3.7.5.bb | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/recipes-devtools/python/python3_3.7.5.bb b/meta/recipes-devtools/python/python3_3.7.5.bb
> > index 137b540dba..78312b05f3 100644
> > --- a/meta/recipes-devtools/python/python3_3.7.5.bb
> > +++ b/meta/recipes-devtools/python/python3_3.7.5.bb
> > @@ -306,6 +306,8 @@ RPROVIDES_${PN}-venv += "python3-pyvenv"
> >  PACKAGES =+ "libpython3 libpython3-staticdev"
> >  FILES_libpython3 = "${libdir}/libpython*.so.*"
> >  FILES_libpython3-staticdev += "${prefix}/lib/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-*/libpython${PYTHON_BINABI}.a"
> > +# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
> > +RDEPENDS_libpython3 += "libgcc"
>
> while this is glibc specific change depending on gcc runtime, it seems
> we should only apply is when we use gcc runtime and glibc
>
> glibc part is easy just use libc-glibc override for gcc runtime piece
> perhaps, its good to introduce, virtual/compiler-runtime and let
> libgcc
> provide it by default, but let apps depend on virtual/compiler-runtime

I'll use the libc-glibc override so that it's specific to glibc, but I
think the virtual/compiler-runtime might be a bit premature, unless
you know of a usecase where it would currently be necessary?

>
>
> >  INSANE_SKIP_${PN}-dev += "dev-elf"
> >
> >  # catch all the rest (unsorted)
> > --
> > 2.23.0
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* ✗ patchtest: failure for python3: RDEPEND on libgcc (rev2)
  2019-12-30 20:59 [PATCH] python3: RDEPEND on libgcc Joshua Watt
  2019-12-31 19:06 ` [PATCH v2] " Joshua Watt
@ 2019-12-31 19:32 ` Patchwork
  1 sibling, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-12-31 19:32 UTC (permalink / raw)
  To: Joshua Watt; +Cc: openembedded-core

== Series Details ==

Series: python3: RDEPEND on libgcc (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/21797/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at df107f3a14)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* Re: [PATCH v2] python3: RDEPEND on libgcc
  2019-12-31 19:25     ` Joshua Watt
@ 2019-12-31 20:31       ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2019-12-31 20:31 UTC (permalink / raw)
  To: Joshua Watt; +Cc: Patches and discussions about the oe-core layer

On Tue, Dec 31, 2019 at 11:25 AM Joshua Watt <jpewhacker@gmail.com> wrote:
>
> On Tue, Dec 31, 2019 at 1:11 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Tue, Dec 31, 2019 at 11:07 AM Joshua Watt <jpewhacker@gmail.com> wrote:
> > >
> > > Python uses features of glibc that require it to dynamically load (i.e.
> > > dlopen()) libgcc_s at runtime. However, since this isn't a link time
> > > dependency, it doesn't get picked up automatically by bitbake so
> > > manually add it to RDEPENDS.
> > >
> > > There is an outstanding bug in Python to make it explicitly link against
> > > libgcc at link time which would remove the need for this. See:
> > > https://bugs.python.org/issue37395
> > >
> > > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> > > ---
> > >  meta/recipes-devtools/python/python3_3.7.5.bb | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/meta/recipes-devtools/python/python3_3.7.5.bb b/meta/recipes-devtools/python/python3_3.7.5.bb
> > > index 137b540dba..78312b05f3 100644
> > > --- a/meta/recipes-devtools/python/python3_3.7.5.bb
> > > +++ b/meta/recipes-devtools/python/python3_3.7.5.bb
> > > @@ -306,6 +306,8 @@ RPROVIDES_${PN}-venv += "python3-pyvenv"
> > >  PACKAGES =+ "libpython3 libpython3-staticdev"
> > >  FILES_libpython3 = "${libdir}/libpython*.so.*"
> > >  FILES_libpython3-staticdev += "${prefix}/lib/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}-*/libpython${PYTHON_BINABI}.a"
> > > +# See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
> > > +RDEPENDS_libpython3 += "libgcc"
> >
> > while this is glibc specific change depending on gcc runtime, it seems
> > we should only apply is when we use gcc runtime and glibc
> >
> > glibc part is easy just use libc-glibc override for gcc runtime piece
> > perhaps, its good to introduce, virtual/compiler-runtime and let
> > libgcc
> > provide it by default, but let apps depend on virtual/compiler-runtime
>
> I'll use the libc-glibc override so that it's specific to glibc, but I
> think the virtual/compiler-runtime might be a bit premature, unless
> you know of a usecase where it would currently be necessary?
>

eg. one might use compiler-rt to provide built-ins and use
llvm-libunwind for unwinding info not rely on libgcc, one can say it
can then provide libgcc and substitute it. However, it will be better
if it was in design to be able to do that from top.

> >
> >
> > >  INSANE_SKIP_${PN}-dev += "dev-elf"
> > >
> > >  # catch all the rest (unsorted)
> > > --
> > > 2.23.0
> > >
> > > --
> > > _______________________________________________
> > > Openembedded-core mailing list
> > > Openembedded-core@lists.openembedded.org
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

end of thread, other threads:[~2019-12-31 20:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-30 20:59 [PATCH] python3: RDEPEND on libgcc Joshua Watt
2019-12-31 19:06 ` [PATCH v2] " Joshua Watt
2019-12-31 19:11   ` Khem Raj
2019-12-31 19:25     ` Joshua Watt
2019-12-31 20:31       ` Khem Raj
2019-12-31 19:32 ` ✗ patchtest: failure for python3: RDEPEND on libgcc (rev2) Patchwork

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