Hi folks, Honestly I am not quite sure why this is working on GNU/Linux but dwarfutils was failing with the following errors:
g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -I. -I. -I./../libdwarf -DCONFPREFIX=/build/buildd-dwarfutils_20120410-1-hurd-i386-zvAcOM/dwarfutils-20120410/debian/dwarfdump2/lib -D_FORTIFY_SOURCE=2 -c -o print_die.o print_die.cc print_die.cc:1225:36: error: invalid pure specifier (only '= 0' is allowed) before '(' token print_die.cc:1225:40: error: function 'int* __errno_location()' is initialized like a variable print_die.cc:1237:17: warning: declaration of 'int* __errno_location()' has 'extern' and is initialized [enabled by default] print_die.cc:1237:36: error: invalid pure specifier (only '= 0' is allowed) before '(' token print_die.cc:1237:40: error: function 'int* __errno_location()' is initialized like a variable make[2]: *** [print_die.o] Error 1 make[1]: *** [override_dh_auto_build] Error 2 make: *** [build-arch] Error 2 dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2 I just changed that block of code to use a different variable name rather than errno (see attached patch). Does this make sense? Thanks! Barry
Index: dwarfutils-20120410/dwarfdump2/print_die.cc =================================================================== --- dwarfutils-20120410.orig/dwarfdump2/print_die.cc 2012-06-19 16:52:34.000000000 +0000 +++ dwarfutils-20120410/dwarfdump2/print_die.cc 2012-06-19 16:53:19.000000000 +0000 @@ -1222,8 +1222,8 @@ /* Get the global offset for reference */ res = dwarf_global_formref(attrib, &ref_off, &err); if (res != DW_DLV_OK) { - int errno = dwarf_errno(err); - if (errno == DW_DLE_REF_SIG8_NOT_HANDLED ) { + int ferrno = dwarf_errno(err); + if (ferrno == DW_DLE_REF_SIG8_NOT_HANDLED ) { // No need to stop, ref_sig8 refers out of // the current section. break; @@ -1234,8 +1234,8 @@ } res = dwarf_dieoffset(die, &die_off, &err); if (res != DW_DLV_OK) { - int errno = dwarf_errno(err); - if (errno == DW_DLE_REF_SIG8_NOT_HANDLED ) { + int ferrno = dwarf_errno(err); + if (ferrno == DW_DLE_REF_SIG8_NOT_HANDLED ) { // No need to stop, ref_sig8 refers out of // the current section. break;