Message ID | 20170112191523.23814-2-wak@google.com |
---|---|
State | Changes Requested |
Headers | show |
William, All, On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly: > Currently python-protobuf does not allow be built as a host package > during a cross compile. We would like to be able to build nanopb as a > host package but can't without host-python-protobuf. > > Signed-off-by: William A. Kennington III <wak@google.com> > --- > package/python-protobuf/python-protobuf.mk | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk > index d8be76dd7..d46bda243 100644 > --- a/package/python-protobuf/python-protobuf.mk > +++ b/package/python-protobuf/python-protobuf.mk > @@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf > PYTHON_PROTOBUF_SETUP_TYPE = setuptools > PYTHON_PROTOBUF_SUBDIR = python > > +$(eval $(host-python-package)) > $(eval $(python-package)) This is not documented (AFAIK), but the host variant must go after the target variant. Otherwise, strange things can happen (because of the way variables have default values that depend on the order of evaluation, like the source archive for example). Note: this is valid for the following patch as awell, of course. Regards, Yann E. MORIN.
Wlliam, All, On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly: > Currently python-protobuf does not allow be built as a host package > during a cross compile. We would like to be able to build nanopb as a > host package but can't without host-python-protobuf. > > Signed-off-by: William A. Kennington III <wak@google.com> > --- > package/python-protobuf/python-protobuf.mk | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk > index d8be76dd7..d46bda243 100644 > --- a/package/python-protobuf/python-protobuf.mk > +++ b/package/python-protobuf/python-protobuf.mk > @@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf > PYTHON_PROTOBUF_SETUP_TYPE = setuptools > PYTHON_PROTOBUF_SUBDIR = python > > +$(eval $(host-python-package)) Oh, I forgot: the dependencies for the host variant must be explicitly specified: HOST_PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf Regards, Yann E. MORIN. > $(eval $(python-package)) > -- > 2.11.0 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
On 15-01-17 22:30, Yann E. MORIN wrote: > William, All, > > On 2017-01-12 11:15 -0800, William A. Kennington III spake thusly: >> Currently python-protobuf does not allow be built as a host package >> during a cross compile. We would like to be able to build nanopb as a >> host package but can't without host-python-protobuf. >> >> Signed-off-by: William A. Kennington III <wak@google.com> >> --- >> package/python-protobuf/python-protobuf.mk | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk >> index d8be76dd7..d46bda243 100644 >> --- a/package/python-protobuf/python-protobuf.mk >> +++ b/package/python-protobuf/python-protobuf.mk >> @@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf >> PYTHON_PROTOBUF_SETUP_TYPE = setuptools >> PYTHON_PROTOBUF_SUBDIR = python >> >> +$(eval $(host-python-package)) >> $(eval $(python-package)) > > This is not documented (AFAIK), but the host variant must go after the > target variant. Otherwise, strange things can happen (because of the way > variables have default values that depend on the order of evaluation, > like the source archive for example). I think that this is not true. If it were true, then it would mean that host-only packages would be problematic, no? In fact, it is the host-after-target order where strange things could happen, but package-generic obviously deals with those strange things :-). That said, the Buildroot convention is to have host after target, so William, please do it like that. Regards, Arnout > Note: this is valid for the following patch as awell, of course. > > Regards, > Yann E. MORIN. > >
diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk index d8be76dd7..d46bda243 100644 --- a/package/python-protobuf/python-protobuf.mk +++ b/package/python-protobuf/python-protobuf.mk @@ -13,4 +13,5 @@ PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf PYTHON_PROTOBUF_SETUP_TYPE = setuptools PYTHON_PROTOBUF_SUBDIR = python +$(eval $(host-python-package)) $(eval $(python-package))
Currently python-protobuf does not allow be built as a host package during a cross compile. We would like to be able to build nanopb as a host package but can't without host-python-protobuf. Signed-off-by: William A. Kennington III <wak@google.com> --- package/python-protobuf/python-protobuf.mk | 1 + 1 file changed, 1 insertion(+)