Bug 1524

Summary: btrfs-tools parallel make failure
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Richard Purdie <richard.purdie>
Component: meta-yoctoAssignee: Nitin Kamble <nitin.a.kamble>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Richard Purdie 2011-09-26 06:05:41 UTC
With master (49ed1cab3bee2318fdd5fc2538b1b3d43542ed2d) I see a failure during do_compile of btrfs-tools due to a high parallel make. Compile log:

NOTE: make -j 24 -e MAKEFLAGS=
bash version.sh
ls ctree.c
ls disk-io.c
ls radix-tree.c
ls extent-tree.c
ls print-tree.c
ls root-tree.c
radix-tree.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.radix-tree.o.d,-MT,radix-tree.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c radix-tree.c
ls dir-item.c
ls file-item.c
ls inode-item.c
ls inode-map.c
ls crc32c.c
disk-io.c
ls rbtree.c
ctree.c
dir-item.c
crc32c.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.ctree.o.d,-MT,ctree.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c ctree.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.disk-io.o.d,-MT,disk-io.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c disk-io.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.dir-item.o.d,-MT,dir-item.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c dir-item.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.crc32c.o.d,-MT,crc32c.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c crc32c.c
ls extent-cache.c
ls extent_io.c
ls volumes.c
ls utils.c
ls btrfs-list.c
inode-item.c
print-tree.c
root-tree.c
extent_io.c
inode-map.c
file-item.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.print-tree.o.d,-MT,print-tree.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c print-tree.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.root-tree.o.d,-MT,root-tree.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c root-tree.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.file-item.o.d,-MT,file-item.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c file-item.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.inode-item.o.d,-MT,inode-item.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c inode-item.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.inode-map.o.d,-MT,inode-map.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c inode-map.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.extent_io.o.d,-MT,extent_io.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c extent_io.c
extent-tree.c
ls btrfslabel.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.extent-tree.o.d,-MT,extent-tree.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c extent-tree.c
rbtree.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.rbtree.o.d,-MT,rbtree.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c rbtree.c
ls btrfsctl.c
btrfs-list.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfs-list.o.d,-MT,btrfs-list.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfs-list.c
ls mkfs.c
ls debug-tree.c
ls btrfs-show.c
ls btrfs-vol.c
volumes.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.volumes.o.d,-MT,volumes.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c volumes.c
utils.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.utils.o.d,-MT,utils.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c utils.c
mkfs.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.mkfs.o.d,-MT,mkfs.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c mkfs.c
extent-cache.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.extent-cache.o.d,-MT,extent-cache.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c extent-cache.c
btrfs-vol.c
btrfsctl.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfsctl.o.d,-MT,btrfsctl.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfsctl.c
debug-tree.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.debug-tree.o.d,-MT,debug-tree.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c debug-tree.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfs-vol.o.d,-MT,btrfs-vol.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfs-vol.c
btrfslabel.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfslabel.o.d,-MT,btrfslabel.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfslabel.c
btrfs-show.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfs-show.o.d,-MT,btrfs-show.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfs-show.c
extent-cache.c: In function 'insert_existing_cache_extent':extent_io.c: In function 'set_extent_bits':

extent-cache.c:99:23: warning: variable 'entry' set but not used [-Wunused-but-set-variable]extent_io.c:299:6: warning: variable 'set' set but not used [-Wunused-but-set-variable]

ls btrfsck.c
btrfsck.c
i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/media/build1/poky/build/tmp/sysroots/qemux86 -Wp,-MMD,./.btrfsck.o.d,-MT,btrfsck.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c btrfsck.c
dir-item.c: In function 'btrfs_delete_one_dir_name':disk-io.c: In function 'readahead_tree_block':
disk-io.c:126:6: warning: variable 'dev_nr' set but not used [-Wunused-but-set-variable]
disk-io.c: In function 'read_tree_block':
disk-io.c:180:6: warning: variable 'dev_nr' set but not used [-Wunused-but-set-variable]

