[DynInst_API:] Compiling CFGTool using Dyninst Libarary in Ubuntu 16.04


Date: Fri, 10 Feb 2017 06:59:13 -0500
From: Sazzadur Rahaman <sazzad14@xxxxxx>
Subject: [DynInst_API:] Compiling CFGTool using Dyninst Libarary in Ubuntu 16.04
Hi All,

I cloned the current Dyninst project (commit id 86d44d2ccdd94506751a71e83f92f6a665c2eba5) in Ubuntu 16.04 and successfully installed it. Then I was trying to build CFGTool (http://www.paradyn.org/html/tools/CFGTool.html) but failed to do so.

Error Message:
g++ -g -O2 -std=gnu++11 -I/usr/local/include -L/usr/local/lib -lparseAPI -lsymtabAPI -lelf -ldynDwarf -ldwarf -lelf -ldynElf -lcommon CFG.cpp -o CFG
/tmp/ccAL926i.o: In function `PrintBlockInfo(Dyninst::ParseAPI::Block*)':
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:82: undefined reference to `Dyninst::InstructionAPI::InstructionDecoder::InstructionDecoder(unsigned char const*, unsigned long, Dyninst::Architecture)'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:88: undefined reference to `Dyninst::InstructionAPI::Instruction::format(unsigned long) const'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:89: undefined reference to `Dyninst::InstructionAPI::Instruction::size() const'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:87: undefined reference to `Dyninst::InstructionAPI::InstructionDecoder::decode()'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:90: undefined reference to `Dyninst::InstructionAPI::InstructionDecoder::~InstructionDecoder()'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:90: undefined reference to `Dyninst::InstructionAPI::InstructionDecoder::~InstructionDecoder()'
/tmp/ccAL926i.o: In function `main':
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:111: undefined reference to `Dyninst::ParseAPI::SymtabCodeSource::SymtabCodeSource(char*)'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:112: undefined reference to `Dyninst::ParseAPI::CodeObject::CodeObject(Dyninst::ParseAPI::CodeSource*, Dyninst::ParseAPI::CFGFactory*, Dyninst::ParseAPI::ParseCallback*, bool)'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:115: undefined reference to `Dyninst::ParseAPI::CodeObject::parse()'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:120: undefined reference to `Dyninst::ParseAPI::Function::blocks()'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:120: undefined reference to `Dyninst::ParseAPI::Function::blocks()'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:149: undefined reference to `Dyninst::ParseAPI::Function::blocks()'
/home/krishnokoli/dyninst-tools/CFGTool/CFG.cpp:150: undefined reference to `Dyninst::ParseAPI::Function::blocks()'
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'CFG' failed
make: *** [CFG] Error 1

My make File:

CFLAGS = -g -O2 -std=gnu++11
INC = -I/usr/local/include
LIB = -L/usr/local/lib
DEP = -lparseAPI -lsymtabAPI -lelf -ldynDwarf -ldwarf -lelf -ldynElf -lcommon

CFG: CFG.cpp
ÂÂÂÂÂ g++ $(CFLAGS) $(INC) $(LIB) $(DEP) CFG.cpp -o CFG

My g++ version:

g++ (Ubuntu 4.8.5-4ubuntu2) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks in advance!

Best Regards,
Sazzadur Rahaman

[← Prev in Thread] Current Thread [Next in Thread→]