diff mbox series

[1/1] gnuradio: needs host-python2

Message ID 20180626214326.27205-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] gnuradio: needs host-python2 | expand

Commit Message

Fabrice Fontaine June 26, 2018, 9:43 p.m. UTC
gnuradio needs host-python2 however there is no way to enforce this so
add a dependency on !BR2_PACKAGE_PYTHON3.
Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only
build host-python3.
This issue was not raised in the previous version of gnuradio as
host-python-cheetah was the only dependency and host-python-cheetah
enforces python2 through HOST_PYTHON_CHEETAH_NEEDS_HOST_PYTHON however
we now have host-python-six and host-python-mako dependencies and it
does not seem right to enforces python2 on those packages

Fixes:
 - http://autobuild.buildroot.net/results/a502fef3e2a40f38ca63332440b0b6bd2ed11d5a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/gnuradio/Config.in | 2 ++
 1 file changed, 2 insertions(+)

Comments

Baruch Siach June 27, 2018, 3:36 a.m. UTC | #1
Hi Fabrice,

On Tue, Jun 26, 2018 at 11:43:26PM +0200, Fabrice Fontaine wrote:
> gnuradio needs host-python2 however there is no way to enforce this so
> add a dependency on !BR2_PACKAGE_PYTHON3.
> Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only
> build host-python3.

Why not just add host-python to _DEPENDENCIES?

baruch

> This issue was not raised in the previous version of gnuradio as
> host-python-cheetah was the only dependency and host-python-cheetah
> enforces python2 through HOST_PYTHON_CHEETAH_NEEDS_HOST_PYTHON however
> we now have host-python-six and host-python-mako dependencies and it
> does not seem right to enforces python2 on those packages
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/a502fef3e2a40f38ca63332440b0b6bd2ed11d5a
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/gnuradio/Config.in | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> index f748b902a7..25131fb105 100644
> --- a/package/gnuradio/Config.in
> +++ b/package/gnuradio/Config.in
> @@ -1,5 +1,6 @@
>  comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library"
>  	depends on BR2_USE_MMU
> +	depends on !BR2_PACKAGE_PYTHON3
>  	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
>  		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
>  
> @@ -10,6 +11,7 @@ config BR2_PACKAGE_GNURADIO
>  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
>  	depends on BR2_USE_MMU # use fork()
>  	depends on BR2_USE_WCHAR # boost
> +	depends on !BR2_PACKAGE_PYTHON3
>  	select BR2_PACKAGE_BOOST
>  	select BR2_PACKAGE_BOOST_DATE_TIME
>  	select BR2_PACKAGE_BOOST_FILESYSTEM
Fabrice Fontaine June 27, 2018, 5:35 a.m. UTC | #2
Dear Baruch,

2018-06-27 5:36 GMT+02:00 Baruch Siach <baruch@tkos.co.il>:

> Hi Fabrice,
>
> On Tue, Jun 26, 2018 at 11:43:26PM +0200, Fabrice Fontaine wrote:
> > gnuradio needs host-python2 however there is no way to enforce this so
> > add a dependency on !BR2_PACKAGE_PYTHON3.
> > Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only
> > build host-python3.
>
> Why not just add host-python to _DEPENDENCIES?
>
Indeed, I will update my patch. Thanks for your help.

