<?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>14953</bug_id>
          
          <creation_ts>2022-10-31 23:15:01 +0000</creation_ts>
          <short_desc>gcc-cross-canadian-x86-64 do_install failure</short_desc>
          <delta_ts>2022-11-28 10:26:29 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandre Belloni">alexandre.belloni</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alexandre.belloni</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</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>94315</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2022-10-31 23:15:01 +0000</bug_when>
    <thetext>do_install fails while building gcc which is weird:

g++  -c -DIN_GCC     -isystem/home/pokybuild/yocto-worker/genericx86-64/build/build/tmp/work/i686-nativesdk-pokysdk-linux/nativesdk-gcc/12.2.0-r0/recipe-sysroot-native/usr/include -O2 -pipe  -DGENERATOR_FILE -I. -Ibuild -I../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc -I../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/build -I../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/../include  -I../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/../libcpp/include  \
| 	-o build/gengtype-lex.o ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc
| In file included from ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc:1:
| ./config.h:4:2: error: #error config.h is for the host, not build, machine.
|     4 | #error config.h is for the host, not build, machine.
|       |  ^~~~~
| ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc:2:2: error: #else without #if
|     2 | #else
|       |  ^~~~
| In file included from ./bconfig.h:3

https://autobuilder.yoctoproject.org/typhoon/#builders/37/builds/6075/steps/11/logs/stdio

genericx86-64 fedora35-ty-2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94316</commentid>
    <comment_count>1</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2022-10-31 23:16:16 +0000</bug_when>
    <thetext>builddir saved as bug14953 on fedora35-ty-2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94319</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-11-01 14:49:23 +0000</bug_when>
    <thetext>$ cat gengtype-lex.cc 
#include &quot;config.h&quot;
#else
#include &quot;bconfig.h&quot;
#endif
#ifdef HOST_GENERATOR_FILE

which compared to my local build is completely wrong.

Something has corrupted the file which is why the two builds fail, the question then becomes how did this file in the shared workdir become corrupted. It may be related to the presence or lack of presence of flex and the file being regenerated in some cases?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94320</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-11-01 14:52:13 +0000</bug_when>
    <thetext>log.do_install.2834110  contains:

flex  -o../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.l &amp;&amp; { \
  echo &apos;#ifdef HOST_GENERATOR_FILE&apos; &gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  echo &apos;#include &quot;config.h&quot;&apos;       &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  echo &apos;#else&apos;                     &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  echo &apos;#include &quot;bconfig.h&quot;&apos;      &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  echo &apos;#endif&apos;                    &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  cat ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  mv ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc; \

log.do_install.2834128 contains:

flex  -o../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.l &amp;&amp; { \
  echo &apos;#ifdef HOST_GENERATOR_FILE&apos; &gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  echo &apos;#include &quot;config.h&quot;&apos;       &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  echo &apos;#else&apos;                     &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  echo &apos;#include &quot;bconfig.h&quot;&apos;      &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  echo &apos;#endif&apos;                    &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  cat ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc &gt;&gt; ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp; \
  mv ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc.tmp ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/gengtype-lex.cc; \

so likely a race between them?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94321</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-11-01 14:54:48 +0000</bug_when>
    <thetext>My local build has flex in the recipe sysroot but doesn&apos;t regenerate this file. I&apos;m not sure why it thought it needed to regenerate gengtype-lex.cc on the autobuilder build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94339</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-11-03 12:43:00 +0000</bug_when>
    <thetext>There were several issues. The gengtype regeneration code in gcc hadn&apos;t been updated with the .c -&gt; .cc file move in upstream. The gcc shared workdir was also causing timestamp problems in general as the SDE wasn&apos;t propagating to the recipe workdir. If that is fixed, the gengtype file deletion can also simply be removed. Patches on the list doing all that which should resolve this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94459</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-11-28 10:26:29 +0000</bug_when>
    <thetext>https://git.yoctoproject.org/poky/commit/?id=4b80c6cdc01e3aa2d5971b880e33f360feaa528d
https://git.yoctoproject.org/poky/commit/?id=b964727e3a33d2d990891719dda2863198e8f861
https://git.yoctoproject.org/poky/commit/?id=82d294860b07a0726664b1ac1e9db6517ae25fca
https://git.yoctoproject.org/poky/commit/?id=2cdaa164e8b4618a82ccd3fcb87cf58e36b6d6d3</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>