dir-item.c:316:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
ctree.c: In function '__btrfs_cow_block':
ctree.c:265:6: warning: variable 'generation' set but not used [-Wunused-but-set-variable]
ctree.c: In function 'balance_level':
ctree.c:798:6: warning: variable 'err_on_enospc' set but not used [-Wunused-but-set-variable]
ctree.c: In function 'push_nodes_for_insert':
ctree.c:999:6: warning: variable 'orig_ptr' set but not used [-Wunused-but-set-variable]
btrfslabel.c:40:21: fatal error: version.h: No such file or directory
compilation terminated.
make: *** [btrfslabel.o] Error 1
make: *** Waiting for unfinished jobs....
print-tree.c: In function 'btrfs_print_leaf':
print-tree.c:447:26: warning: variable 'ci' set but not used [-Wunused-but-set-variable]
btrfsctl.c:37:21: fatal error: version.h: No such file or directory
compilation terminated.
make: *** [btrfsctl.o] Error 1
extent-tree.c: In function '__btrfs_mod_ref':
extent-tree.c:1553:6: warning: variable 'faili' set but not used [-Wunused-but-set-variable]
ctree.c: In function 'btrfs_truncate_item':
ctree.c:2373:6: warning: variable 'slot_orig' set but not used [-Wunused-but-set-variable]
ctree.c: In function 'btrfs_extend_item':
ctree.c:2471:6: warning: variable 'slot_orig' set but not used [-Wunused-but-set-variable]
ctree.c: In function 'btrfs_insert_empty_items':
ctree.c:2544:6: warning: variable 'slot_orig' set but not used [-Wunused-but-set-variable]
volumes.c: In function 'btrfs_alloc_chunk':
volumes.c:646:6: warning: variable 'physical' set but not used [-Wunused-but-set-variable]
volumes.c: In function 'btrfs_alloc_data_chunk':debug-tree.c:29:21: fatal error: version.h: No such file or directory
compilation terminated.

volumes.c:873:6: warning: variable 'physical' set but not used [-Wunused-but-set-variable]
volumes.c: In function 'btrfs_num_copies':
volumes.c:974:6: warning: variable 'offset' set but not used [-Wunused-but-set-variable]
make: *** [debug-tree.o] Error 1
btrfs-list.c:37:21: fatal error: version.h: No such file or directory
compilation terminated.
make: *** [btrfs-list.o] Error 1
mkfs.c:46:21: fatal error: version.h: No such file or directory
compilation terminated.
make: *** [mkfs.o] Error 1
btrfs-show.c:39:21: fatal error: version.h: No such file or directorybtrfsck.c:32:21: fatal error: version.h: No such file or directory
compilation terminated.
make: *** [btrfsck.o] Error 1

compilation terminated.
make: *** [btrfs-show.o] Error 1
ERROR: oe_runmake failed
ERROR: Function 'do_compile' failed (see /media/build1/poky/build/tmp/work/i586-poky-linux/btrfs-tools-git-r2/temp/log.do_compile.24613 for further information)
Comment 1 Richard Purdie 2011-09-26 06:07:02 UTC
Rerunning the compile allows things to succeed so it looks like some dependencies on version.h in the Makefile are incorrect. It shouldn't be hard to find these and get a patch upstream for the bug.
Comment 2 Nitin Kamble 2011-12-21 18:55:18 UTC
I noticed this error:

mkfs.c:39:24: fatal error: attr/xattr.h: No such file or directory
Comment 3 Nitin Kamble 2012-01-03 08:51:45 UTC
This commit fixes the issue:

commit 8eb45acf307e5f30678b4725969e03b5e3f52b4e
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date:   Mon Jan 2 11:29:30 2012 -0800

    btrfs-tools:Fix multithreaded building
    
    Fixes bug: [YOCTO #1524]
    
    Fixes this error with make -j:
    btrfsctl.c
    | i586-poky-linux-gcc  -m32   -march=i586
    --sysroot=/intel/poky/builds/world/tmp/sysroots/qemux86
    -Wp,-MMD,./.btrfsctl.o.d,-MT,btrfsctl.o -Wall -D_FILE_OFFSET_BITS=64
    -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -c
    btrfsctl.c
    | btrfsctl.c:37:21: fatal error: version.h: No such file or directory
    | compilation terminated.
    | btrfslabel.c:40:21: fatal error: version.h: No such file or directory
    | compilation terminated.
    
    (From OE-Core rev: 3ebc06c2f011da95fd6bed74c9e27b2148011ee7)
    
    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>