public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Problem Building Elfutils (patched) Required by systemtap
@ 2006-03-09 22:20 Nathan DeBardeleben
  2006-03-09 22:59 ` Frank Ch. Eigler
  2006-03-09 23:03 ` Roland McGrath
  0 siblings, 2 replies; 5+ messages in thread
From: Nathan DeBardeleben @ 2006-03-09 22:20 UTC (permalink / raw)
  To: systemtap

I'm sure this is a newbie question but I figured I'd toss it out there 
anyway.  I'm trying to build the latest systemtap snapshot I see on the 
FTP server - 20060304.  I got the elfutils, 0.119 and patched it with 
the patch provided as well.  Then compiling systemtap it goes into the 
elfutils dir and runs a Make in there - I get the following error.  I'm 
trying this as root in this example since I was having problems doing it 
as a user (not sure if that's necessary):

. . .
> Making all in src
> make[3]: Entering directory 
> `/root/systemtap-20060304/src/build-elfutils/src'
> gcc -Wall -Wshadow -std=gnu99  -Werror -Wunused -Wextra -Wformat=2 -g 
> -O2  -Wl,--enable-new-dtags,-rpath,/usr/local/lib/systemtap -o 
> addr2line  addr2line.o ../libdw/libdw.so  
> /usr/bin/ld: warning: libelf.so.1, needed by ../libdw/libdw.so, not 
> found (try using -rpath or -rpath-link)
> ../libdw/libdw.so: undefined reference to `gelf_getsymshndx@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf32_xlatetof@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_errno@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_kind@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_update_shdr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_errmsg@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_xlatetom@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getshdr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_end@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf32_xlatetom@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_nextscn@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getrel@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getehdr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_rawdata@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_getshstrndx@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_strptr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getphdr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_version@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_begin@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_ndxscn@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_xlatetof@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getrela@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_memory@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_getdata@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_cntl@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_getscn@ELFUTILS_1.0'
> collect2: ld returned 1 exit status
> make[3]: *** [addr2line] Error 1
> make[3]: Leaving directory 
> `/root/systemtap-20060304/src/build-elfutils/src'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/root/systemtap-20060304/src/build-elfutils'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/systemtap-20060304/src/build-elfutils'
> make: *** [stamp-elfutils] Error 2
I had previous configured systemtap with:
./configure --with-elfutils=/root/elfutils-0.119

Any help would be appreciated.  Sorry for the newbie question but 
perhaps it reveals a problem in the configure or potentially a place to 
add something in the docs?  Or maybe I just missed something in the docs. :)

Thanks!

-- 
-- Nathan
Correspondence
---------------------------------------------------------------------
Nathan DeBardeleben, Ph.D.
Los Alamos National Laboratory
Parallel Tools Team
High Performance Computing Environments
phone: 505-667-3428
email: ndebard@lanl.gov
---------------------------------------------------------------------

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

* Re: Problem Building Elfutils (patched) Required by systemtap
  2006-03-09 22:20 Problem Building Elfutils (patched) Required by systemtap Nathan DeBardeleben
@ 2006-03-09 22:59 ` Frank Ch. Eigler
  2006-03-09 23:03   ` Nathan DeBardeleben
  2006-03-09 23:03 ` Roland McGrath
  1 sibling, 1 reply; 5+ messages in thread
From: Frank Ch. Eigler @ 2006-03-09 22:59 UTC (permalink / raw)
  To: Nathan DeBardeleben; +Cc: systemtap


Nathan DeBardeleben <ndebard@lanl.gov> writes:

> [...] I got the elfutils, 0.119 and patched it with the patch
> provided as well.  Then compiling systemtap it goes into the
> elfutils dir and runs a Make in there - I get the following error.

Strange.

> I'm trying this as root in this example since I was having problems
> doing it as a user (not sure if that's necessary):

It is not.  Building systemtap, and running the "make check" portion
of the test suite should require no privileged access.  Only "make
install" and running scripts such as the dejagnu pass-5 tests will
require privileges.


> > Making all in src
> > make[3]: Entering directory
> > `/root/systemtap-20060304/src/build-elfutils/src'
> > gcc -Wall -Wshadow -std=gnu99  -Werror -Wunused -Wextra -Wformat=2
> > -g
> > -O2  -Wl,--enable-new-dtags,-rpath,/usr/local/lib/systemtap -o
> > addr2line  addr2line.o ../libdw/libdw.so  /usr/bin/ld: warning:
> > libelf.so.1, needed by ../libdw/libdw.so, not found (try using
> > -rpath or -rpath-link)
> > ../libdw/libdw.so: undefined reference to `gelf_getsymshndx@ELFUTILS_1.0'
> > [...]

I wonder if this is some kind of security precaution in the linker,
associated with running the build as root.


- FChE

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

* Re: Problem Building Elfutils (patched) Required by systemtap
  2006-03-09 22:20 Problem Building Elfutils (patched) Required by systemtap Nathan DeBardeleben
  2006-03-09 22:59 ` Frank Ch. Eigler
@ 2006-03-09 23:03 ` Roland McGrath
  1 sibling, 0 replies; 5+ messages in thread
From: Roland McGrath @ 2006-03-09 23:03 UTC (permalink / raw)
  To: Nathan DeBardeleben; +Cc: systemtap

That's a bug in the elfutils build that crops up when you don't have any
other elfutils-libelf-devel installed on the system.  This patch should fix it.


Thanks,
Roland


============================================================
--- src/Makefile.am	06ef04bf12b001c9f3de32573106bdcc4dfe9e55
+++ src/Makefile.am	5728692baa7ffc9a42fda2b58ec70f98e2eb979f
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 ##
-## Copyright (C) 1996-2002, 2003, 2004, 2005 Red Hat, Inc.
+## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
 ##
 ## This program is Open Source software; you can redistribute it and/or
 ## modify it under the terms of the Open Software License version 1.0 as
@@ -28,6 +28,8 @@
 	   -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
 	   -I$(srcdir)/../lib -I..
 
+AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw
+
 YACC = @YACC@ -d
 AM_YFLAGS = -pld
 AM_LFLAGS = -Pld -olex.yy.c
============================================================
--- tests/Makefile.am	a3ced4165ea5152b4f9266ec6948a4b05ad2c699
+++ tests/Makefile.am	dc33c353cee1d3e14a6227b399ea9c27bd2d1e22
@@ -23,15 +23,18 @@
 BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
 endif
 
+AM_LDFLAGS =
+
 if !STANDALONE
 INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
 	   -I$(top_srcdir)/libdwfl \
 	   -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
 	   -I$(top_srcdir)/lib -I..
+AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
 endif !STANDALONE
 
 if TESTS_RPATH
-AM_LDFLAGS = -Wl,-rpath,$(BUILT_RPATH)
+AM_LDFLAGS += -Wl,-rpath,$(BUILT_RPATH)
 tests_rpath = yes
 else
 tests_rpath = no

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

* Re: Problem Building Elfutils (patched) Required by systemtap
  2006-03-09 22:59 ` Frank Ch. Eigler
@ 2006-03-09 23:03   ` Nathan DeBardeleben
  0 siblings, 0 replies; 5+ messages in thread
From: Nathan DeBardeleben @ 2006-03-09 23:03 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Frank Ch. Eigler wrote:
> I wonder if this is some kind of security precaution in the linker,
> associated with running the build as root.
>   
Naw, this happens if I run it as a regular user as well. :(

-- Nathan
Correspondence
---------------------------------------------------------------------
Nathan DeBardeleben, Ph.D.
Los Alamos National Laboratory
Parallel Tools Team
High Performance Computing Environments
phone: 505-667-3428
email: ndebard@lanl.gov
---------------------------------------------------------------------




>   

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

* RE: Problem Building Elfutils (patched) Required by systemtap
@ 2006-03-09 22:25 Warner, Christopher
  0 siblings, 0 replies; 5+ messages in thread
From: Warner, Christopher @ 2006-03-09 22:25 UTC (permalink / raw)
  To: Nathan DeBardeleben, systemtap; +Cc: cwarner

It looks like you might need to run an ldconfig or work on the way you
installed elfutils.

-Christopher Warner

-----Original Message-----
From: Nathan DeBardeleben [mailto:ndebard@lanl.gov] 
Sent: Thursday, March 09, 2006 5:20 PM
To: systemtap@sources.redhat.com
Subject: Problem Building Elfutils (patched) Required by systemtap

I'm sure this is a newbie question but I figured I'd toss it out there 
anyway.  I'm trying to build the latest systemtap snapshot I see on the 
FTP server - 20060304.  I got the elfutils, 0.119 and patched it with 
the patch provided as well.  Then compiling systemtap it goes into the 
elfutils dir and runs a Make in there - I get the following error.  I'm 
trying this as root in this example since I was having problems doing it 
as a user (not sure if that's necessary):

. . .
> Making all in src
> make[3]: Entering directory 
> `/root/systemtap-20060304/src/build-elfutils/src'
> gcc -Wall -Wshadow -std=gnu99  -Werror -Wunused -Wextra -Wformat=2 -g 
> -O2  -Wl,--enable-new-dtags,-rpath,/usr/local/lib/systemtap -o 
> addr2line  addr2line.o ../libdw/libdw.so  
> /usr/bin/ld: warning: libelf.so.1, needed by ../libdw/libdw.so, not 
> found (try using -rpath or -rpath-link)
> ../libdw/libdw.so: undefined reference to `gelf_getsymshndx@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf32_xlatetof@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_errno@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_kind@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_update_shdr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_errmsg@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_xlatetom@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getshdr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_end@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf32_xlatetom@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_nextscn@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getrel@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getehdr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_rawdata@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_getshstrndx@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_strptr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getphdr@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_version@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_begin@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_ndxscn@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_xlatetof@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `gelf_getrela@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_memory@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_getdata@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_cntl@ELFUTILS_1.0'
> ../libdw/libdw.so: undefined reference to `elf_getscn@ELFUTILS_1.0'
> collect2: ld returned 1 exit status
> make[3]: *** [addr2line] Error 1
> make[3]: Leaving directory 
> `/root/systemtap-20060304/src/build-elfutils/src'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/root/systemtap-20060304/src/build-elfutils'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/systemtap-20060304/src/build-elfutils'
> make: *** [stamp-elfutils] Error 2
I had previous configured systemtap with:
./configure --with-elfutils=/root/elfutils-0.119

Any help would be appreciated.  Sorry for the newbie question but 
perhaps it reveals a problem in the configure or potentially a place to 
add something in the docs?  Or maybe I just missed something in the docs. :)

Thanks!

-- 
-- Nathan
Correspondence
---------------------------------------------------------------------
Nathan DeBardeleben, Ph.D.
Los Alamos National Laboratory
Parallel Tools Team
High Performance Computing Environments
phone: 505-667-3428
email: ndebard@lanl.gov
---------------------------------------------------------------------

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

end of thread, other threads:[~2006-03-09 23:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-09 22:20 Problem Building Elfutils (patched) Required by systemtap Nathan DeBardeleben
2006-03-09 22:59 ` Frank Ch. Eigler
2006-03-09 23:03   ` Nathan DeBardeleben
2006-03-09 23:03 ` Roland McGrath
2006-03-09 22:25 Warner, Christopher

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).