build changes: --with-elfutils option

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

build changes: --with-elfutils option

Roland McGrath
I've committed changes relating to PR 1916.  This is to make it easier to
build elfutils locally in the systemtap build, as we have done in the RPM
builds.  

configure now accepts an option --with-elfutils=SRCDIR, where SRCDIR is a
directory containing the elfutils source tree, either an absolute directory
name or one relative to the systemtap source directory where configure is.
You'll see it also run elfutils' configure script at the end.

After you have configured this way, "make" in your systemtap build
directory will do a local elfutils build first.  If you change elfutils
source files, you'll need to remove the file stamp-elfutils in your
systemtap build directory to be sure the next "make" rebuilds everything.

Note that these locally-built libraries will not be installed on your
system.  stap will be linked to expect them in ${pkglibdir},
i.e. /usr/lib/systemtap if you used --prefix=/usr.  They won't be there
before you do "make install", so you'll need to set LD_LIBRARY_PATH to run
your local stap binary.  The runtest.sh script takes care of this for
running the test suite for "make check".  You can use something like:

        export LD_LIBRARY_PATH=$PWD/lib-elfutils:$PWD/lib-elfutils/systemtap

The systemtap.spec.in file now uses this configure option, so you can see
an example use there.  Someone should update the README instructions.


Thanks,
Roland
Reply | Threaded
Open this post in threaded view
|

Re: build changes: --with-elfutils option

Hien Nguyen
Roland,

I tried to build systemtap with the --with-elfutils option on my RHEL4
U2 ppc64 box. But it fail to to build elfutils.
So I tried to build elfutils-0.118 seperately without systetmatp, and
got the same error.

