I have to include google protocol buffer in pintool in order to save trace data but when I compile with this makefile makefile.rules
TOOL_LIBS += -lprotobuf -pthread -lboost_system
$(OBJDIR)Source1$(OBJ_SUFFIX): trace.pb.cc
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
$(OBJDIR)Source2$(OBJ_SUFFIX): protoio.cc
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
$(OBJDIR)Source3$(OBJ_SUFFIX): tracerProto.cpp
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
# Build the tool as a dll (shared object).
$(OBJDIR)tracerProto$(PINTOOL_SUFFIX): $(OBJDIR)Source1$(OBJ_SUFFIX) trace.pb.h $(OBJDIR)Source2$(OBJ_SUFFIX) protoio.hh $(OBJDIR)Source3$(OBJ_SUFFIX)
$(LINKER) $(TOOL_LDFLAGS_NOOPT) $(LINK_EXE)$@ $(^:%.h=) $(TOOL_LPATHS) $(TOOL_LIBS)
but I got this error when run using this command pin -t obj-intel64/tracerProto2.so -- /bin/ls
E: Unable to load tracerProto2.so: dlopen failed: library "libprotobuf.so.17" not found
but protocol buffer library is installed already.
I have done using protobuf in another project which is built by cmake. It works correctly. How can I solve this problem?