Bug 581 - blktrace build fails with internal BFD error
Summary: blktrace build fails with internal BFD error
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.0
Hardware: x86 x86
: High normal
Target Milestone: 1.0 M3
Assignee: Tom Zanussi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-12-09 16:03 UTC by Tom Zanussi
Modified: 2011-01-14 17:45 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Zanussi 2010-12-09 16:03:11 UTC
Building blktrace for atom-pc sometimes fails with a BFD internal error.  I've also seen this once when building blktrace for crownbay: 

BFD (GNU Binutils) 2.20.1.20100303

i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/usr/local/src/yocto/p/build/tmp/sysr
oots/atom-poky-linux -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debu
g-types -I. -I.. -I../btt -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -UCOUNT_IOS -UDEBUG -DNDEBUG -o btrep
lay btreplay.o -laio -lrt
/usr/local/src/yocto/p/build/tmp/sysroots/x86_64-linux/usr/libexec/atom-poky-linux/gcc/i586-poky-linux/4.5.1/ld: BFD (GN
U Binutils) 2.20.1.20100303 internal error, aborting at /usr/local/src/yocto/p/build/tmp/work/atom-poky-linux/binutils-c
ross-2.20.1-r3/binutils-2.20.1/bfd/merge.c line 872 in _bfd_merged_section_offset

/usr/local/src/yocto/p/build/tmp/sysroots/x86_64-linux/usr/libexec/atom-poky-linux/gcc/i586-poky-linux/4.5.1/ld: Please 
report this bug.

collect2: ld returned 1 exit status
make[1]: *** [btreplay] Error 1
make[1]: Leaving directory `/usr/local/src/yocto/p/build/tmp/work/atom-poky-linux/blktrace-1.0.1+git0+1e09f6e9012826fca6
9fa07222b7bc53c3e629ee-r0/git/btreplay'
make: *** [btreplay/btrecord] Error 2
Comment 1 Tom Zanussi 2010-12-28 17:20:32 UTC
The other error message that results from this failure is "truncated object file".

I've only seen these problems happening with btrecord.o and btreplay.o.

The problem appears to only happen when using PARALLEL_MAKE, e.g. "-j 8", which causes make to enter the btreplay directory multiple times in parallel and build the object files there multiple times in parallel, which race and occasionally cause later steps to see bogus object files in the process of being written, and thus produce these error messages.

The solution should be to find a way to prevent the parallel make from building in the same directory simultaneously.