Skip to content

Commit

Permalink
Remove leftover link dependencies on boost (#8176)
Browse files Browse the repository at this point in the history
* Remove link dependencies on boost

Stray links were left even after we replace boost::filesystem with
std::filesystem, these are now removed in this PR.

xbutil2 and xbmgmt2 depend on legacy boost::process which in turn
requires boost::fielsystem, so these tools still explicitly link with
boost.

Signed-off-by: Soren Soe <[email protected]>

* Add back boost_system for hw_emu.so

Apparently there is some boost dependency even for header only
libraries that end up requiring link with boost::system.  This
triggers compile error with older version of boost (1.53 , centos7.8)
so for time being allow hw_emu.so to link with boost_system

Signed-off-by: Soren Soe <[email protected]>

---------

Signed-off-by: Soren Soe <[email protected]>
  • Loading branch information
stsoe authored May 17, 2024
1 parent d6104b2 commit bd853bb
Show file tree
Hide file tree
Showing 16 changed files with 1 addition and 47 deletions.
16 changes: 0 additions & 16 deletions src/runtime_src/core/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,6 @@ set_target_properties(xrt_coreutil PROPERTIES
SOVERSION ${XRT_SOVERSION}
)

# Private dependencies for fully resolved dynamic xrt_coreutil
target_link_libraries(xrt_coreutil
PRIVATE
${Boost_SYSTEM_LIBRARY}
)

# Targets linking with xrt_coreutil_static must also link with boost
# libraries used by coreutil. These type of link dependencies are
# known as INTERFACE dependencies. Here the libraries are specified
# by their system name so that static of target can pick static link
# libraries of boost
target_link_libraries(xrt_coreutil_static
INTERFACE
boost_system
)

if (NOT WIN32)
# Additional link dependencies for xrt_coreutil
# xrt_uuid.h depends on uuid
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/edge/common_em/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${PROTO_SRC_FILES})

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${BOOST_SYSTEM_INCLUDE_DIRS}
)

add_custom_target(edge_emulation_generated_code DEPENDS ${ProtoSources} ${ProtoHeaders})
Expand Down Expand Up @@ -48,7 +47,6 @@ set_target_properties(common_em PROPERTIES VERSION ${XRT_VERSION_STRING}

target_link_libraries(common_em
PRIVATE
${Boost_SYSTEM_LIBRARY}
${PROTOBUF_LIBRARY}
xrt_coreutil
dl
Expand Down
3 changes: 0 additions & 3 deletions src/runtime_src/core/edge/hw_emu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ include_directories(
${EM_SRC_DIR}
${DRM_INCLUDE_DIRS}
${COMMON_EM_SRC_DIR}
${BOOST_SYSTEM_INCLUDE_DIRS}
${CMAKE_BINARY_DIR} # includes version.h
)

Expand Down Expand Up @@ -83,7 +82,6 @@ if (DEFINED XRT_AIE_BUILD)
rt
dl
uuid
${Boost_SYSTEM_LIBRARY}
xaiengine
)
else()
Expand All @@ -94,7 +92,6 @@ else()
rt
dl
uuid
${Boost_SYSTEM_LIBRARY}
)
endif()

Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/edge/skd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pkg_check_modules(LIBFFI REQUIRED libffi)
find_package(libffi REQUIRED)

