error building zerobugs -- file dwarf_elf_access.c

Aug 6, 2012 at 4:02 AM
Edited Aug 6, 2012 at 4:25 AM

I got errors building in the dwarf- directory.  I am running Linux Mint Maya 13, based on Ubuntu 12.04.  Some of the required packages were newer than the readme specified.  I would like your opinion about how to proceed.  Here is the relevant portion of the stdout followed by all of stderr.  I can send you more detail if needed.

 

 

~/Downloads/progs/zerobugs
********************** dwarf-20111214/libdwarf ***************************
~/Downloads/progs/zerobugs/third_party_libs/dwarf-20111214/libdwarf ~/Downloads/progs/zerobugs

 

<snip>

 

 gcc -D_LARGEFILE64_SOURCE -fPIC -I. -I. -fPIC -O3 -c -o dwarf_die_deliv.o dwarf_die_deliv.c
gcc -D_LARGEFILE64_SOURCE -fPIC -I. -I. -fPIC -O3 -c -o dwarf_elf_access.o dwarf_elf_access.c
***** build_third_party: dwarf-20111214/libdwarf failed *****
~/Downloads/progs/zerobugs

udcli.c: In function ‘main’:
udcli.c:77:7: warning: variable ‘mode’ set but not used [-Wunused-but-set-variable]
dwarf_elf_access.c: In function ‘dwarf_elf_object_access_internals_init’:
dwarf_elf_access.c:144:21: warning: assignment makes pointer from integer without a cast [enabled by default]
dwarf_elf_access.c:173:21: warning: assignment makes pointer from integer without a cast [enabled by default]
dwarf_elf_access.c: In function ‘dwarf_elf_object_access_get_section_info’:
dwarf_elf_access.c:247:5: error: unknown type name ‘Elf_Scn’
dwarf_elf_access.c:250:9: warning: assignment makes pointer from integer without a cast [enabled by default]
dwarf_elf_access.c:279:17: warning: assignment makes pointer from integer without a cast [enabled by default]
dwarf_elf_access.c:288:19: warning: assignment makes pointer from integer without a cast [enabled by default]
dwarf_elf_access.c: In function ‘dwarf_elf_object_access_load_section’:
dwarf_elf_access.c:900:9: error: unknown type name ‘Elf_Scn’
dwarf_elf_access.c:901:9: error: unknown type name ‘Elf_Data’
dwarf_elf_access.c:903:13: warning: assignment makes pointer from integer without a cast [enabled by default]
dwarf_elf_access.c:915:14: warning: assignment makes pointer from integer without a cast [enabled by default]
dwarf_elf_access.c:920:29: error: request for member ‘d_buf’ in something not a structure or union
make: *** [dwarf_elf_access.o] Error 1

 

Edit:

The libdwarf available for my distribution is almost the same as the one you have, just a -1 after the version:

 Package: libdwarf-dev
State: not installed
Version: 20111214-1

 

Coordinator
Oct 9, 2012 at 8:25 PM

Make sure you have libelf-dev then try running ./configure again in the dwarf directory. 

I have not built under Ubuntu 12, I kind of gave up on Ubuntu in general. Sorry.