public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Compiling SystemTap with elfutils-0.165 fails
@ 2016-03-30 19:40 Torsten Polle
  2016-03-30 19:44 ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Torsten Polle @ 2016-03-30 19:40 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: systemtap

Mark,

I use the following configuration to compile SystemTap on my system.

The systemtap repository resides in work/repository/systemtap. A copy of elfutils-0.165 is in work/repository/elfutils-0.165.

cd work/repository/systemtap-i686-linux-gnu
../systemtap/configure \
    --prefix=/opt/tooling/adit/systemtap \
    --with-elfutils=/home/polle/work/repository/elfutils-0.165 \
    --enable-docs=no

make install

Eventually, I get the following output:

make[2]: Entering directory `/home/polle/work/repository/systemtap-i686-linux-gnu'
  CXX      stap-main.o
In file included from include-elfutils/gelf.h:32:0,
                 from include-elfutils/elfutils/libdw.h:32,
                 from ../systemtap/elaborate.h:25,
                 from ../systemtap/main.cxx:14:
include-elfutils/libelf.h:280:8: error: ‘Elf32_Chdr’ does not name a type
include-elfutils/libelf.h:281:8: error: ‘Elf64_Chdr’ does not name a type

It seems that include-elfutils/libelf.h tries to pull in elf.h but fails to include the one from elfutils-0.165. Instead my copy in /usr/include is included, which stems from an older version of elfutils. I can fix the problem by copying work/repository/elfutils-0.165/libelf/elf.h to work/repository/systemtap-i686-linux-gnu/include-elfutils.

Kind Regards,
Torsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiling SystemTap with elfutils-0.165 fails
  2016-03-30 19:40 Compiling SystemTap with elfutils-0.165 fails Torsten Polle
@ 2016-03-30 19:44 ` Mark Wielaard
  2016-03-30 20:01   ` Torsten Polle
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Wielaard @ 2016-03-30 19:44 UTC (permalink / raw)
  To: Torsten Polle; +Cc: systemtap

On Wed, 2016-03-30 at 21:39 +0200, Torsten Polle wrote:
> make[2]: Entering directory `/home/polle/work/repository/systemtap-i686-linux-gnu'
>   CXX      stap-main.o
> In file included from include-elfutils/gelf.h:32:0,
>                  from include-elfutils/elfutils/libdw.h:32,
>                  from ../systemtap/elaborate.h:25,
>                  from ../systemtap/main.cxx:14:
> include-elfutils/libelf.h:280:8: error: ‘Elf32_Chdr’ does not name a type
> include-elfutils/libelf.h:281:8: error: ‘Elf64_Chdr’ does not name a type
> 
> It seems that include-elfutils/libelf.h tries to pull in elf.h but fails to include the one from elfutils-0.165. Instead my copy in /usr/include is included, which stems from an older version of elfutils. I can fix the problem by copying work/repository/elfutils-0.165/libelf/elf.h to work/repository/systemtap-i686-linux-gnu/include-elfutils.

That probably works, but better to use this patch:
https://git.fedorahosted.org/cgit/elfutils.git/commit/?id=344ca0775da729e1bfdd61bb88ba4c64befece07

That will also be in elfutils 0.166 (probably to be released tomorrow).
Then any old glibc version of elf.h is supported.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiling SystemTap with elfutils-0.165 fails
  2016-03-30 19:44 ` Mark Wielaard
@ 2016-03-30 20:01   ` Torsten Polle
  0 siblings, 0 replies; 3+ messages in thread
From: Torsten Polle @ 2016-03-30 20:01 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: systemtap


> Am 30.03.2016 um 21:44 schrieb Mark Wielaard <mjw@redhat.com>:
> 
> On Wed, 2016-03-30 at 21:39 +0200, Torsten Polle wrote:
>> make[2]: Entering directory `/home/polle/work/repository/systemtap-i686-linux-gnu'
>>  CXX      stap-main.o
>> In file included from include-elfutils/gelf.h:32:0,
>>                 from include-elfutils/elfutils/libdw.h:32,
>>                 from ../systemtap/elaborate.h:25,
>>                 from ../systemtap/main.cxx:14:
>> include-elfutils/libelf.h:280:8: error: ‘Elf32_Chdr’ does not name a type
>> include-elfutils/libelf.h:281:8: error: ‘Elf64_Chdr’ does not name a type
>> 
>> It seems that include-elfutils/libelf.h tries to pull in elf.h but fails to include the one from elfutils-0.165. Instead my copy in /usr/include is included, which stems from an older version of elfutils. I can fix the problem by copying work/repository/elfutils-0.165/libelf/elf.h to work/repository/systemtap-i686-linux-gnu/include-elfutils.
> 
> That probably works, but better to use this patch:
> https://git.fedorahosted.org/cgit/elfutils.git/commit/?id=344ca0775da729e1bfdd61bb88ba4c64befece07
> 
> That will also be in elfutils 0.166 (probably to be released tomorrow).
> Then any old glibc version of elf.h is supported.
> 
> Cheers,
> 
> Mark

The patch solved my issue.

Thanks,
Torsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-30 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-30 19:40 Compiling SystemTap with elfutils-0.165 fails Torsten Polle
2016-03-30 19:44 ` Mark Wielaard
2016-03-30 20:01   ` Torsten Polle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).