This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problems elfutils-0.122 on RHEL4

William Cohen wrote:
Has any one attempting to build the systemtap snapshot on RHEL4? The snapshot requires elfutils-0.122 sources.

On the RHEL4 em64t machine elfutils fails with the following error:

if gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DSRCDIR=\"/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src\" -DOBJDIR=\"/home/wcohen/stap_testing_200607260830/obj/build-elfutils/src\" -I. -I/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src -I.. -I/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src -I/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src/../libelf -I/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src/../libebl -I/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src/../libdw -I/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src/../libdwfl -I/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src/../lib -I.. -Wall -Wshadow -std=gnu99 -Werror -Wunused -Wextra -Wformat=2 -g -O2 -MT elflint.o -MD -MP -MF ".deps/elflint.Tpo" -c -o elflint.o /home/wcohen/rh-rpms/BUILD/elfutils-0.122/src/elflint.c; \
then mv -f ".deps/elflint.Tpo" ".deps/elflint.Po"; else rm -f ".deps/elflint.Tpo"; exit 1; fi
/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src/elflint.c: In function `check_versym':
/home/wcohen/rh-rpms/BUILD/elfutils-0.122/src/elflint.c:2532: warning: comparison between signed and unsigned
make[3]: *** [elflint.o] Error 1
make[3]: Leaving directory `/home/wcohen/stap_testing_200607260830/obj/build-elfutils/src'

Did some investigation. The offending statement at src/elflint.c:2532:

if (runp->ndx == (*versym & 0x7fff))

Look at runp structure

static struct version_namelist
  const char *objname;
  const char *name;
  GElf_Word ndx;
  enum { ver_def, ver_need } type;
  struct version_namelist *next;
} *version_namelist;

Tracing back GElf_Word type:
./libelf/gelf.h:typedef Elf64_Word GElf_Word;
typedef uint32_t Elf64_Word;

Tracing back type of *versym:

GElf_Versym *versym = gelf_getversym (data, cnt, &versym_mem);
typedef Elf64_Versym GElf_Versym;
typedef Elf64_Half Elf64_Versym;
typedef uint16_t Elf64_Half;

This is wierd aren't they both uint?
Put in work-around cast:

if (runp->ndx == (GElf_Word)(*versym & 0x7fff))

On the RHEL4 i686 machine elfutils build fails with the following error:

The error on the RHEL4 i686 machine was due to a corruption of the elfutil's source file. With the source file corruption fixed the i686 machine had the same error message on src/elflint.c:2532 as the x86-64 one.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]