[Dwarf-Discuss] error building libdwarf

Michael Eager eager@eagercon.com
Wed Sep 29 15:17:39 GMT 2010


Neila Radhid wrote:
> Hi,
> I'm using ubuntu 10.04 and when I build libdwarf
> I get this message:
> gcc -g -O2 -I. -I.   -c -o dwarf_elf_access.o dwarf_elf_access.c
> dwarf_elf_access.c: In function ?dwarf_elf_object_access_internals_init?:
> dwarf_elf_access.c:146: warning: assignment makes pointer from integer 
> without a cast
> dwarf_elf_access.c:177: warning: assignment makes pointer from integer 
> without a cast
> dwarf_elf_access.c: In function ?dwarf_elf_object_access_get_section_info?:
> dwarf_elf_access.c:248: error: ?Elf_Scn? undeclared (first use in this 
> function)
> dwarf_elf_access.c:248: error: (Each undeclared identifier is reported 
> only once
> dwarf_elf_access.c:248: error: for each function it appears in.)
> dwarf_elf_access.c:248: error: ?scn? undeclared (first use in this function)
> dwarf_elf_access.c:290: warning: assignment makes pointer from integer 
> without a cast
> dwarf_elf_access.c: In function ?dwarf_elf_object_access_load_section?:
> dwarf_elf_access.c:842: error: ?Elf_Scn? undeclared (first use in this 
> function)
> dwarf_elf_access.c:842: error: ?scn? undeclared (first use in this function)
> dwarf_elf_access.c:843: error: ?Elf_Data? undeclared (first use in this 
> function)
> dwarf_elf_access.c:843: error: ?data? undeclared (first use in this 
> function)
> make: *** [dwarf_elf_access.o] Error 1
> how can I fix it?

Install libelf.h.   Then rerun configure and make.

Libelf.h is in the elfutils-libelf-devel on RHEL/CentOS/Fedora/
system.  I'm not sure which Ubuntu package contains it.

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077





More information about the Dwarf-discuss mailing list