/usr/bin/ld: CMakeFiles/cfg_to_dot.dir/__/parseAPI/doc/example.cc.o:
undefined reference to symbol '_ZN5boost6system16generic_categoryEv'
//usr/lib64/libboost_system.so.1.66.0: error adding symbols: DSO missing
from command line
This patch resolves the above for new-parallel-parsing branch so it
builds on fedora 28. It is essentially a reworking of the #459 patch
for n-p-p. It builds codeCoverage/codeCoverage and unstrip/unstrip in
their subdirectory; otherwise building in the examples directory results
in a name clash between the executable and directory. Next, I'll try
n-p-p with our systemtap dyninst backend.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 478978e08..7564ad1d7 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,33 +1,9 @@
+add_subdirectory(unstrip)
-
-add_executable(unstrip unstrip/unstrip.C
- unstrip/util.C
- unstrip/types.C
- unstrip/semanticDescriptor.C
- unstrip/database.C
- unstrip/fingerprint.C
- unstrip/callback.C)
-add_dependencies(unstrip parseAPI symtabAPI instructionAPI common dynDwarf dynElf)
-target_link_libraries(unstrip parseAPI symtabAPI instructionAPI common dynDwarf dynElf ${Boost_LIBRARIES})
-file(COPY unstrip/ddb.db DESTINATION ${INSTALL_BIN_DIR})
-file(COPY unstrip/params.db DESTINATION ${INSTALL_BIN_DIR})
-file(COPY unstrip/unistd.db DESTINATION ${INSTALL_BIN_DIR})
-
-add_executable(codeCoverage codeCoverage/codeCoverage.C)
-add_dependencies(codeCoverage dyninstAPI patchAPI parseAPI symtabAPI instructionAPI pcontrol common stackwalk dynDwarf dynElf)
-target_link_libraries(codeCoverage dyninstAPI patchAPI parseAPI symtabAPI instructionAPI pcontrol common stackwalk dynDwarf dynElf ${Boost_LIBRARIES})
-
-add_library(Inst SHARED codeCoverage/libInst.C)
+add_subdirectory(codeCoverage)
add_executable(cfg_to_dot ../parseAPI/doc/example.cc)
-add_dependencies(cfg_to_dot parseAPI symtabAPI instructionAPI common dynDwarf dynElf)
-target_link_libraries(cfg_to_dot parseAPI symtabAPI instructionAPI common dynDwarf dynElf ${Boost_LIBRARIES})
-#add_executable(retee)
-
-install (TARGETS cfg_to_dot unstrip codeCoverage Inst
- RUNTIME DESTINATION ${INSTALL_BIN_DIR}
- LIBRARY DESTINATION ${INSTALL_LIB_DIR}
- ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
- PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})
+add_dependencies(cfg_to_dot parseAPI symtabAPI)
+target_link_libraries(cfg_to_dot parseAPI symtabAPI ${Boost_LIBRARIES})
diff --git a/examples/codeCoverage/CMakeLists.txt b/examples/codeCoverage/CMakeLists.txt
new file mode 100644
index 000000000..9ce24b998
--- /dev/null
+++ b/examples/codeCoverage/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_executable(codeCoverage codeCoverage.C)
+add_dependencies(codeCoverage dyninstAPI patchAPI parseAPI symtabAPI instructionAPI pcontrol common)
+target_link_libraries(codeCoverage dyninstAPI patchAPI parseAPI symtabAPI instructionAPI pcontrol common ${Boost_LIBRARIES})
+add_library(Inst SHARED libInst.C)
+
+install (TARGETS codeCoverage
+ RUNTIME DESTINATION ${INSTALL_BIN_DIR}
+ LIBRARY DESTINATION ${INSTALL_LIB_DIR}
+ ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
+ PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})
diff --git a/examples/unstrip/CMakeLists.txt b/examples/unstrip/CMakeLists.txt
new file mode 100644
index 000000000..ae6ce0ec1
--- /dev/null
+++ b/examples/unstrip/CMakeLists.txt
@@ -0,0 +1,18 @@
+add_executable(unstrip unstrip.C
+ util.C
+ types.C
+ semanticDescriptor.C
+ database.C
+ fingerprint.C
+ callback.C)
+add_dependencies(unstrip parseAPI symtabAPI instructionAPI common)
+target_link_libraries(unstrip parseAPI symtabAPI instructionAPI common ${Boost_LIBRARIES})
+file(COPY ddb.db DESTINATION ${INSTALL_BIN_DIR})
+file(COPY params.db DESTINATION ${INSTALL_BIN_DIR})
+file(COPY unistd.db DESTINATION ${INSTALL_BIN_DIR})
+
+install (TARGETS unstrip
+ RUNTIME DESTINATION ${INSTALL_BIN_DIR}
+ LIBRARY DESTINATION ${INSTALL_LIB_DIR}
+ ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
+ PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR})
|