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
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.
http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=d38ad3271829b2d282c973e69edd265ef52174c8