This is the mail archive of the systemtap@sourceware.org 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]

[Bug dyninst/15740] New: stapdyn linking failed


http://sourceware.org/bugzilla/show_bug.cgi?id=15740

            Bug ID: 15740
           Summary: stapdyn linking failed
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dyninst
          Assignee: systemtap at sourceware dot org
          Reporter: soariez at gmail dot com

Compiling stapdyn failed on my system.

Here is the error output: 
====
make[3]: Entering directory `./systemtap/stapdyn'
  CXXLD    stapdyn
/usr/lib64/dyninst/libdyninstAPI.so: undefined reference to
`Dyninst::SymtabAPI::Function::getParams(std::vector<Dyninst::SymtabAPI::localVar*,
std::allocator<Dyninst::SymtabAPI::localVar*> >&)'
/usr/lib64/dyninst/libdyninstAPI.so: undefined reference to
`Dyninst::SymtabAPI::Function::getLocalVariables(std::vector<Dyninst::SymtabAPI::localVar*,
std::allocator<Dyninst::SymtabAPI::localVar*> >&)'
/usr/lib64/dyninst/libdyninstAPI.so: undefined reference to
`Dyninst::SymtabAPI::Function::getReturnType() const'
collect2: error: ld returned 1 exit status
make[3]: *** [stapdyn] Error 1
====

Looks like these symbols are defined in libsymtabAPI.so not libdyninstAPI.so.
====
â  /tmp  rpmextract.sh dyninst-8.1.2-1.fc20.x86_64.rpm 
â  /tmp  nm -CD usr/lib64/dyninst/libdyninstAPI.so | grep getReturnType
0000000000101bc0 T BPatch_function::getReturnType()
                 U Dyninst::SymtabAPI::Function::getReturnType() const
â  /tmp  nm -CD usr/lib64/dyninst/libsymtabAPI.so | grep getReturnType 
00000000000eecd0 T Dyninst::SymtabAPI::DwarfWalker::getReturnType(bool,
Dyninst::SymtabAPI::Type*&)
00000000000e36b0 T Dyninst::SymtabAPI::typeFunction::getReturnType() const
00000000000afca0 T Dyninst::SymtabAPI::Function::getReturnType() const
====

A quick patch attached:
====
diff --git a/stapdyn/Makefile.am b/stapdyn/Makefile.am
index 6bd43f3..57d0e35 100644
--- a/stapdyn/Makefile.am
+++ b/stapdyn/Makefile.am
@@ -30,12 +30,12 @@ stapdyn_SOURCES = stapdyn.cxx mutator.cxx mutatee.cxx \
                                  dynprobe.cxx dynutil.cxx ../util.cxx
 stapdyn_CXXFLAGS = $(AM_CXXFLAGS) @DYNINST_CXXFLAGS@
 stapdyn_LDFLAGS = $(AM_LDFLAGS) @DYNINST_LDFLAGS@
-stapdyn_LDADD = -ldl -ldyninstAPI -lpthread
+stapdyn_LDADD = -ldl -ldyninstAPI -lsymtabAPI -lpthread

 dynsdt_SOURCES = dynsdt.cxx dynutil.cxx ../util.cxx
 dynsdt_CXXFLAGS = $(AM_CXXFLAGS) @DYNINST_CXXFLAGS@
 dynsdt_LDFLAGS = $(AM_LDFLAGS) @DYNINST_LDFLAGS@
-dynsdt_LDADD = -ldl -lelf -ldyninstAPI -lpthread
+dynsdt_LDADD = -ldl -lelf -ldyninstAPI -lsymtabAPI -lpthread

 endif # HAVE_DYNINST
====

I am not sure if this issue is system specific. I am running Archlinux with
dyninst 8.1.2 installed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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