./configure
make
.
.
.
if gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../lib -I..    
-Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99  -g -O2
-MT elf_begin.o -MD -MP -MF ".deps/elf_begin.Tpo" -c -o elf_begin.o
elf_begin.c; \
then mv -f ".deps/elf_begin.Tpo" ".deps/elf_begin.Po"; else rm -f
".deps/elf_begin.Tpo"; exit 1; fi
elf_begin.c: In function `get_shnum':
elf_begin.c:100: warning: signed and unsigned type in conditional expression
elf_begin.c:101: warning: signed and unsigned type in conditional expression
elf_begin.c:113: warning: signed and unsigned type in conditional expression
elf_begin.c:114: warning: signed and unsigned type in conditional expression
elf_begin.c:155: warning: signed and unsigned type in conditional expression
elf_begin.c:197: warning: signed and unsigned type in conditional expression
elf_begin.c: In function `file_read_elf':
elf_begin.c:297: warning: signed and unsigned type in conditional expression
elf_begin.c:298: warning: signed and unsigned type in conditional expression
elf_begin.c:299: warning: signed and unsigned type in conditional expression
elf_begin.c:300: warning: signed and unsigned type in conditional expression
elf_begin.c:301: warning: signed and unsigned type in conditional expression
elf_begin.c:302: warning: signed and unsigned type in conditional expression
elf_begin.c:303: warning: signed and unsigned type in conditional expression
elf_begin.c:304: warning: signed and unsigned type in conditional expression
elf_begin.c:305: warning: signed and unsigned type in conditional expression
elf_begin.c:306: warning: signed and unsigned type in conditional expression
elf_begin.c:307: warning: signed and unsigned type in conditional expression
elf_begin.c:308: warning: signed and unsigned type in conditional expression
elf_begin.c:309: warning: signed and unsigned type in conditional expression
elf_begin.c:372: warning: signed and unsigned type in conditional expression
elf_begin.c:373: warning: signed and unsigned type in conditional expression
elf_begin.c:374: warning: signed and unsigned type in conditional expression
elf_begin.c:375: warning: signed and unsigned type in conditional expression
elf_begin.c:376: warning: signed and unsigned type in conditional expression
elf_begin.c:377: warning: signed and unsigned type in conditional expression
elf_begin.c:378: warning: signed and unsigned type in conditional expression
elf_begin.c:379: warning: signed and unsigned type in conditional expression
elf_begin.c:380: warning: signed and unsigned type in conditional expression
elf_begin.c:381: warning: signed and unsigned type in conditional expression
elf_begin.c:382: warning: signed and unsigned type in conditional expression
elf_begin.c:383: warning: signed and unsigned type in conditional expression
elf_begin.c:384: warning: signed and unsigned type in conditional expression
make[2]: *** [elf_begin.o] Error 1
make[2]: Leaving directory
`/home/nguyhien/mytests/snapshots/elfutils-0.118/libelf'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nguyhien/mytests/snapshots/elfutils-0.118'
make: *** [all] Error 2

Thanks for your help,
Hien.

Roland McGrath wrote:

>I've committed changes relating to PR 1916.  This is to make it easier to
>build elfutils locally in the systemtap build, as we have done in the RPM
>builds.  
>
>configure now accepts an option --with-elfutils=SRCDIR, where SRCDIR is a
>directory containing the elfutils source tree, either an absolute directory
>name or one relative to the systemtap source directory where configure is.
>You'll see it also run elfutils' configure script at the end.
>  
>
Reply | Threaded
Open this post in threaded view
|

RE: build changes: --with-elfutils option

bibo,mao-2
In reply to this post by Roland McGrath
Do you use source rpm package or tgz compressed package, if you use tgz compressed package, patch file elfutils-portability.patch is needed.

Regards
Bibo,mao

>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]]
>On Behalf Of Hien Nguyen
>Sent: 2005年12月20日 6:12
>To: Roland McGrath
>Cc: [hidden email]
>Subject: Re: build changes: --with-elfutils option
>
>Roland,
>
>I tried to build systemtap with the --with-elfutils option on my RHEL4
>U2 ppc64 box. But it fail to to build elfutils.
>So I tried to build elfutils-0.118 seperately without systetmatp, and
>got the same error.
>
>./configure
>make
>.
>.
>.
>if gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../lib -I..
>-Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99  -g -O2
>-MT elf_begin.o -MD -MP -MF ".deps/elf_begin.Tpo" -c -o elf_begin.o
>elf_begin.c; \
>then mv -f ".deps/elf_begin.Tpo" ".deps/elf_begin.Po"; else rm -f
>".deps/elf_begin.Tpo"; exit 1; fi
>elf_begin.c: In function `get_shnum':
>elf_begin.c:100: warning: signed and unsigned type in conditional expression
>elf_begin.c:101: warning: signed and unsigned type in conditional expression
>elf_begin.c:113: warning: signed and unsigned type in conditional expression
>elf_begin.c:114: warning: signed and unsigned type in conditional expression
>elf_begin.c:155: warning: signed and unsigned type in conditional expression
>elf_begin.c:197: warning: signed and unsigned type in conditional expression
>elf_begin.c: In function `file_read_elf':
>elf_begin.c:297: warning: signed and unsigned type in conditional expression
>elf_begin.c:298: warning: signed and unsigned type in conditional expression
>elf_begin.c:299: warning: signed and unsigned type in conditional expression
>elf_begin.c:300: warning: signed and unsigned type in conditional expression
>elf_begin.c:301: warning: signed and unsigned type in conditional expression
>elf_begin.c:302: warning: signed and unsigned type in conditional expression
>elf_begin.c:303: warning: signed and unsigned type in conditional expression
>elf_begin.c:304: warning: signed and unsigned type in conditional expression
>elf_begin.c:305: warning: signed and unsigned type in conditional expression
>elf_begin.c:306: warning: signed and unsigned type in conditional expression
>elf_begin.c:307: warning: signed and unsigned type in conditional expression
>elf_begin.c:308: warning: signed and unsigned type in conditional expression
>elf_begin.c:309: warning: signed and unsigned type in conditional expression
>elf_begin.c:372: warning: signed and unsigned type in conditional expression
>elf_begin.c:373: warning: signed and unsigned type in conditional expression
>elf_begin.c:374: warning: signed and unsigned type in conditional expression
>elf_begin.c:375: warning: signed and unsigned type in conditional expression
>elf_begin.c:376: warning: signed and unsigned type in conditional expression
>elf_begin.c:377: warning: signed and unsigned type in conditional expression
>elf_begin.c:378: warning: signed and unsigned type in conditional expression
>elf_begin.c:379: warning: signed and unsigned type in conditional expression
>elf_begin.c:380: warning: signed and unsigned type in conditional expression
>elf_begin.c:381: warning: signed and unsigned type in conditional expression
>elf_begin.c:382: warning: signed and unsigned type in conditional expression
>elf_begin.c:383: warning: signed and unsigned type in conditional expression
>elf_begin.c:384: warning: signed and unsigned type in conditional expression
>make[2]: *** [elf_begin.o] Error 1
>make[2]: Leaving directory
>`/home/nguyhien/mytests/snapshots/elfutils-0.118/libelf'
>make[1]: *** [all-recursive] Error 1
>make[1]: Leaving directory `/home/nguyhien/mytests/snapshots/elfutils-0.118'
>make: *** [all] Error 2
>
>Thanks for your help,
>Hien.
>
>Roland McGrath wrote:
>
>>I've committed changes relating to PR 1916.  This is to make it easier to
>>build elfutils locally in the systemtap build, as we have done in the RPM
>>builds.
>>
>>configure now accepts an option --with-elfutils=SRCDIR, where SRCDIR is a
>>directory containing the elfutils source tree, either an absolute directory
>>name or one relative to the systemtap source directory where configure is.
>>You'll see it also run elfutils' configure script at the end.
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: build changes: --with-elfutils option

Frank Ch. Eigler

"Mao, Bibo" <[hidden email]> writes:

> Do you use source rpm package or tgz compressed package, if you use
> tgz com= pressed package, patch file elfutils-portability.patch is
> needed.

You are right, the elfutils portability patch needs to be applied to
its source tree before it is passed to systemtap's configury.

- FChE
Reply | Threaded
Open this post in threaded view
|

Re: build changes: --with-elfutils option

Hien Nguyen
In reply to this post by bibo,mao-2
Mao, Bibo wrote:

>Do you use source rpm package or tgz compressed package, if you use tgz compressed package, patch file elfutils-portability.patch is needed.
>
>  
>
You are right, applied the patch fixed it.
Thanks, Hien.