[Dwarf-Discuss] [BUG] Makefile of dwarfdump is not concurrency-safe

John Spencer maillist-dwarf at barfooze.de
Tue Sep 17 09:13:36 PDT 2013


since the toplevel configure script lacks an option to disable building 
dwarfgen and dwarfdump2, i enter the subdirs of libdwarf and dwarfdump
one after the other, run configure there and make -j9.

for dir in libdwarf dwarfdump ; do
(
cd $dir
cp ../config.cache .

CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \
   ./configure -C --prefix= || exit 1

#[ $dir = dwarfdump ] && MAKE_THREADS=1
make -j$MAKE_THREADS || exit 1
)
done

however compilation of dwarfdump fails sporadically (maybe 1 out of 5 
times) unless i uncomment the line that sets concurrency to a single 
process.

the issue is probably related to non-atomic copying around of c files 
without proper target dependency information:

cp ./tag_tree_ext.list tmp-t4.c
gcc: tmp-t4.c: No such file or directory


find attached the entire build log.

--JS

P.S.
reasons i want to disable the C++ components:
- no C++ compiler available
- C++ bloat
- compilation of those 2 takes 10x as long as compilation of libdwarf 
and dwarfdump (6 seconds for the C components alone vs 70 for everything)
- compiling the binaries statically links 1.5MB of libstdc++ each
- i don't need them
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_libdwarf.log
Type: text/x-log
Size: 22741 bytes
Desc: not available
URL: <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/attachments/20130917/0faeb8e0/attachment-0001.bin>


More information about the Dwarf-Discuss mailing list