Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] flex: fix m4 issue on target
@ 2013-11-05 14:58 Laurentiu Palcu
  2013-11-05 14:58 ` [PATCH 1/1] " Laurentiu Palcu
  0 siblings, 1 reply; 4+ messages in thread
From: Laurentiu Palcu @ 2013-11-05 14:58 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 57498cede4696526c121e0112b5dea3e6e8365ac:

  bitbake: toaster: fix target package information (2013-11-05 12:50:44 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib lpalcu/b5329_flex_issue_target
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/b5329_flex_issue_target

Laurentiu Palcu (1):
  flex: fix m4 issue on target

 meta/recipes-devtools/flex/flex.inc |    7 +++++++
 1 file changed, 7 insertions(+)

-- 
1.7.9.5



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

* [PATCH 1/1] flex: fix m4 issue on target
  2013-11-05 14:58 [PATCH 0/1] flex: fix m4 issue on target Laurentiu Palcu
@ 2013-11-05 14:58 ` Laurentiu Palcu
  2013-11-05 16:16   ` Enrico Scholz
  0 siblings, 1 reply; 4+ messages in thread
From: Laurentiu Palcu @ 2013-11-05 14:58 UTC (permalink / raw)
  To: openembedded-core

Flex needs m4 to run (see below) and, since the create_wrapper
introduces a bash dependency, export the right m4 path when /etc/profile
is sourced by the shell.

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 |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
index 43f1dda..eed2908 100644
--- a/meta/recipes-devtools/flex/flex.inc
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -13,6 +13,11 @@ inherit autotools gettext
 M4 = "${bindir}/m4"
 M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
 
+do_install_append_class-target() {
+	install -d ${D}${sysconfdir}/profile.d
+	echo "export M4=${M4}" > ${D}${sysconfdir}/profile.d/flex.sh
+}
+
 do_install_append_class-native() {
 	create_wrapper ${D}/${bindir}/flex M4=${M4}
 }
@@ -20,3 +25,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



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

* Re: [PATCH 1/1] flex: fix m4 issue on target
  2013-11-05 14:58 ` [PATCH 1/1] " Laurentiu Palcu
@ 2013-11-05 16:16   ` Enrico Scholz
  2013-11-06 10:39     ` Laurentiu Palcu
  0 siblings, 1 reply; 4+ messages in thread
From: Enrico Scholz @ 2013-11-05 16:16 UTC (permalink / raw)
  To: openembedded-core; +Cc: Laurentiu Palcu

Laurentiu Palcu
<laurentiu.palcu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:

> Flex needs m4 to run (see below) and, since the create_wrapper
> introduces a bash dependency, export the right m4 path when /etc/profile
> is sourced by the shell.
>
> 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."

Content at profile.d/ won't be evaluated when program is started without
a shell (e.g. by 'execlp("flex", "flex", ...)').  


> [YOCTO #5329]

This should be solved by defining a correct path for the m4 binary at
build time.

EXTRA_OECONF += " ac_cv_path_M4=${M4}"
EXTRA_OEMAKE += " m4=${M4_class-native}"

is probably a better solution.



Enrico


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

* Re: [PATCH 1/1] flex: fix m4 issue on target
  2013-11-05 16:16   ` Enrico Scholz
@ 2013-11-06 10:39     ` Laurentiu Palcu
  0 siblings, 0 replies; 4+ messages in thread
From: Laurentiu Palcu @ 2013-11-06 10:39 UTC (permalink / raw)
  To: Enrico Scholz

Hi Enrico,

On Tue, Nov 05, 2013 at 05:16:45PM +0100, Enrico Scholz wrote:
> 
> 
> Laurentiu Palcu
> <laurentiu.palcu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:
> 
> > Flex needs m4 to run (see below) and, since the create_wrapper
> > introduces a bash dependency, export the right m4 path when /etc/profile
> > is sourced by the shell.
> >
> > 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."
> 
> Content at profile.d/ won't be evaluated when program is started without
> a shell (e.g. by 'execlp("flex", "flex", ...)').  
> 
> 
> > [YOCTO #5329]
> 
> This should be solved by defining a correct path for the m4 binary at
> build time.
> 
> EXTRA_OECONF += " ac_cv_path_M4=${M4}"
> EXTRA_OEMAKE += " m4=${M4_class-native}"
This is, indeed, a better solution for the target issue. But, I don't
think we can remove the wrapper scripts for native/nativesdk packages
(as you suggested in bugzilla). And the reason for that are those guys
using sstate from build machines. They'll end up with flex searching for
m4 in a path belonging to the build machine.

I'll prepare a v2.

Laurentiu
> 
> is probably a better solution.
> 
> 
> 
> Enrico
> 


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

end of thread, other threads:[~2013-11-06 11:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05 14:58 [PATCH 0/1] flex: fix m4 issue on target Laurentiu Palcu
2013-11-05 14:58 ` [PATCH 1/1] " Laurentiu Palcu
2013-11-05 16:16   ` Enrico Scholz
2013-11-06 10:39     ` Laurentiu Palcu

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