From 8c457d7d0fd265b7678bc3fc7aeb3206a676b2b7 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 12 Dec 2023 07:06:52 -0500 Subject: [PATCH] Added missing flag to build XRT Signed-off-by: root --- src/runtime_src/core/common/CMakeLists.txt | 2 +- .../core/pcie/driver/linux/xocl/userpf/xocl_bo.h | 2 +- src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h | 10 ++-------- src/runtime_src/core/pcie/linux/CMakeLists.txt | 1 + .../core/pcie/tools/cloud-daemon/CMakeLists.txt | 2 ++ .../core/pcie/tools/cloud-daemon/aws/CMakeLists.txt | 1 + src/runtime_src/tools/xclbinutil/CMakeLists.txt | 4 ++-- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/runtime_src/core/common/CMakeLists.txt b/src/runtime_src/core/common/CMakeLists.txt index 9b80ab1e44b..c7b8375fe93 100644 --- a/src/runtime_src/core/common/CMakeLists.txt +++ b/src/runtime_src/core/common/CMakeLists.txt @@ -87,7 +87,7 @@ target_link_libraries(xrt_coreutil_static if (NOT WIN32) # Additional link dependencies for xrt_coreutil # xrt_uuid.h depends on uuid - target_link_libraries(xrt_coreutil PRIVATE pthread dl PUBLIC uuid) + target_link_libraries(xrt_coreutil PRIVATE pthread dl PUBLIC uuid stdc++fs) # Targets of xrt_coreutil_static must link with these additional # system libraries diff --git a/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_bo.h b/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_bo.h index 4804d3b9150..7f2a1730f25 100644 --- a/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_bo.h +++ b/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_bo.h @@ -70,7 +70,7 @@ #define XOCL_BO_ARE (1 << 26) // Linux 5.18 uses iosys-map instead of dma-buf-map -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || defined(RHEL_8_7) || defined(RHEL_8_8) || defined(RHEL_8_9) || defined(RHEL_9_1_GE) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || defined(RHEL_8_7_GE) || defined(RHEL_9_1_GE) #define XOCL_MAP_TYPE iosys_map #define XOCL_MAP_SET_VADDR iosys_map_set_vaddr #define XOCL_MAP_IS_NULL iosys_map_is_null diff --git a/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h b/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h index 4f0792ccb41..f2bcbe2fb6f 100644 --- a/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h +++ b/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h @@ -178,14 +178,8 @@ #if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0) #define RHEL_9_0_GE #endif -#if RHEL_RELEASE_CODE == RHEL_RELEASE_VERSION(8, 9) -#define RHEL_8_9 -#endif -#if RHEL_RELEASE_CODE == RHEL_RELEASE_VERSION(8, 8) -#define RHEL_8_8 -#endif -#if RHEL_RELEASE_CODE == RHEL_RELEASE_VERSION(8, 7) -#define RHEL_8_7 +#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 7) +#define RHEL_8_7_GE #endif #if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 5) #define RHEL_8_5_GE diff --git a/src/runtime_src/core/pcie/linux/CMakeLists.txt b/src/runtime_src/core/pcie/linux/CMakeLists.txt index b98e457d9c1..eea8f1fbd4d 100644 --- a/src/runtime_src/core/pcie/linux/CMakeLists.txt +++ b/src/runtime_src/core/pcie/linux/CMakeLists.txt @@ -67,6 +67,7 @@ target_link_libraries(xrt_core_static dl rt pthread + stdc++fs ) install(TARGETS xrt_core diff --git a/src/runtime_src/core/pcie/tools/cloud-daemon/CMakeLists.txt b/src/runtime_src/core/pcie/tools/cloud-daemon/CMakeLists.txt index bff16523a17..c5ed99bd412 100644 --- a/src/runtime_src/core/pcie/tools/cloud-daemon/CMakeLists.txt +++ b/src/runtime_src/core/pcie/tools/cloud-daemon/CMakeLists.txt @@ -26,6 +26,7 @@ target_link_libraries(mpd uuid dl udev + stdc++fs ) install (TARGETS mpd RUNTIME DESTINATION ${XRT_INSTALL_DIR}/bin) @@ -49,6 +50,7 @@ target_link_libraries(msd ${Boost_SYSTEM_LIBRARY} uuid dl + stdc++fs ) install (TARGETS msd RUNTIME DESTINATION ${XRT_INSTALL_DIR}/bin) diff --git a/src/runtime_src/core/pcie/tools/cloud-daemon/aws/CMakeLists.txt b/src/runtime_src/core/pcie/tools/cloud-daemon/aws/CMakeLists.txt index 048cafb0587..2bad5ca434b 100644 --- a/src/runtime_src/core/pcie/tools/cloud-daemon/aws/CMakeLists.txt +++ b/src/runtime_src/core/pcie/tools/cloud-daemon/aws/CMakeLists.txt @@ -44,6 +44,7 @@ if(${INTERNAL_TESTING_FOR_AWS}) pthread rt dl + stdc++fs ) else() include_directories(${AWS_FPGA_REPO_DIR}/sdk/userspace/include/) # path to fpga_mgmt.h diff --git a/src/runtime_src/tools/xclbinutil/CMakeLists.txt b/src/runtime_src/tools/xclbinutil/CMakeLists.txt index 3de45f37247..5e0132999a1 100644 --- a/src/runtime_src/tools/xclbinutil/CMakeLists.txt +++ b/src/runtime_src/tools/xclbinutil/CMakeLists.txt @@ -76,7 +76,7 @@ add_executable(${XCLBINUTIL_NAME} ${XCLBINUTIL_SRCS}) # Signing xclbin images currently is not support on windows if(NOT WIN32) - target_link_libraries(${XCLBINUTIL_NAME} PRIVATE crypto) + target_link_libraries(${XCLBINUTIL_NAME} PRIVATE crypto stdc++fs) endif() # Add compile definitions @@ -176,7 +176,7 @@ if (GTEST_FOUND) target_link_libraries(${UNIT_TEST_NAME} PRIVATE Boost::program_options Boost::system ) target_link_libraries(${UNIT_TEST_NAME} PRIVATE ${GTEST_BOTH_LIBRARIES}) else() - target_link_libraries(${UNIT_TEST_NAME} PRIVATE ${Boost_LIBRARIES} ${GTEST_BOTH_LIBRARIES} pthread crypto) + target_link_libraries(${UNIT_TEST_NAME} PRIVATE ${Boost_LIBRARIES} ${GTEST_BOTH_LIBRARIES} pthread crypto stdc++fs) if(NOT (${RapidJSON_VERSION_MAJOR} EQUAL 0)) target_compile_definitions(${UNIT_TEST_NAME} PRIVATE ENABLE_JSON_SCHEMA_VALIDATION)