Bug 7287 - perl build race with gcc for the target
Summary: perl build race with gcc for the target
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium+ normal
Target Milestone: 1.8 M3
Assignee: Richard Purdie
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-02-04 19:32 UTC by Paul Eggleton
Modified: 2015-04-28 10:45 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
perl do_compile failure (15.01 KB, text/plain)
2015-02-04 19:32 UTC, Paul Eggleton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2015-02-04 19:32:48 UTC
Created attachment 2390 [details]
perl do_compile failure

If do_populate_sysroot or the setscene equivalent for gcc (gcc for the target, that is) has run when perl's (again for the target) do_compile happens, perl's build-time dependency generation (makedepend) can pick up a dependency on headers staged by the target gcc instead of gcc-cross, e.g. stdint.h. Because there is no dependency relationship this is a race condition that can lead to perl's do_compile to fail (see attached log).
Comment 2 Paul Gortmaker 2015-02-14 15:07:06 UTC
Saw this was fixed with:

ae32fed70e31 gcc-target: Don't install target gcc libdir files

...did a pull and kicked off a build.  Here is what I saw:

------------------------------
| *** Module name OUT: /home/paul/poky/build/tmp/sysroots/x86_64-linux/usr/lib/perl-native/perl/5.20.0/perl-native/perl/5.20.0/re.pm
| make[1]: *** No rule to make target '/home/paul/poky/build/tmp/sysroots/intel-corei7-64/usr/lib/gcc/x86_64-poky-linux/4.9.1/include/stdint.h', needed by 'perlmini.o'.  Stop.
| make[1]: Leaving directory '/home/paul/poky/build/tmp/work/corei7-64-poky-linux/perl/5.20.0-r1/perl-5.20.0'
| Makefile:37: recipe for target 'perl' failed
| make: *** [perl] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/paul/poky/build/tmp/work/corei7-64-poky-linux/perl/5.20.0-r1/temp/run.do_compile.18425:1 exit 1 from
|   exit 1
| ERROR: Function failed: do_compile (log file is located at /home/paul/poky/build/tmp/work/corei7-64-poky-linux/perl/5.20.0-r1/temp/log.do_compile.18425)
ERROR: Task 2225 (/home/paul/poky/meta/recipes-devtools/perl/perl_5.20.0.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5646 tasks of which 2391 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  /home/paul/poky/meta/recipes-devtools/perl/perl_5.20.0.bb, do_compile
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
op3:~/poky/build$ cd ..
op3:~/poky$ git describe
1.7_M2-2172-ga849839f8cb5
op3:~/poky$ git log --oneline HEAD~3..
a849839f8cb5 u-boot.inc: unbreak
ae32fed70e31 gcc-target: Don't install target gcc libdir files
cefc40389e31 autotools/siteinfo: Avoid races over siteinfo files
op3:~/poky$ 
--------------------------

Note the fix commit is clearly present in the above.

I won't reopen this in case it is just some transient sstate related thing, but at the same time I thought it worth a mention.
Comment 3 Paul Gortmaker 2015-02-15 17:38:02 UTC
Switched from core-i7 to core2-duo build, pulled latest and restarted ; same (similar?) race still present.

--------------------------------
| x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/home/paul/poky/build/tmp/sysroots/genericx86-64 -c -DPERL_CORE -O2 -pipe -g -feliminate-unused-debug-types -DDEBIAN -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat -Wwrite-strings -fPIC miniperlmain.c
| make[1]: *** No rule to make target '/home/paul/poky/build/tmp/sysroots/genericx86-64/usr/lib/gcc/x86_64-poky-linux/4.9.1/include/stdint.h', needed by 'gv.o'.  Stop.
| make[1]: Leaving directory '/home/paul/poky/build/tmp/work/core2-64-poky-linux/perl/5.20.0-r1/perl-5.20.0'
| make[1]: Entering directory '/home/paul/poky/build/tmp/work/core2-64-poky-linux/perl/5.20.0-r1/perl-5.20.0'
| rm -f pod/perl5200delta.pod
| /bin/ln -s perldelta.pod pod/perl5200delta.pod
| ./miniperl -Ilib autodoc.pl
| make[1]: ./miniperl: Command not found
| makefile:434: recipe for target 'pod/perlintern.pod' failed
| make[1]: *** [pod/perlintern.pod] Error 127
| make[1]: Leaving directory '/home/paul/poky/build/tmp/work/core2-64-poky-linux/perl/5.20.0-r1/perl-5.20.0'
| Makefile:37: recipe for target 'perl' failed
| make: *** [perl] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/paul/poky/build/tmp/work/core2-64-poky-linux/perl/5.20.0-r1/temp/run.do_compile.9503:1 exit 1 from
|   exit 1
| ERROR: Function failed: do_compile (log file is located at /home/paul/poky/build/tmp/work/core2-64-poky-linux/perl/5.20.0-r1/temp/log.do_compile.9503)
ERROR: Task 2211 (/home/paul/poky/meta/recipes-devtools/perl/perl_5.20.0.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5314 tasks of which 3028 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  /home/paul/poky/meta/recipes-devtools/perl/perl_5.20.0.bb, do_compile
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
op3:~/poky/build$ cd ..
op3:~/poky$ git log --oneline HEAD~3..
2e608ecd1c1d package_regex.inc: Cleanup and organize
73f7ced9b77d upstream_tracking.inc: Remove entries that now isn\'t needed
b7153be8ca48 image: add new items to IMAGE_FEATURES[validitems] list
op3:~/poky$ 
-------------------------
Comment 4 Richard Purdie 2015-03-26 11:59:01 UTC
I was asked how to test this bug. Steps would be something like:

"bitbake gcc; bitbake perl -c cleansstate; bitbake perl" 

and then check the perl files for references to things like

"sysroots/intel-corei7-64/usr/lib/gcc/x86_64-poky-linux/4.9.1/include/stdint.h"
Comment 5 Costin 2015-04-28 10:45:57 UTC
Hello,

Just checked on this bug on latest master: ae736dbdd140975ba43f06e635b461dbf36a117e
I did as on comment#4 and verified the log.do_compile for perl reporting errors. I found none.
Marking as verified