Blame SOURCES/dyninst-12.1.0-cmake.patch

9ef3c2
# rhel6 and rhel7 need more recent tbb and boost libraries.  The dyninst external project setup
9ef3c2
# will download, build, and install to the final location.  We change that to build from source.tar
9ef3c2
# included in the src.rpm, install in the rpmbuild/BUILD tree and finally install into rpmbuild/BUILDTREE
9ef3c2
# We also remove the dependency on cmake 3
9ef3c2
9ef3c2
--- dyninst-12.1.0/instructionAPI/CMakeLists.txt.orig	2022-03-09 17:41:45.000000000 -0500
9ef3c2
+++ dyninst-12.1.0/instructionAPI/CMakeLists.txt	2022-05-06 16:24:00.973999675 -0400
9ef3c2
@@ -33,3 +33,3 @@
9ef3c2
 if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
9ef3c2
-    if (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^([1-9]|1[01])(\.|$)")
9ef3c2
+    if (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^([1-9]|1[01])(.|$)")
9ef3c2
         # Disable var-tracking-assignments for InstructionDecoder-power.C for
9ef3c2
@@ -41,3 +41,3 @@
9ef3c2
         # succeeds, but the object file produced is >1GB, so disable it.
9ef3c2
-        string(APPEND instructionDecoderPowerExtraFlags "-fno-var-tracking-assignments")
9ef3c2
+        set(instructionDecoderPowerExtraFlags "${instructionDecoderPowerExtraFlags} -fno-var-tracking-assignments")
9ef3c2
     endif()
9ef3c2
@@ -47,8 +47,6 @@
9ef3c2
 if (debugMaxFrameSizeOverridePowerOpcodeTable)
9ef3c2
-        string(APPEND instructionDecoderPowerExtraFlags
9ef3c2
-                " $<$<CONFIG:DEBUG>:-Wframe-larger-than=${debugMaxFrameSizeOverridePowerOpcodeTable}>")
9ef3c2
+        set(instructionDecoderPowerExtraFlags "${instructionDecoderPowerExtraFlags} $<$<CONFIG:DEBUG>:-Wframe-larger-than=${debugMaxFrameSizeOverridePowerOpcodeTable}>")
9ef3c2
 endif()
9ef3c2
 if (nonDebugMaxFrameSizeOverridePowerOpcodeTable)
9ef3c2
-        string(APPEND instructionDecoderPowerExtraFlags
9ef3c2
-                " $<$<NOT:$<CONFIG:DEBUG>>:-Wframe-larger-than=${nonDebugMaxFrameSizeOverridePowerOpcodeTable}>")
9ef3c2
+        set(instructionDecoderPowerExtraFlags "${instructionDecoderPowerExtraFlags} $<$<NOT:$<CONFIG:DEBUG>>:-Wframe-larger-than=${nonDebugMaxFrameSizeOverridePowerOpcodeTable}>")
9ef3c2
 endif()
9ef3c2
9ef3c2
--- dyninst-12.1.0/CMakeLists.txt.orig	2022-03-09 17:41:45.000000000 -0500
9ef3c2
+++ dyninst-12.1.0/CMakeLists.txt	2022-05-09 15:59:30.211632542 -0400
9ef3c2
@@ -1,2 +1,2 @@
9ef3c2
-cmake_minimum_required (VERSION 3.4.0)
9ef3c2
+cmake_minimum_required (VERSION 2.8)
9ef3c2
 
9ef3c2
@@ -15,3 +15,3 @@
9ef3c2
 
9ef3c2
-set(STERILE_BUILD ON CACHE BOOL "Do not download/build any third-party dependencies from source")
9ef3c2
+set(STERILE_BUILD OFF CACHE BOOL "Do not download/build any third-party dependencies from source")
9ef3c2
 
9ef3c2
@@ -245,1 +245,24 @@
9ef3c2
 install(FILES ${PROJECT_BINARY_DIR}/CMakeCache.txt DESTINATION ${INSTALL_CMAKE_DIR})
9ef3c2
+
9ef3c2
+# RHEL 6/7 need more recent TBB and BOOST libraries, cmake will build them as an external project.
9ef3c2
+# Copy resulting libraries from temp install dir to dyninst install dir
9ef3c2
+# Note: FILE GLOB does not work as make has not yet run so we need to explicitly set the list
9ef3c2
+
9ef3c2
+set(TBB_AND_BOOST_LIBS tbb/install/lib/libtbbmalloc_proxy.so.2 tbb/install/lib/libtbbmalloc.so.2 tbb/install/lib/libtbb.so.2 boost/install/lib/libboost_atomic.so.1.66.0 boost/install/lib/libboost_atomic.so boost/install/lib/libboost_chrono.so.1.66.0 boost/install/lib/libboost_chrono.so boost/install/lib/libboost_date_time.so.1.66.0 boost/install/lib/libboost_date_time.so boost/install/lib/libboost_filesystem.so.1.66.0 boost/install/lib/libboost_filesystem.so boost/install/lib/libboost_system.so.1.66.0 boost/install/lib/libboost_system.so boost/install/lib/libboost_thread.so.1.66.0 boost/install/lib/libboost_thread.so boost/install/lib/libboost_timer.so.1.66.0 boost/install/lib/libboost_timer.so)
9ef3c2
+
9ef3c2
+get_filename_component(install_lib_dir_dir ${INSTALL_LIB_DIR} DIRECTORY)
9ef3c2
+get_filename_component(dyninst_dir ${INSTALL_LIB_DIR} NAME)
9ef3c2
+get_filename_component(lib_dir ${install_lib_dir_dir} NAME)
9ef3c2
+get_filename_component(install_include_dir_dir ${INSTALL_INCLUDE_DIR} DIRECTORY)
9ef3c2
+get_filename_component(include_dir ${install_include_dir_dir} NAME)
9ef3c2
+foreach(F ${TBB_AND_BOOST_LIBS})
9ef3c2
+  # DESTDIR is prefixed to the install dir
9ef3c2
+  message("install ${Dyninst_BINARY_DIR}/${F} into ${CMAKE_INSTALL_PREFIX}/${lib_dir}/${dyninst_dir}")
9ef3c2
+  install(PROGRAMS "${Dyninst_BINARY_DIR}/${F}" DESTINATION "${CMAKE_INSTALL_PREFIX}/${lib_dir}/${dyninst_dir}")
9ef3c2
+endforeach()
9ef3c2
+message("install tbb/install/include into ${CMAKE_INSTALL_PREFIX}/${include_dir}/tbb}")
9ef3c2
+install(DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${include_dir}/tbb/")
9ef3c2
+install(DIRECTORY "tbb/install/include/" DESTINATION "${CMAKE_INSTALL_PREFIX}/${include_dir}")
9ef3c2
+message("install boost/install/include into ${CMAKE_INSTALL_PREFIX}/${include_dir}/boost}")
9ef3c2
+install(DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${include_dir}/boost/")
9ef3c2
+install(DIRECTORY "boost/install/include/" DESTINATION "${CMAKE_INSTALL_PREFIX}/${include_dir}/")
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/Boost.cmake.orig	2022-03-09 17:41:45.000000000 -0500
9ef3c2
+++ dyninst-12.1.0/cmake/Boost.cmake	2022-05-09 16:00:35.228389591 -0400
9ef3c2
@@ -53,3 +53,3 @@ endif()
9ef3c2
 # Need at least Boost-1.67 because of deprecated headers
9ef3c2
-set(_boost_min_version 1.70.0)
9ef3c2
+set(_boost_min_version 1.66.0)
9ef3c2
 
9ef3c2
@@ -134,3 +134,3 @@ set(Boost_NO_BOOST_CMAKE ON)
9ef3c2
 #     This should _not_ be a cache variable
9ef3c2
-set(_boost_components atomic chrono date_time filesystem thread timer)
9ef3c2
+set(_boost_components atomic chrono date_time filesystem system thread timer)
9ef3c2
 
9ef3c2
@@ -182,3 +182,4 @@ else()
9ef3c2
   # Change the base directory
9ef3c2
-  set(Boost_ROOT_DIR ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory the of Boost installation" FORCE)
9ef3c2
+#  set(Boost_ROOT_DIR ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory the of Boost installation" FORCE)
9ef3c2
+  set(Boost_ROOT_DIR "${CMAKE_BINARY_DIR}/boost/install" CACHE PATH "TBB root directory" FORCE)
9ef3c2
 
9ef3c2
@@ -216,3 +217,3 @@ else()
9ef3c2
 	# list(JOIN ...) is in cmake 3.12
9ef3c2
-    string(CONCAT _boost_lib_names "${_boost_lib_names}${c},")
9ef3c2
+    set(_boost_lib_names "${_boost_lib_names}${c},")
9ef3c2
   endforeach()
9ef3c2
@@ -224,3 +225,3 @@ else()
9ef3c2
     PREFIX ${CMAKE_BINARY_DIR}/boost
9ef3c2
-    URL http://downloads.sourceforge.net/project/boost/boost/${_boost_download_version}/boost_${_boost_download_filename}.zip
9ef3c2
+    URL /tmp/boost_${_boost_download_filename}.tar.bz2
9ef3c2
     BUILD_IN_SOURCE 1
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/warnings.cmake.orig	2022-03-09 17:41:45.000000000 -0500
9ef3c2
+++ dyninst-12.1.0/cmake/warnings.cmake	2022-05-09 12:02:21.000059066 -0400
9ef3c2
@@ -78,3 +78,3 @@ if (CMAKE_C_COMPILER_ID MATCHES "^(GNU|C
9ef3c2
     if (${v})
9ef3c2
-        string(APPEND SUPPORTED_C_WARNING_FLAGS " -${f}")
9ef3c2
+        set(SUPPORTED_C_WARNING_FLAGS "${SUPPORTED_C_WARNING_FLAGS} -${f}")
9ef3c2
         if (f MATCHES "^(.*)=[0-9]+$")
9ef3c2
@@ -95,3 +95,3 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "^(GNU
9ef3c2
     if (${v})
9ef3c2
-        string(APPEND SUPPORTED_CXX_WARNING_FLAGS " -${f}")
9ef3c2
+        set(SUPPORTED_CXX_WARNING_FLAGS "${SUPPORTED_CXX_WARNING_FLAGS} -${f}")
9ef3c2
         if (f MATCHES "^(.*)=[0-9]+$")
9ef3c2
@@ -112,3 +112,3 @@ endif()
9ef3c2
 #
9ef3c2
-if (HAS_CPP_FLAG_Wframe_larger_than)
9ef3c2
+if (false AND HAS_CPP_FLAG_Wframe_larger_than)
9ef3c2
     # Override the default frame size maximum for DEBUG (-O0) build types
9ef3c2
@@ -125,3 +125,3 @@ if (HAS_CPP_FLAG_Wframe_larger_than)
9ef3c2
     set(debugMaxFrameSizeOverridePowerOpcodeTable 358400)
9ef3c2
-    if (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^[7](\.|$)")
9ef3c2
+    if (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^[7](.|$)")
9ef3c2
 	set(nonDebugMaxFrameSizeOverridePowerOpcodeTable 38912)
9ef3c2
@@ -134,4 +134,4 @@ if (MSVC)
9ef3c2
   message(STATUS "TODO: Set up custom warning flags for MSVC")
9ef3c2
-  string(APPEND CMAKE_C_FLAGS "/wd4251 /wd4091 /wd4503")
9ef3c2
-  string(APPEND CMAKE_CXX_FLAGS "/wd4251 /wd4091 /wd4503")
9ef3c2
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4251 /wd4091 /wd4503")
9ef3c2
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4091 /wd4503")
9ef3c2
 endif()
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/Modules/FindBoost.cmake.orig	2022-03-09 17:41:45.000000000 -0500
9ef3c2
+++ dyninst-12.1.0/cmake/Modules/FindBoost.cmake	2022-05-06 16:22:04.726563013 -0400
9ef3c2
@@ -242,3 +242,3 @@
9ef3c2
 cmake_policy(PUSH)
9ef3c2
-cmake_policy(SET CMP0057 NEW) # if IN_LIST
9ef3c2
+# cmake_policy(SET CMP0057 NEW) # if IN_LIST
9ef3c2
 
9ef3c2
@@ -338,3 +338,3 @@ macro(_Boost_ADJUST_LIB_VARS basename)
9ef3c2
       if("x${basename}" STREQUAL "xTHREAD" AND NOT TARGET Threads::Threads)
9ef3c2
-        string(APPEND Boost_ERROR_REASON_THREAD " (missing dependency: Threads)")
9ef3c2
+        set(Boost_ERROR_REASON_THREAD "${Boost_ERROR_REASON_THREAD} (missing dependency: Threads)")
9ef3c2
         set(Boost_THREAD_FOUND OFF)
9ef3c2
@@ -1021,4 +1021,8 @@ function(_Boost_MISSING_DEPENDENCIES com
9ef3c2
       foreach(componentdep ${_Boost_${uppercomponent}_DEPENDENCIES})
9ef3c2
-        if (NOT ("${componentdep}" IN_LIST _boost_processed_components OR "${componentdep}" IN_LIST _boost_new_components))
9ef3c2
-          list(APPEND _boost_new_components ${componentdep})
9ef3c2
+        list (FIND _boost_processed_components ${componentdep} _index)
9ef3c2
+	if (${_index} EQUAL -1)
9ef3c2
+	  list (FIND _boost_new_components ${componentdep} _index)
9ef3c2
+	  if (${_index} EQUAL -1)
9ef3c2
+            list(APPEND _boost_new_components ${componentdep})
9ef3c2
+	  endif()
9ef3c2
         endif()
9ef3c2
@@ -1199,9 +1203,9 @@ endif()
9ef3c2
 # enable dynamic linking.
9ef3c2
-if(NOT TARGET Boost::diagnostic_definitions)
9ef3c2
-  add_library(Boost::diagnostic_definitions INTERFACE IMPORTED)
9ef3c2
-  add_library(Boost::disable_autolinking INTERFACE IMPORTED)
9ef3c2
-  add_library(Boost::dynamic_linking INTERFACE IMPORTED)
9ef3c2
-  set_target_properties(Boost::dynamic_linking PROPERTIES
9ef3c2
-    INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_DYN_LINK")
9ef3c2
-endif()
9ef3c2
+# if(NOT TARGET Boost::diagnostic_definitions)
9ef3c2
+#   add_library(Boost::diagnostic_definitions INTERFACE IMPORTED)
9ef3c2
+#   add_library(Boost::disable_autolinking INTERFACE IMPORTED)
9ef3c2
+#   add_library(Boost::dynamic_linking INTERFACE IMPORTED)
9ef3c2
+#   set_target_properties(Boost::dynamic_linking PROPERTIES
9ef3c2
+#     INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_DYN_LINK")
9ef3c2
+# endif()
9ef3c2
 if(WIN32)
9ef3c2
@@ -1387,4 +1391,5 @@ if(Boost_INCLUDE_DIR)
9ef3c2
 
9ef3c2
-  string(APPEND Boost_ERROR_REASON
9ef3c2
-    "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
9ef3c2
+  set(Boost_ERROR_REASON
9ef3c2
+    "${Boost_ERROR_REASON}
9ef3c2
+   Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
9ef3c2
   if(Boost_DEBUG)
9ef3c2
@@ -1410,12 +1415,12 @@ if(Boost_INCLUDE_DIR)
9ef3c2
       # State that we found a version of Boost that is too new or too old.
9ef3c2
-      string(APPEND Boost_ERROR_REASON
9ef3c2
-        "\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
9ef3c2
+      set(Boost_ERROR_REASON
9ef3c2
+        "${Boost_ERROR_REASON}
9ef3c2
+       \nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
9ef3c2
       if (Boost_FIND_VERSION_PATCH)
9ef3c2
-        string(APPEND Boost_ERROR_REASON
9ef3c2
-          ".${Boost_FIND_VERSION_PATCH}")
9ef3c2
+        set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}")
9ef3c2
       endif ()
9ef3c2
       if (NOT Boost_FIND_VERSION_EXACT)
9ef3c2
-        string(APPEND Boost_ERROR_REASON " (or newer)")
9ef3c2
+        set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)")
9ef3c2
       endif ()
9ef3c2
-      string(APPEND Boost_ERROR_REASON ".")
9ef3c2
+      set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.")
9ef3c2
     endif ()
9ef3c2
@@ -1427,4 +1432,5 @@ else()
9ef3c2
   set(Boost_FOUND 0)
9ef3c2
-  string(APPEND Boost_ERROR_REASON
9ef3c2
-    "Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
9ef3c2
+  set(Boost_ERROR_REASON
9ef3c2
+    "${Boost_ERROR_REASON}
9ef3c2
+   Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
9ef3c2
 endif()
9ef3c2
@@ -1518,3 +1524,3 @@ if(WIN32 AND Boost_USE_DEBUG_RUNTIME)
9ef3c2
           OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
9ef3c2
-    string(APPEND _boost_DEBUG_ABI_TAG "g")
9ef3c2
+    set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
9ef3c2
   endif()
9ef3c2
@@ -1523,6 +1529,6 @@ endif()
9ef3c2
 if(Boost_USE_DEBUG_PYTHON)
9ef3c2
-  string(APPEND _boost_DEBUG_ABI_TAG "y")
9ef3c2
+  set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y")
9ef3c2
 endif()
9ef3c2
 #  d        using a debug version of your code
9ef3c2
-string(APPEND _boost_DEBUG_ABI_TAG "d")
9ef3c2
+set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d")
9ef3c2
 #  p        using the STLport standard library rather than the
9ef3c2
@@ -1530,4 +1536,4 @@ string(APPEND _boost_DEBUG_ABI_TAG "d")
9ef3c2
 if(Boost_USE_STLPORT)
9ef3c2
-  string(APPEND _boost_RELEASE_ABI_TAG "p")
9ef3c2
-  string(APPEND _boost_DEBUG_ABI_TAG "p")
9ef3c2
+  set(_boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
9ef3c2
+  set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}p")
9ef3c2
 endif()
9ef3c2
@@ -1537,4 +1543,4 @@ endif()
9ef3c2
 if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
9ef3c2
-  string(APPEND _boost_RELEASE_ABI_TAG "n")
9ef3c2
-  string(APPEND _boost_DEBUG_ABI_TAG "n")
9ef3c2
+  set(_boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
9ef3c2
+  set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}n")
9ef3c2
 endif()
9ef3c2
@@ -1554,3 +1560,3 @@ else()
9ef3c2
   if(NOT "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "x" AND NOT Boost_VERSION VERSION_LESS 106600)
9ef3c2
-    string(APPEND _boost_ARCHITECTURE_TAG "-")
9ef3c2
+    set(_boost_ARCHITECTURE_TAG "${_boost_ARCHITECTURE_TAG}-")
9ef3c2
     # This needs to be kept in-sync with the section of CMakePlatformId.h.in
9ef3c2
@@ -1558,10 +1564,10 @@ else()
9ef3c2
     if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "IA64")
9ef3c2
-      string(APPEND _boost_ARCHITECTURE_TAG "i")
9ef3c2
+      set(_boost_ARCHITECTURE_TAG "${_boost_ARCHITECTURE_TAG}i")
9ef3c2
     elseif(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "X86"
9ef3c2
               OR CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "x64")
9ef3c2
-      string(APPEND _boost_ARCHITECTURE_TAG "x")
9ef3c2
+      set(_boost_ARCHITECTURE_TAG "${_boost_ARCHITECTURE_TAG}x")
9ef3c2
     elseif(CMAKE_CXX_COMPILER_ARCHITECTURE_ID MATCHES "^ARM")
9ef3c2
-      string(APPEND _boost_ARCHITECTURE_TAG "a")
9ef3c2
+      set(_boost_ARCHITECTURE_TAG "${_boost_ARCHITECTURE_TAG}a")
9ef3c2
     elseif(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "MIPS")
9ef3c2
-      string(APPEND _boost_ARCHITECTURE_TAG "m")
9ef3c2
+      set(_boost_ARCHITECTURE_TAG "${_boost_ARCHITECTURE_TAG}m")
9ef3c2
     endif()
9ef3c2
@@ -1569,5 +1575,5 @@ else()
9ef3c2
     if(CMAKE_SIZEOF_VOID_P EQUAL 8)
9ef3c2
-      string(APPEND _boost_ARCHITECTURE_TAG "64")
9ef3c2
+      set(_boost_ARCHITECTURE_TAG "${_boost_ARCHITECTURE_TAG}64")
9ef3c2
     else()
9ef3c2
-      string(APPEND _boost_ARCHITECTURE_TAG "32")
9ef3c2
+      set(_boost_ARCHITECTURE_TAG "${_boost_ARCHITECTURE_TAG}32")
9ef3c2
     endif()
9ef3c2
@@ -1696,3 +1702,4 @@ _Boost_MISSING_DEPENDENCIES(Boost_FIND_C
9ef3c2
 # If thread is required, get the thread libs as a dependency
9ef3c2
-if("thread" IN_LIST Boost_FIND_COMPONENTS)
9ef3c2
+list (FIND Boost_FIND_COMPONENTS "thread" _index)
9ef3c2
+if (${_index} GREATER -1)
9ef3c2
   if(Boost_FIND_QUIETLY)
9ef3c2
@@ -1974,13 +1981,16 @@ if(Boost_FOUND)
9ef3c2
     # error message that lists the libraries we were unable to find.
9ef3c2
-    string(APPEND Boost_ERROR_REASON
9ef3c2
-      "\nCould not find the following")
9ef3c2
+    set(Boost_ERROR_REASON
9ef3c2
+      "${Boost_ERROR_REASON}
9ef3c2
+     \nCould not find the following")
9ef3c2
     if(Boost_USE_STATIC_LIBS)
9ef3c2
-      string(APPEND Boost_ERROR_REASON " static")
9ef3c2
+      set(Boost_ERROR_REASON "${Boost_ERROR_REASON} static")
9ef3c2
     endif()
9ef3c2
-    string(APPEND Boost_ERROR_REASON
9ef3c2
-      " Boost libraries:\n")
9ef3c2
+    set(Boost_ERROR_REASON
9ef3c2
+      "${Boost_ERROR_REASON}
9ef3c2
+      Boost libraries:\n")
9ef3c2
     foreach(COMPONENT ${_Boost_MISSING_COMPONENTS})
9ef3c2
       string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
9ef3c2
-      string(APPEND Boost_ERROR_REASON
9ef3c2
-        "        ${Boost_NAMESPACE}_${COMPONENT}${Boost_ERROR_REASON_${UPPERCOMPONENT}}\n")
9ef3c2
+      set(Boost_ERROR_REASON
9ef3c2
+        "${Boost_ERROR_REASON}
9ef3c2
+               ${Boost_NAMESPACE}_${COMPONENT}${Boost_ERROR_REASON_${UPPERCOMPONENT}}\n")
9ef3c2
     endforeach()
9ef3c2
@@ -1990,7 +2000,9 @@ if(Boost_FOUND)
9ef3c2
     if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
9ef3c2
-      string(APPEND Boost_ERROR_REASON
9ef3c2
-        "No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
9ef3c2
+      set(Boost_ERROR_REASON
9ef3c2
+        "${Boost_ERROR_REASON}
9ef3c2
+       No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
9ef3c2
     else ()
9ef3c2
-      string(APPEND Boost_ERROR_REASON
9ef3c2
-        "Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
9ef3c2
+      set(Boost_ERROR_REASON
9ef3c2
+        "${Boost_ERROR_REASON}
9ef3c2
+       Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
9ef3c2
     endif ()
9ef3c2
@@ -2017,5 +2029,5 @@ if(Boost_FOUND)
9ef3c2
     if(EXISTS "${_boost_LIB_DIR}/lib")
9ef3c2
-      string(APPEND _boost_LIB_DIR /lib)
9ef3c2
+      set(_boost_LIB_DIR "_boost_LIB_DIR/lib")
9ef3c2
     elseif(EXISTS "${_boost_LIB_DIR}/stage/lib")
9ef3c2
-      string(APPEND _boost_LIB_DIR "/stage/lib")
9ef3c2
+      set(_boost_LIB_DIR "${_boost_LIB_DIR}/stage/lib")
9ef3c2
     else()
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/ThreadingBuildingBlocks.cmake.orig	2019-07-15 22:26:08.788921240 -0400
9ef3c2
+++ dyninst-12.1.0/cmake/ThreadingBuildingBlocks.cmake	2019-07-16 20:37:56.804643938 -0400
9ef3c2
@@ -107,7 +107,8 @@
9ef3c2
   endif()
9ef3c2
 
9ef3c2
   # Forcibly update the cache variables
9ef3c2
-  set(TBB_ROOT_DIR ${CMAKE_INSTALL_PREFIX} CACHE PATH "TBB root directory" FORCE)
9ef3c2
+#  set(TBB_ROOT_DIR ${CMAKE_INSTALL_PREFIX} CACHE PATH "TBB root directory" FORCE)
9ef3c2
+  set(TBB_ROOT_DIR "${CMAKE_BINARY_DIR}/tbb/install" CACHE PATH "TBB root directory" FORCE)
9ef3c2
   set(TBB_INCLUDE_DIRS ${TBB_ROOT_DIR}/include CACHE PATH "TBB include directory" FORCE)
9ef3c2
   set(TBB_LIBRARY_DIRS ${TBB_ROOT_DIR}/lib CACHE PATH "TBB library directory" FORCE)
9ef3c2
   set(TBB_DEFINITIONS "" CACHE STRING "TBB compiler definitions" FORCE)
9ef3c2
@@ -152,7 +153,7 @@
9ef3c2
   ExternalProject_Add(
9ef3c2
     TBB
9ef3c2
     PREFIX ${_tbb_prefix_dir}
9ef3c2
-    URL https://github.com/01org/tbb/archive/${_tbb_ver_major}_U${_tbb_ver_minor}.tar.gz
9ef3c2
+    URL /tmp/2018_U6.tar.gz
9ef3c2
     BUILD_IN_SOURCE 1
9ef3c2
     CONFIGURE_COMMAND ""
9ef3c2
     BUILD_COMMAND
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/Modules/DyninstSystemPaths.cmake.orig	2019-07-15 22:26:08.783921240 -0400
9ef3c2
+++ dyninst-12.1.0/cmake/Modules/DyninstSystemPaths.cmake	2019-07-18 13:53:48.726269387 -0400
9ef3c2
@@ -1,2 +1,3 @@
9ef3c2
 set(DYNINST_SYSTEM_INCLUDE_PATHS
9ef3c2
+    ${INCLUDE_INSTALL_DIR}
9ef3c2
     /usr/include
9ef3c2
@@ -11,2 +12,3 @@
9ef3c2
 set(DYNINST_SYSTEM_LIBRARY_PATHS
9ef3c2
+    ${LIB_INSTALL_DIR}
9ef3c2
     /usr/lib
9ef3c2
@@ -22,1 +24,4 @@
9ef3c2
     ENV PATH)
9ef3c2
+foreach(F ${DYNINST_SYSTEM_LIBRARY_PATHS})
9ef3c2
+  message("DYNINST_SYSTEM_LIBRARY_PATHS " ${F})
9ef3c2
+endforeach()
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/Modules/FindLibElf.cmake.orig	2019-05-16 14:40:05.000000000 -0400
9ef3c2
+++ dyninst-12.1.0/cmake/Modules/FindLibElf.cmake	2019-07-17 16:45:41.082644142 -0400
9ef3c2
@@ -45,5 +45,4 @@
9ef3c2
 find_library(LibElf_LIBRARIES
9ef3c2
-             NAMES libelf.so.1 libelf.so
9ef3c2
-             HINTS ${LibElf_ROOT_DIR}/lib ${LibElf_ROOT_DIR} ${LibElf_LIBRARYDIR}
9ef3c2
-             PATHS ${DYNINST_SYSTEM_LIBRARY_PATHS}
9ef3c2
+             NAMES libelf.so.dts.1 libelf.so.1 libelf.so 
9ef3c2
+             HINTS ${DYNINST_SYSTEM_LIBRARY_PATHS} ${LibElf_ROOT_DIR}/lib ${LibElf_ROOT_DIR} ${LibElf_LIBRARYDIR}
9ef3c2
              PATH_SUFFIXES ${_path_suffixes})
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/Modules/FindLibDwarf.cmake.orig	2019-05-16 14:40:05.000000000 -0400
9ef3c2
+++ dyninst-12.1.0/cmake/Modules/FindLibDwarf.cmake	2019-07-17 21:53:14.098297367 -0400
9ef3c2
@@ -42,6 +42,5 @@
9ef3c2
 find_library(LibDwarf_LIBRARIES
9ef3c2
-             NAMES libdw.so.1 libdw.so
9ef3c2
-             HINTS ${LibDwarf_ROOT_DIR}/lib ${LibDwarf_ROOT_DIR} ${LibDwarf_LIBRARYDIR}
9ef3c2
-             PATHS ${DYNINST_SYSTEM_LIBRARY_PATHS}
9ef3c2
+             NAMES libdw.so.dts.1 libdw.so.1 libdw.so 
9ef3c2
+             HINTS ${DYNINST_SYSTEM_LIBRARY_PATHS} ${LibDwarf_ROOT_DIR}/lib ${LibDwarf_ROOT_DIR} ${LibDwarf_LIBRARYDIR}
9ef3c2
              PATH_SUFFIXES ${_path_suffixes})
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/ThreadingBuildingBlocks.cmake.orig	2021-04-08 16:48:12.000000000 -0400
9ef3c2
+++ dyninst-12.1.0/cmake/ThreadingBuildingBlocks.cmake	2021-05-07 12:40:13.092183538 -0400
9ef3c2
@@ -52,3 +52,3 @@
9ef3c2
 else()
9ef3c2
-  set(_tbb_min_version 2018.6)
9ef3c2
+  set(_tbb_min_version 2018.0)
9ef3c2
 endif()
9ef3c2
9ef3c2
--- dyninst-12.1.0/common/CMakeLists.txt.orig	2022-03-09 17:41:45.000000000 -0500
9ef3c2
+++ dyninst-12.1.0/common/CMakeLists.txt	2022-05-06 15:50:58.664146983 -0400
9ef3c2
@@ -90,3 +90,3 @@ set (SRC_LIST ${SRC_LIST}
9ef3c2
 if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
9ef3c2
-    if (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^[789](\.|$)")
9ef3c2
+    if (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^[789](.|$)")
9ef3c2
 	# Disable var-tracking-assignments for arch-x86.C for gcc 7, 8, & 9.
9ef3c2
9ef3c2
--- dyninst-12.1.0/cmake/ElfUtils.cmake.orig	2022-03-09 17:41:45.000000000 -0500
9ef3c2
+++ dyninst-12.1.0/cmake/ElfUtils.cmake	2022-05-06 16:54:28.918892511 -0400
9ef3c2
@@ -40,3 +40,3 @@ endif()
9ef3c2
 # NB: We need >=0.186 because of NVIDIA line map extensions
9ef3c2
-set(_min_version 0.186)
9ef3c2
+set(_min_version 0.185)
9ef3c2