Patchwork [v2,1/1] flex: fix m4 issue on target

login
register
mail settings
Submitter Laurentiu Palcu
Date Nov. 6, 2013, 1:07 p.m.
Message ID <0dcafa1bce7a6ae871ee0f6b20eab8834860b334.1383742507.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/61199/
State New
Headers show

Comments

Laurentiu Palcu - Nov. 6, 2013, 1:07 p.m.
Flex needs m4 to run (see below) and, since the create_wrapper
introduces a bash dependency on target, give the path to m4 binary in
the configure command line.

Snippet from the flex documentation:
"The macro processor m4 must be installed wherever flex is installed.
<...>
m4 is only required at the time you run flex."

[YOCTO #5329]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/recipes-devtools/flex/flex.inc |    5 +++++
 1 file changed, 5 insertions(+)
Laurentiu Palcu - Nov. 14, 2013, 12:43 p.m.
Even though this was in the last C-pull, for some reason, it didn't end
up in master... Didn't see any comments on it either. Or maybe I missed
them...

Thanks,
Laurentiu

On Wed, Nov 06, 2013 at 03:07:58PM +0200, Laurentiu Palcu wrote:
> Flex needs m4 to run (see below) and, since the create_wrapper
> introduces a bash dependency on target, give the path to m4 binary in
> the configure command line.
> 
> Snippet from the flex documentation:
> "The macro processor m4 must be installed wherever flex is installed.
> <...>
> m4 is only required at the time you run flex."
> 
> [YOCTO #5329]
> 
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
>  meta/recipes-devtools/flex/flex.inc |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
> index 43f1dda..96d5de5 100644
> --- a/meta/recipes-devtools/flex/flex.inc
> +++ b/meta/recipes-devtools/flex/flex.inc
> @@ -13,6 +13,9 @@ inherit autotools gettext
>  M4 = "${bindir}/m4"
>  M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
>  
> +EXTRA_OECONF += "ac_cv_path_M4=${M4}"
> +EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
> +
>  do_install_append_class-native() {
>  	create_wrapper ${D}/${bindir}/flex M4=${M4}
>  }
> @@ -20,3 +23,5 @@ do_install_append_class-native() {
>  do_install_append_class-nativesdk() {
>  	create_wrapper ${D}/${bindir}/flex M4=${M4}
>  }
> +
> +RDEPENDS_${PN} += "m4"
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Richard Purdie - Nov. 14, 2013, 1:19 p.m.
On Thu, 2013-11-14 at 14:43 +0200, Laurentiu Palcu wrote:
> Even though this was in the last C-pull, for some reason, it didn't end
> up in master... Didn't see any comments on it either. Or maybe I missed
> them...

In the target case, M4 should be compiled in as ${bindir}/m4 and there
should be no need of a wrapper. Can someone confirm this is the case? Is
the OEMAKE command only used for compilation and not built into the
target?

Cheers,

Richard


> Thanks,
> Laurentiu
> 
> On Wed, Nov 06, 2013 at 03:07:58PM +0200, Laurentiu Palcu wrote:
> > Flex needs m4 to run (see below) and, since the create_wrapper
> > introduces a bash dependency on target, give the path to m4 binary in
> > the configure command line.
> > 
> > Snippet from the flex documentation:
> > "The macro processor m4 must be installed wherever flex is installed.
> > <...>
> > m4 is only required at the time you run flex."
> > 
> > [YOCTO #5329]
> > 
> > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> > ---
> >  meta/recipes-devtools/flex/flex.inc |    5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
> > index 43f1dda..96d5de5 100644
> > --- a/meta/recipes-devtools/flex/flex.inc
> > +++ b/meta/recipes-devtools/flex/flex.inc
> > @@ -13,6 +13,9 @@ inherit autotools gettext
> >  M4 = "${bindir}/m4"
> >  M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
> >  
> > +EXTRA_OECONF += "ac_cv_path_M4=${M4}"
> > +EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
> > +
> >  do_install_append_class-native() {
> >  	create_wrapper ${D}/${bindir}/flex M4=${M4}
> >  }
> > @@ -20,3 +23,5 @@ do_install_append_class-native() {
> >  do_install_append_class-nativesdk() {
> >  	create_wrapper ${D}/${bindir}/flex M4=${M4}
> >  }
> > +
> > +RDEPENDS_${PN} += "m4"
> > -- 
> > 1.7.9.5
> > 
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
Laurentiu Palcu - Nov. 14, 2013, 1:52 p.m.
On Thu, Nov 14, 2013 at 01:19:10PM +0000, Richard Purdie wrote:
> On Thu, 2013-11-14 at 14:43 +0200, Laurentiu Palcu wrote:
> > Even though this was in the last C-pull, for some reason, it didn't end
> > up in master... Didn't see any comments on it either. Or maybe I missed
> > them...
> 
> In the target case, M4 should be compiled in as ${bindir}/m4 and there
> should be no need of a wrapper. Can someone confirm this is the case? Is
> the OEMAKE command only used for compilation and not built into the
> target?
The m4 variable set in EXTRA_OEMAKE is used to generate skel.c file. And, for
that, it needs the native m4. It does not end into the target. The path
set with ac_cv_path_M4=${M4} in EXTRA_OECONF ends into the target.

Laurentiu
> 
> Cheers,
> 
> Richard
> 
> 
> > Thanks,
> > Laurentiu
> > 
> > On Wed, Nov 06, 2013 at 03:07:58PM +0200, Laurentiu Palcu wrote:
> > > Flex needs m4 to run (see below) and, since the create_wrapper
> > > introduces a bash dependency on target, give the path to m4 binary in
> > > the configure command line.
> > > 
> > > Snippet from the flex documentation:
> > > "The macro processor m4 must be installed wherever flex is installed.
> > > <...>
> > > m4 is only required at the time you run flex."
> > > 
> > > [YOCTO #5329]
> > > 
> > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> > > ---
> > >  meta/recipes-devtools/flex/flex.inc |    5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
> > > index 43f1dda..96d5de5 100644
> > > --- a/meta/recipes-devtools/flex/flex.inc
> > > +++ b/meta/recipes-devtools/flex/flex.inc
> > > @@ -13,6 +13,9 @@ inherit autotools gettext
> > >  M4 = "${bindir}/m4"
> > >  M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
> > >  
> > > +EXTRA_OECONF += "ac_cv_path_M4=${M4}"
> > > +EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
> > > +
> > >  do_install_append_class-native() {
> > >  	create_wrapper ${D}/${bindir}/flex M4=${M4}
> > >  }
> > > @@ -20,3 +23,5 @@ do_install_append_class-native() {
> > >  do_install_append_class-nativesdk() {
> > >  	create_wrapper ${D}/${bindir}/flex M4=${M4}
> > >  }
> > > +
> > > +RDEPENDS_${PN} += "m4"
> > > -- 
> > > 1.7.9.5
> > > 
> > > _______________________________________________
> > > Openembedded-core mailing list
> > > Openembedded-core@lists.openembedded.org
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> > 
> 
>

Patch

diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
index 43f1dda..96d5de5 100644
--- a/meta/recipes-devtools/flex/flex.inc
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -13,6 +13,9 @@  inherit autotools gettext
 M4 = "${bindir}/m4"
 M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
 
+EXTRA_OECONF += "ac_cv_path_M4=${M4}"
+EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
+
 do_install_append_class-native() {
 	create_wrapper ${D}/${bindir}/flex M4=${M4}
 }
@@ -20,3 +23,5 @@  do_install_append_class-native() {
 do_install_append_class-nativesdk() {
 	create_wrapper ${D}/${bindir}/flex M4=${M4}
 }
+
+RDEPENDS_${PN} += "m4"