>
> baruch
>
> > This issue was not raised in the previous version of gnuradio as
> > host-python-cheetah was the only dependency and host-python-cheetah
> > enforces python2 through HOST_PYTHON_CHEETAH_NEEDS_HOST_PYTHON however
> > we now have host-python-six and host-python-mako dependencies and it
> > does not seem right to enforces python2 on those packages
> >
> > Fixes:
> >  - http://autobuild.buildroot.net/results/a502fef3e2a40f38ca63332440b0b6
> bd2ed11d5a
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/gnuradio/Config.in | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> > index f748b902a7..25131fb105 100644
> > --- a/package/gnuradio/Config.in
> > +++ b/package/gnuradio/Config.in
> > @@ -1,5 +1,6 @@
> >  comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic
> library"
> >       depends on BR2_USE_MMU
> > +     depends on !BR2_PACKAGE_PYTHON3
> >       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
> >               !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
> >
> > @@ -10,6 +11,7 @@ config BR2_PACKAGE_GNURADIO
> >       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
> >       depends on BR2_USE_MMU # use fork()
> >       depends on BR2_USE_WCHAR # boost
> > +     depends on !BR2_PACKAGE_PYTHON3
> >       select BR2_PACKAGE_BOOST
> >       select BR2_PACKAGE_BOOST_DATE_TIME
> >       select BR2_PACKAGE_BOOST_FILESYSTEM
>
> --
>      http://baruch.siach.name/blog/                  ~. .~   Tk Open
> Systems
> =}------------------------------------------------ooO--U--
> Ooo------------{=
>    - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
>
Best Regards,

Fabrice
<div dir="ltr">Dear Baruch,<br><div class="gmail_extra"><br><div class="gmail_quote">2018-06-27 5:36 GMT+02:00 Baruch Siach <span dir="ltr">&lt;<a href="mailto:baruch@tkos.co.il" target="_blank">baruch@tkos.co.il</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Fabrice,<br>
<span class=""><br>
On Tue, Jun 26, 2018 at 11:43:26PM +0200, Fabrice Fontaine wrote:<br>
&gt; gnuradio needs host-python2 however there is no way to enforce this so<br>
&gt; add a dependency on !BR2_PACKAGE_PYTHON3.<br>
&gt; Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only<br>
&gt; build host-python3.<br>
<br>
</span>Why not just add host-python to _DEPENDENCIES?<br></blockquote><div>Indeed, I will update my patch. Thanks for your help. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
baruch<br>
<div><div class="h5"><br>
&gt; This issue was not raised in the previous version of gnuradio as<br>
&gt; host-python-cheetah was the only dependency and host-python-cheetah<br>
&gt; enforces python2 through HOST_PYTHON_CHEETAH_NEEDS_<wbr>HOST_PYTHON however<br>
&gt; we now have host-python-six and host-python-mako dependencies and it<br>
&gt; does not seem right to enforces python2 on those packages<br>
&gt; <br>
&gt; Fixes:<br>
&gt;  - <a href="http://autobuild.buildroot.net/results/a502fef3e2a40f38ca63332440b0b6bd2ed11d5a" rel="noreferrer" target="_blank">http://autobuild.buildroot.<wbr>net/results/<wbr>a502fef3e2a40f38ca63332440b0b6<wbr>bd2ed11d5a</a><br>
&gt; <br>
&gt; Signed-off-by: Fabrice Fontaine &lt;<a href="mailto:fontaine.fabrice@gmail.com">fontaine.fabrice@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  package/gnuradio/Config.in | 2 ++<br>
&gt;  1 file changed, 2 insertions(+)<br>
&gt; <br>
&gt; diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in<br>
&gt; index f748b902a7..25131fb105 100644<br>
&gt; --- a/package/gnuradio/Config.in<br>
&gt; +++ b/package/gnuradio/Config.in<br>
&gt; @@ -1,5 +1,6 @@<br>
&gt;  comment &quot;gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library&quot;<br>
&gt;       depends on BR2_USE_MMU<br>
&gt; +     depends on !BR2_PACKAGE_PYTHON3<br>
&gt;       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \<br>
&gt;               !BR2_TOOLCHAIN_HAS_THREADS_<wbr>NPTL || BR2_STATIC_LIBS<br>
&gt;  <br>
&gt; @@ -10,6 +11,7 @@ config BR2_PACKAGE_GNURADIO<br>
&gt;       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL<br>
&gt;       depends on BR2_USE_MMU # use fork()<br>
&gt;       depends on BR2_USE_WCHAR # boost<br>
&gt; +     depends on !BR2_PACKAGE_PYTHON3<br>
&gt;       select BR2_PACKAGE_BOOST<br>
&gt;       select BR2_PACKAGE_BOOST_DATE_TIME<br>
&gt;       select BR2_PACKAGE_BOOST_FILESYSTEM<br>
<br>
-- <br>
</div></div>     <a href="http://baruch.siach.name/blog/" rel="noreferrer" target="_blank">http://baruch.siach.name/blog/</a>                  ~. .~   Tk Open Systems<br>
=}----------------------------<wbr>--------------------ooO--U--<wbr>Ooo------------{=<br>
   - <a href="mailto:baruch@tkos.co.il">baruch@tkos.co.il</a> - tel: +972.2.679.5364, <a href="http://www.tkos.co.il" rel="noreferrer" target="_blank">http://www.tkos.co.il</a> -<br>
</blockquote></div>Best Regards,<br><br></div><div class="gmail_extra">Fabrice<br></div></div>
Fabrice Fontaine June 27, 2018, 4:24 p.m. UTC | #3
Dear Baruch

2018-06-27 7:35 GMT+02:00 Fabrice Fontaine <fontaine.fabrice@gmail.com>:

> Dear Baruch,
>
> 2018-06-27 5:36 GMT+02:00 Baruch Siach <baruch@tkos.co.il>:
>
>> Hi Fabrice,
>>
>> On Tue, Jun 26, 2018 at 11:43:26PM +0200, Fabrice Fontaine wrote:
>> > gnuradio needs host-python2 however there is no way to enforce this so
>> > add a dependency on !BR2_PACKAGE_PYTHON3.
>> > Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only
>> > build host-python3.
>>
>> Why not just add host-python to _DEPENDENCIES?
>>
> Indeed, I will update my patch. Thanks for your help.
>
After testing this option, this does not work. host-python2 is indeed built
but host-python3 is also built.
As a result, host-python-mako and host-python-six are built only for
host-python3 and not for host-python2. I don't know if this the expected
behavior,perhaps buildroot should always build the python2 and python3 host
packages?

> baruch
>>
>> > This issue was not raised in the previous version of gnuradio as
>> > host-python-cheetah was the only dependency and host-python-cheetah
>> > enforces python2 through HOST_PYTHON_CHEETAH_NEEDS_HOST_PYTHON however
>> > we now have host-python-six and host-python-mako dependencies and it
>> > does not seem right to enforces python2 on those packages
>> >
>> > Fixes:
>> >  - http://autobuild.buildroot.net/results/a502fef3e2a40f38ca633
>> 32440b0b6bd2ed11d5a
>> >
>> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> > ---
>> >  package/gnuradio/Config.in | 2 ++
>> >  1 file changed, 2 insertions(+)
>> >
>> > diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
>> > index f748b902a7..25131fb105 100644
>> > --- a/package/gnuradio/Config.in
>> > +++ b/package/gnuradio/Config.in
>> > @@ -1,5 +1,6 @@
>> >  comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic
>> library"
>> >       depends on BR2_USE_MMU
>> > +     depends on !BR2_PACKAGE_PYTHON3
>> >       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
>> >               !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
>> >
>> > @@ -10,6 +11,7 @@ config BR2_PACKAGE_GNURADIO
>> >       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
>> >       depends on BR2_USE_MMU # use fork()
>> >       depends on BR2_USE_WCHAR # boost
>> > +     depends on !BR2_PACKAGE_PYTHON3
>> >       select BR2_PACKAGE_BOOST
>> >       select BR2_PACKAGE_BOOST_DATE_TIME
>> >       select BR2_PACKAGE_BOOST_FILESYSTEM
>>
>> --
>>      http://baruch.siach.name/blog/                  ~. .~   Tk Open
>> Systems
>> =}------------------------------------------------ooO--U--Oo
>> o------------{=
>>    - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
>>
> Best Regards,
>
> Fabrice
>
Best Regards,

Fabrice
<div dir="ltr">Dear Baruch<br><div class="gmail_extra"><br><div class="gmail_quote">2018-06-27 7:35 GMT+02:00 Fabrice Fontaine <span dir="ltr">&lt;<a href="mailto:fontaine.fabrice@gmail.com" target="_blank">fontaine.fabrice@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Baruch,<br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2018-06-27 5:36 GMT+02:00 Baruch Siach <span dir="ltr">&lt;<a href="mailto:baruch@tkos.co.il" target="_blank">baruch@tkos.co.il</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Fabrice,<br>
<span><br>
On Tue, Jun 26, 2018 at 11:43:26PM +0200, Fabrice Fontaine wrote:<br>
&gt; gnuradio needs host-python2 however there is no way to enforce this so<br>
&gt; add a dependency on !BR2_PACKAGE_PYTHON3.<br>
&gt; Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only<br>
&gt; build host-python3.<br>
<br>
</span>Why not just add host-python to _DEPENDENCIES?<br></blockquote></span><div>Indeed, I will update my patch. Thanks for your help. <br></div></div></div></div></blockquote><div>After testing this option, this does not work. host-python2 is indeed built but host-python3 is also built.<br></div><div>As a result, host-python-mako and host-python-six are built only for host-python3 and not for host-python2. I don&#39;t know if this the expected behavior,perhaps buildroot should always build the python2 and python3 host packages?<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
baruch<br>
<div><div class="m_-4106705776051743385h5"><br>
&gt; This issue was not raised in the previous version of gnuradio as<br>
&gt; host-python-cheetah was the only dependency and host-python-cheetah<br>
&gt; enforces python2 through HOST_PYTHON_CHEETAH_NEEDS_HOST<wbr>_PYTHON however<br>
&gt; we now have host-python-six and host-python-mako dependencies and it<br>
&gt; does not seem right to enforces python2 on those packages<br>
&gt; <br>
&gt; Fixes:<br>
&gt;  - <a href="http://autobuild.buildroot.net/results/a502fef3e2a40f38ca63332440b0b6bd2ed11d5a" rel="noreferrer" target="_blank">http://autobuild.buildroot.net<wbr>/results/a502fef3e2a40f38ca633<wbr>32440b0b6bd2ed11d5a</a><br>
&gt; <br>
&gt; Signed-off-by: Fabrice Fontaine &lt;<a href="mailto:fontaine.fabrice@gmail.com" target="_blank">fontaine.fabrice@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  package/gnuradio/Config.in | 2 ++<br>
&gt;  1 file changed, 2 insertions(+)<br>
&gt; <br>
&gt; diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in<br>
&gt; index f748b902a7..25131fb105 100644<br>
&gt; --- a/package/gnuradio/Config.in<br>
&gt; +++ b/package/gnuradio/Config.in<br>
&gt; @@ -1,5 +1,6 @@<br>
&gt;  comment &quot;gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library&quot;<br>
&gt;       depends on BR2_USE_MMU<br>
&gt; +     depends on !BR2_PACKAGE_PYTHON3<br>
&gt;       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \<br>
&gt;               !BR2_TOOLCHAIN_HAS_THREADS_NP<wbr>TL || BR2_STATIC_LIBS<br>
&gt;  <br>
&gt; @@ -10,6 +11,7 @@ config BR2_PACKAGE_GNURADIO<br>
&gt;       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL<br>
&gt;       depends on BR2_USE_MMU # use fork()<br>
&gt;       depends on BR2_USE_WCHAR # boost<br>
&gt; +     depends on !BR2_PACKAGE_PYTHON3<br>
&gt;       select BR2_PACKAGE_BOOST<br>
&gt;       select BR2_PACKAGE_BOOST_DATE_TIME<br>
&gt;       select BR2_PACKAGE_BOOST_FILESYSTEM<br>
<br>
-- <br>
</div></div>     <a href="http://baruch.siach.name/blog/" rel="noreferrer" target="_blank">http://baruch.siach.name/<wbr>blog/</a>                  ~. .~   Tk Open Systems<br>
=}----------------------------<wbr>--------------------ooO--U--Oo<wbr>o------------{=<br>
   - <a href="mailto:baruch@tkos.co.il" target="_blank">baruch@tkos.co.il</a> - tel: +972.2.679.5364, <a href="http://www.tkos.co.il" rel="noreferrer" target="_blank">http://www.tkos.co.il</a> -<br>
</blockquote></div></div></div>Best Regards,<br><br></div><div class="gmail_extra">Fabrice<br></div></div>
</blockquote></div>Best Regards,<br><br></div><div class="gmail_extra">Fabrice<br></div></div>
Baruch Siach June 28, 2018, 3:25 a.m. UTC | #4
Hi Fabrice,

On Wed, Jun 27, 2018 at 06:24:34PM +0200, Fabrice Fontaine wrote:
> 2018-06-27 7:35 GMT+02:00 Fabrice Fontaine <fontaine.fabrice@gmail.com>:
> > 2018-06-27 5:36 GMT+02:00 Baruch Siach <baruch@tkos.co.il>:
> >> On Tue, Jun 26, 2018 at 11:43:26PM +0200, Fabrice Fontaine wrote:
> >> > gnuradio needs host-python2 however there is no way to enforce this so
> >> > add a dependency on !BR2_PACKAGE_PYTHON3.
> >> > Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only
> >> > build host-python3.
> >>
> >> Why not just add host-python to _DEPENDENCIES?
> >>
> > Indeed, I will update my patch. Thanks for your help.
>
> After testing this option, this does not work. host-python2 is indeed built
> but host-python3 is also built.
> As a result, host-python-mako and host-python-six are built only for
> host-python3 and not for host-python2. I don't know if this the expected
> behavior,perhaps buildroot should always build the python2 and python3 host
> packages?

Not sure what the right solution here is.

Yegor, do you have an idea?

baruch

> >> > This issue was not raised in the previous version of gnuradio as
> >> > host-python-cheetah was the only dependency and host-python-cheetah
> >> > enforces python2 through HOST_PYTHON_CHEETAH_NEEDS_HOST_PYTHON however
> >> > we now have host-python-six and host-python-mako dependencies and it
> >> > does not seem right to enforces python2 on those packages
> >> >
> >> > Fixes:
> >> >  - http://autobuild.buildroot.net/results/a502fef3e2a40f38ca633
> >> 32440b0b6bd2ed11d5a
> >> >
> >> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> >> > ---
> >> >  package/gnuradio/Config.in | 2 ++
> >> >  1 file changed, 2 insertions(+)
> >> >
> >> > diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
> >> > index f748b902a7..25131fb105 100644
> >> > --- a/package/gnuradio/Config.in
> >> > +++ b/package/gnuradio/Config.in
> >> > @@ -1,5 +1,6 @@
> >> >  comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic
> >> library"
> >> >       depends on BR2_USE_MMU
> >> > +     depends on !BR2_PACKAGE_PYTHON3
> >> >       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
> >> >               !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
> >> >
> >> > @@ -10,6 +11,7 @@ config BR2_PACKAGE_GNURADIO
> >> >       depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
> >> >       depends on BR2_USE_MMU # use fork()
> >> >       depends on BR2_USE_WCHAR # boost
> >> > +     depends on !BR2_PACKAGE_PYTHON3
> >> >       select BR2_PACKAGE_BOOST
> >> >       select BR2_PACKAGE_BOOST_DATE_TIME
> >> >       select BR2_PACKAGE_BOOST_FILESYSTEM
Yegor Yefremov June 28, 2018, 7:58 a.m. UTC | #5
Hi Fabrice, Baruch,

On Thu, Jun 28, 2018 at 5:25 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> Hi Fabrice,
>
> On Wed, Jun 27, 2018 at 06:24:34PM +0200, Fabrice Fontaine wrote:
>> 2018-06-27 7:35 GMT+02:00 Fabrice Fontaine <fontaine.fabrice@gmail.com>:
>> > 2018-06-27 5:36 GMT+02:00 Baruch Siach <baruch@tkos.co.il>:
>> >> On Tue, Jun 26, 2018 at 11:43:26PM +0200, Fabrice Fontaine wrote:
>> >> > gnuradio needs host-python2 however there is no way to enforce this so
>> >> > add a dependency on !BR2_PACKAGE_PYTHON3.
>> >> > Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only
>> >> > build host-python3.
>> >>
>> >> Why not just add host-python to _DEPENDENCIES?
>> >>
>> > Indeed, I will update my patch. Thanks for your help.
>>
>> After testing this option, this does not work. host-python2 is indeed built
>> but host-python3 is also built.
>> As a result, host-python-mako and host-python-six are built only for
>> host-python3 and not for host-python2. I don't know if this the expected
>> behavior,perhaps buildroot should always build the python2 and python3 host
>> packages?
>
> Not sure what the right solution here is.
>
> Yegor, do you have an idea?

This patch did it for me. I've made "make defconfig", select ARM for
A8 series, Linaro toolchain and python 2. Then I've just selected
gnuradio and its python support.

In this case no host-python3 will be built because we select general
Python 2 support for the target (as gnuradio enforces) and hence only
host-python will be built.

@Fabrice have you performed "make clean" after adding host-python to
the dependencies?

diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk
index e79f848388..f2486a2fd2 100644
--- a/package/gnuradio/gnuradio.mk
+++ b/package/gnuradio/gnuradio.mk
@@ -14,6 +14,7 @@ GNURADIO_SUPPORTS_IN_SOURCE_BUILD = NO
 # host-python-cheetah, host-python-mako and host-python-six are needed for volk
 # to compile
 GNURADIO_DEPENDENCIES = \
+       host-python \
        host-python-cheetah \
        host-python-mako \
        host-python-six \

Yegor
Thomas Petazzoni June 28, 2018, 8:23 a.m. UTC | #6
Hello Yegor,

On Thu, 28 Jun 2018 09:58:21 +0200, Yegor Yefremov wrote:

> This patch did it for me. I've made "make defconfig", select ARM for
> A8 series, Linaro toolchain and python 2. Then I've just selected
> gnuradio and its python support.
> 
> In this case no host-python3 will be built because we select general
> Python 2 support for the target (as gnuradio enforces) and hence only
> host-python will be built.

Did you test with python3 enabled for the target ?

Then you will see the problem that Fabrice is facing.

When python3 is enabled for the target, then the default host python
version is python3. And due to this, all external host Python modules
are installed for host python3, and not available for host python2.

Best regards,

Thomas
Yegor Yefremov June 28, 2018, 9:15 a.m. UTC | #7
Hi Thomas,

On Thu, Jun 28, 2018 at 10:23 AM, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
> Hello Yegor,
>
> On Thu, 28 Jun 2018 09:58:21 +0200, Yegor Yefremov wrote:
>
>> This patch did it for me. I've made "make defconfig", select ARM for
>> A8 series, Linaro toolchain and python 2. Then I've just selected
>> gnuradio and its python support.
>>
>> In this case no host-python3 will be built because we select general
>> Python 2 support for the target (as gnuradio enforces) and hence only
>> host-python will be built.
>
> Did you test with python3 enabled for the target ?
>
> Then you will see the problem that Fabrice is facing.
>
> When python3 is enabled for the target, then the default host python
> version is python3. And due to this, all external host Python modules
> are installed for host python3, and not available for host python2.

You're right. Then for now I see only one quick and dirty hack -
install host versions of six and mako when installing host-python by
default.

Yegor
Thomas Petazzoni June 28, 2018, 9:20 a.m. UTC | #8
Hello,

On Thu, 28 Jun 2018 11:15:36 +0200, Yegor Yefremov wrote:

> > When python3 is enabled for the target, then the default host python
> > version is python3. And due to this, all external host Python modules
> > are installed for host python3, and not available for host python2.  
> 
> You're right. Then for now I see only one quick and dirty hack -
> install host versions of six and mako when installing host-python by
> default.

We also need to take into account the requirements of:

  http://patchwork.ozlabs.org/patch/906837/
  http://patchwork.ozlabs.org/patch/906838/

when designing a solution to solve this problem.

Best regards,

Thomas
Yegor Yefremov June 28, 2018, 10:02 a.m. UTC | #9
On Thu, Jun 28, 2018 at 11:20 AM, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
> Hello,
>
> On Thu, 28 Jun 2018 11:15:36 +0200, Yegor Yefremov wrote:
>
>> > When python3 is enabled for the target, then the default host python
>> > version is python3. And due to this, all external host Python modules
>> > are installed for host python3, and not available for host python2.
>>
>> You're right. Then for now I see only one quick and dirty hack -
>> install host versions of six and mako when installing host-python by
>> default.
>
> We also need to take into account the requirements of:
>
>   http://patchwork.ozlabs.org/patch/906837/
>   http://patchwork.ozlabs.org/patch/906838/
>
> when designing a solution to solve this problem.

@Fabrice: could you try the latest next branch[1]? It has some Python
3 related fixes. Perhaps one doesn't need to enforce python 2 anymore?

[1] https://github.com/gnuradio/gnuradio/commits/next

Yegor
Fabrice Fontaine June 28, 2018, 5:25 p.m. UTC | #10
Dear Yegor,

2018-06-28 12:02 GMT+02:00 Yegor Yefremov <yegorslists@googlemail.com>:

> On Thu, Jun 28, 2018 at 11:20 AM, Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> > Hello,
> >
> > On Thu, 28 Jun 2018 11:15:36 +0200, Yegor Yefremov wrote:
> >
> >> > When python3 is enabled for the target, then the default host python
> >> > version is python3. And due to this, all external host Python modules
> >> > are installed for host python3, and not available for host python2.
> >>
> >> You're right. Then for now I see only one quick and dirty hack -
> >> install host versions of six and mako when installing host-python by
> >> default.
> >
> > We also need to take into account the requirements of:
> >
> >   http://patchwork.ozlabs.org/patch/906837/
> >   http://patchwork.ozlabs.org/patch/906838/
> >
> > when designing a solution to solve this problem.
>
> @Fabrice: could you try the latest next branch[1]? It has some Python
> 3 related fixes. Perhaps one doesn't need to enforce python 2 anymore?
>
> [1] https://github.com/gnuradio/gnuradio/commits/next

Next branch builds fine however it seems there is outstanding issues:
https://github.com/gnuradio/gnuradio/issues/1842. What should we do until
an official release is made with python3 support?

>
>
> Yegor
>
Best Regards,

Fabrice
<div dir="ltr">Dear Yegor,<div class="gmail_extra"><br><div class="gmail_quote">2018-06-28 12:02 GMT+02:00 Yegor Yefremov <span dir="ltr">&lt;<a href="mailto:yegorslists@googlemail.com" target="_blank">yegorslists@googlemail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On Thu, Jun 28, 2018 at 11:20 AM, Thomas Petazzoni<br>
&lt;<a href="mailto:thomas.petazzoni@bootlin.com" target="_blank">thomas.petazzoni@bootlin.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; On Thu, 28 Jun 2018 11:15:36 +0200, Yegor Yefremov wrote:<br>
&gt;<br>
&gt;&gt; &gt; When python3 is enabled for the target, then the default host python<br>
&gt;&gt; &gt; version is python3. And due to this, all external host Python modules<br>
&gt;&gt; &gt; are installed for host python3, and not available for host python2.<br>
&gt;&gt;<br>
&gt;&gt; You&#39;re right. Then for now I see only one quick and dirty hack -<br>
&gt;&gt; install host versions of six and mako when installing host-python by<br>
&gt;&gt; default.<br>
&gt;<br>
&gt; We also need to take into account the requirements of:<br>
&gt;<br>
&gt;   <a href="http://patchwork.ozlabs.org/patch/906837/" rel="noreferrer" target="_blank">http://patchwork.ozlabs.org/p<wbr>atch/906837/</a><br>
&gt;   <a href="http://patchwork.ozlabs.org/patch/906838/" rel="noreferrer" target="_blank">http://patchwork.ozlabs.org/p<wbr>atch/906838/</a><br>
&gt;<br>
&gt; when designing a solution to solve this problem.<br>
<br>
</span>@Fabrice: could you try the latest next branch[1]? It has some Python<br>
3 related fixes. Perhaps one doesn&#39;t need to enforce python 2 anymore?<br>
<br>
[1] <a href="https://github.com/gnuradio/gnuradio/commits/next" rel="noreferrer" target="_blank">https://github.com/gnuradio/gn<wbr>uradio/commits/next</a></blockquote><div>Next branch builds fine however it seems there is outstanding issues: <a href="https://github.com/gnuradio/gnuradio/issues/1842" target="_blank">https://github.com/<wbr>gnuradio/gnuradio/issues/1842</a>. What should we do until an official release is made with python3 support?<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<span class="m_2350642898036909016gmail-m_4208032019546113764HOEnZb"><font color="#888888"><br>
Yegor<br>
</font></span></blockquote></div>Best Regards,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Fabrice</div></div>
Trent Piepho June 28, 2018, 6:46 p.m. UTC | #11
On Thu, 2018-06-28 at 06:25 +0300, Baruch Siach wrote:
> Hi Fabrice,
> 
> On Wed, Jun 27, 2018 at 06:24:34PM +0200, Fabrice Fontaine wrote:
> > 2018-06-27 7:35 GMT+02:00 Fabrice Fontaine <fontaine.fabrice@gmail.
> > com>:
> > > 2018-06-27 5:36 GMT+02:00 Baruch Siach <baruch@tkos.co.il>:
> > > > On Tue, Jun 26, 2018 at 11:43:26PM +0200, Fabrice Fontaine
> > > > wrote:
> > > > > gnuradio needs host-python2 however there is no way to
> > > > > enforce this so
> > > > > add a dependency on !BR2_PACKAGE_PYTHON3.
> > > > > Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot
> > > > > will only
> > > > > build host-python3.
> > > > 
> > > > Why not just add host-python to _DEPENDENCIES?
> > > > 
> > > 
> > > Indeed, I will update my patch. Thanks for your help.
> > 
> > After testing this option, this does not work. host-python2 is
> > indeed built
> > but host-python3 is also built.
> > As a result, host-python-mako and host-python-six are built only
> > for
> > host-python3 and not for host-python2. I don't know if this the
> > expected
> > behavior,perhaps buildroot should always build the python2 and
> > python3 host
> > packages?
> 
> Not sure what the right solution here is.
> 
> Yegor, do you have an idea?

I sent a patch series out some time ago that allows selecting the host
python version to be used for creating python packages.

It would allow selecting python2 to be used for host python packages,
and still get the host-python3 *interpreter* built if something needs
that too.

However, it does not allow:
Building host python packages for multiple python versions.
Building host python packages for a different python version than is
used on the target, if the target has python.

So if we start with the requirement that we must have host-python-mako
for python2, then from that follows that host-python-six and host-
python-etcetc must be for python2 as well.  And if the target has
python, it must also be python2.

Fixing this is hard to to do in buildroot.  It ends up with the need to
build a package twice, once for python2 and again for python3. 
Buildroot doesn't like two builds of the same package.

Maybe turn host python packages into two packages?  host-python2-mako
and host-python3-mako.  eval host-python-package creates one or both
packages.  Maybe that could fit in.

Or maybe that's too complex.  You get to pick one python version and
all python packages are that version.  If you want a python2 only
package and a python3 only package, too bad.  Port one of them to the
other python version.  As python3 support grows, this will be less and
less of a problem.
Thomas Petazzoni July 19, 2018, 3:02 p.m. UTC | #12
Hello,

On Thu, 28 Jun 2018 19:25:32 +0200, Fabrice Fontaine wrote:

> Next branch builds fine however it seems there is outstanding issues:
> https://github.com/gnuradio/gnuradio/issues/1842. What should we do until
> an official release is made with python3 support?

In the mean time, I think I will just apply your patch that adds the
"depends on !BR2_PACKAGE_PYTHON3". It's not great, but it's not the
only simple approach to resolve the build failures.

In today's Buildroot, if a package needs host Python modules in the
Python version which is not the default one, this is not supported, and
it will be difficult to support this.

Thomas
Thomas Petazzoni Aug. 5, 2018, 12:39 p.m. UTC | #13
Hello,

On Tue, 26 Jun 2018 23:43:26 +0200, Fabrice Fontaine wrote:
> gnuradio needs host-python2 however there is no way to enforce this so
> add a dependency on !BR2_PACKAGE_PYTHON3.
> Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only
> build host-python3.
> This issue was not raised in the previous version of gnuradio as
> host-python-cheetah was the only dependency and host-python-cheetah
> enforces python2 through HOST_PYTHON_CHEETAH_NEEDS_HOST_PYTHON however
> we now have host-python-six and host-python-mako dependencies and it
> does not seem right to enforces python2 on those packages
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/a502fef3e2a40f38ca63332440b0b6bd2ed11d5a
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/gnuradio/Config.in | 2 ++
>  1 file changed, 2 insertions(+)

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in
index f748b902a7..25131fb105 100644
--- a/package/gnuradio/Config.in
+++ b/package/gnuradio/Config.in
@@ -1,5 +1,6 @@ 
 comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library"
 	depends on BR2_USE_MMU
+	depends on !BR2_PACKAGE_PYTHON3
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
 
@@ -10,6 +11,7 @@  config BR2_PACKAGE_GNURADIO
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_USE_MMU # use fork()
 	depends on BR2_USE_WCHAR # boost
+	depends on !BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_BOOST_DATE_TIME
 	select BR2_PACKAGE_BOOST_FILESYSTEM