Red Hat Bugzilla – Bug 426100
elfutils uses off64_t which does not exist on ia64
Last modified: 2007-12-18 22:10:14 EST
Description of problem:
Previous versions (such as elfutils-0.125 in RHEL5) of elfutils used off_t in
libelf.h. At some point after this was changed to off64_t. From digging
through the header files it appears that off64_t is only used on systems that
can have either 32 or 64 bit variants such as x86. On ia64 only off_t is defined.
This causes code that includes libelf.h to fail to build.
I wasn't able to find anything in the changelog explaining why the change from
off_t to off64_t was made. Not sure if the right fix is to go back to off_t or
perhaps to do some #ifdef ia64 magic.
I will be happy to try out any ideas if you do not have easy access to an ia64
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. build and install latest elfutils on ia64
2. try building kexec-tools rpm
/usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
/usr/include/libelf.h:160: error: expected specifier-qualifier-list before 'off64_t'
/usr/include/libelf.h:201: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'elf_update'
/usr/include/libelf.h:207: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'elf_getbase'
/usr/include/libelf.h:305: error: expected declaration specifiers or '...'
/usr/include/libelf.h:317: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'elf_getaroff'
The ltrace package fails to build due to this as well.
Use -D_FILE_OFFSET_BITS=64 (or autoconf equivalent) to work around, and also to
avoid the bugs with old libelf versions on 32-bit machines.
*** This bug has been marked as a duplicate of 377241 ***