<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5329</bug_id>
          
          <creation_ts>2013-10-09 14:12:07 +0000</creation_ts>
          <short_desc>flex broken on target due to sysroot path to m4</short_desc>
          <delta_ts>2013-11-20 15:43:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>1.5</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Laurentiu Palcu">laurentiu.palcu</assigned_to>
          <cc>diego.ml</cc>
    
    <cc>dvhart</cc>
    
    <cc>enrico.scholz</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>olof.johansson</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37780</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-10-09 14:12:07 +0000</bug_when>
    <thetext>If you attempt to use flex on the target it tries to call m4 at the sysroot path and fails:

flex: fatal internal error, exec of /opt/yocto_builder/build/tmp/sysroots/x86_64-linux/usr/bin/m4 failed

This was fixed earlier using a wrapper script:

http://cgit.openembedded.org/openembedded-core/commit/?id=7bdb617f2f0e246feb4dc32931fdb87258fd1207

But then seems to have regressed after this change:

http://cgit.openembedded.org/openembedded-core/commit/?id=2ca72d35e839a0fa24d33bf75343f187792f4e2c

It&apos;s also worth noting that flex currently doesn&apos;t have a runtime dependency on m4. I&apos;m not 100% sure that it&apos;s needed, but if it can&apos;t process the examples/testxxLexer.l file supplied with flex without calling it (as seen here) it does suggest that it is required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38565</commentid>
    <comment_count>1</comment_count>
    <who name="Enrico Scholz">enrico.scholz</who>
    <bug_when>2013-11-05 18:03:42 +0000</bug_when>
    <thetext>will

EXTRA_OECONF += &quot; ac_cv_path_M4=${M4}&quot;
EXTRA_OEMAKE += &quot; m4=${M4_class-native}&quot;

solve it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38566</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-11-05 18:21:41 +0000</bug_when>
    <thetext>That would be preferable to the profile.d-based fix, however it&apos;s somewhat unorthodox to use overrides in the manner the second line does. We do also need the extra RDEPENDS as far as I can tell.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38568</commentid>
    <comment_count>3</comment_count>
    <who name="Enrico Scholz">enrico.scholz</who>
    <bug_when>2013-11-05 18:53:14 +0000</bug_when>
    <thetext>When it is really too unorthodix, then add add a helper variable

M4NATIVE = &quot;${STAGING_BINDIR_NATIVE}/m4&quot;
M4_class-native = &quot;${M4NATIVE}&quot;
EXTRA_OECONF += &quot;ac_cv_path_M4=${M4}&quot;
EXTRA_OEMAKE += &quot;m4=${M4NATIVE}&quot;

About which RDEPENDS are you speaking?  By using fix above, all the &apos;create_wrapper&apos; appends can be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38569</commentid>
    <comment_count>4</comment_count>
    <who name="Enrico Scholz">enrico.scholz</who>
    <bug_when>2013-11-05 18:59:44 +0000</bug_when>
    <thetext>By looker further into it, the M4 variable can be removed completely when &apos;create_wrapper&apos; scripts are removed. So, add

EXTRA_OECONF += &quot;ac_cv_path_M4=${bindir}/m4&quot;
EXTRA_OEMAKE += &quot;m4=${STAGING_BINDIR_NATIVE}/m4&quot;

and remove &apos;M4* = ...&apos; and the do_install_append...()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38947</commentid>
    <comment_count>5</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2013-11-20 15:43:22 +0000</bug_when>
    <thetext>Merged in master:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9a6ee8b447ee6070b23bb11fd3dd7fabf0d9ab80</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>