include_directories(
${BOOST_SYSTEM_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../include
${LIBFFI_INCLUDE_DIR}
Expand All @@ -31,7 +30,6 @@ add_dependencies(skd

target_link_libraries(skd
PRIVATE
${Boost_SYSTEM_LIBRARY}
xrt_core
xrt_coreutil
dl
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/edge/sw_emu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ include_directories(
${COMMON_SRC_DIR}
${COMMON_EM_SRC_DIR}
${COMMON_EM_GEN_DIR}
${BOOST_SYSTEM_INCLUDE_DIRS}
)


Expand Down Expand Up @@ -48,7 +47,6 @@ set_target_properties(xrt_swemu PROPERTIES VERSION ${XRT_VERSION_STRING}

target_link_libraries(xrt_swemu
PRIVATE
${Boost_SYSTEM_LIBRARY}
${PROTOBUF_LIBRARY}
xrt_coreutil
common_em
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/edge/user/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ if (DEFINED XRT_AIE_BUILD)
rt
dl
uuid
${Boost_SYSTEM_LIBRARY}
xaiengine
)
else()
Expand All @@ -84,7 +83,6 @@ else()
rt
dl
uuid
${Boost_SYSTEM_LIBRARY}
)

endif()
Expand Down
5 changes: 1 addition & 4 deletions src/runtime_src/core/edge/user/system_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,8 @@ get_total_devices(bool is_user) const

void
system_linux::
scan_devices(bool verbose, bool json) const
scan_devices(bool /*verbose*/, bool /*json*/) const
{
std::cout << "TO-DO: scan_devices\n";
verbose = verbose;
json = json;
}

std::shared_ptr<device>
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/pcie/emulation/common_em/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${PROTO_SRC_FILES})

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${BOOST_SYSTEM_INCLUDE_DIRS}
)

add_custom_target(pcie_emulation_generated_code DEPENDS ${ProtoSources} ${ProtoHeaders})
Expand All @@ -41,7 +40,6 @@ set_target_properties(common_em PROPERTIES VERSION ${XRT_VERSION_STRING}

target_link_libraries(common_em
PRIVATE
${Boost_SYSTEM_LIBRARY}
${PROTOBUF_LIBRARY}
xrt_coreutil
dl
Expand Down
1 change: 0 additions & 1 deletion src/runtime_src/core/pcie/emulation/hw_emu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ include_directories(
${EM_SRC_DIR}
${COMMON_EM_SRC_DIR}
${COMMON_EM_GEN_DIR}
${BOOST_SYSTEM_INCLUDE_DIRS}
)

file(GLOB EM_SRC_FILES
Expand Down
3 changes: 0 additions & 3 deletions src/runtime_src/core/pcie/emulation/sw_emu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ include_directories(
${EM_SRC_DIR}
${COMMON_EM_SRC_DIR}
${COMMON_EM_GEN_DIR}
${BOOST_SYSTEM_INCLUDE_DIRS}
)

file(GLOB EM_SRC_FILES
Expand Down Expand Up @@ -41,7 +40,6 @@ set_target_properties(xrt_swemu PROPERTIES VERSION ${XRT_VERSION_STRING}

target_link_libraries(xrt_swemu
PRIVATE
${Boost_SYSTEM_LIBRARY}
${PROTOBUF_LIBRARY}
xrt_coreutil
common_em
Expand All @@ -51,7 +49,6 @@ target_link_libraries(xrt_swemu

target_link_libraries(xrt_swemu_static
INTERFACE
boost_system
${PROTOBUF_LIBRARY}
xrt_coreutil_static
rt
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/pcie/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ set_target_properties(xrt_core PROPERTIES
target_link_libraries(xrt_core
PRIVATE
xrt_coreutil
${Boost_SYSTEM_LIBRARY}
pthread
rt
dl
Expand All @@ -62,7 +61,6 @@ target_link_libraries(xrt_core
target_link_libraries(xrt_core_static
INTERFACE
xrt_coreutil_static
boost_system
uuid
dl
rt
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/core/pcie/tools/cloud-daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ target_link_libraries(mpd
xrt_core_static
xrt_coreutil_static
pthread
${Boost_SYSTEM_LIBRARY}
uuid
dl
udev
Expand All @@ -46,7 +45,6 @@ target_link_libraries(msd
xrt_core_static
xrt_coreutil_static
pthread
${Boost_SYSTEM_LIBRARY}
uuid
dl
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ if(${INTERNAL_TESTING_FOR_AWS})
xrt_core_static
xrt_coreutil_static
uuid
${Boost_SYSTEM_LIBRARY}
pthread
rt
dl
Expand All @@ -54,7 +53,6 @@ else()
xrt_core_static
xrt_coreutil_static
uuid
${Boost_SYSTEM_LIBRARY}
pthread
rt
dl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ target_link_libraries(azure_mpd_plugin
xrt_core_static
xrt_coreutil_static
uuid
${Boost_SYSTEM_LIBRARY}
pthread
rt
dl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ target_link_libraries(container_mpd_plugin
xrt_core_static
xrt_coreutil_static
uuid
${Boost_SYSTEM_LIBRARY}
pthread
rt
crypto
Expand Down
2 changes: 0 additions & 2 deletions src/runtime_src/xocl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ target_link_libraries(xilinxopencl
PRIVATE
xrt++
xrt_coreutil
${Boost_SYSTEM_LIBRARY}
)

else ()
Expand All @@ -82,7 +81,6 @@ target_link_libraries(xilinxopencl
PRIVATE
xrt++
xrt_coreutil
${Boost_SYSTEM_LIBRARY}
dl
pthread
crypt
Expand Down

0 comments on commit bd853bb

Please sign in to comment.