Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DOCA builds on ARM64 #2127

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ add_custom_target(${PROJECT_NAME}_style_checks
COMMENT "Building dependencies for style checks"
)

# CMAKE_LIBRARY_ARCHITECTURE is needed to find DOCA dependencies
if(NOT DEFINED CMAKE_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}")
string(TOLOWER "${CMAKE_LIBRARY_ARCHITECTURE}" CMAKE_LIBRARY_ARCHITECTURE)
message(STATUS "Setting CMAKE_LIBRARY_ARCHITECTURE to ${CMAKE_LIBRARY_ARCHITECTURE}")
endif()

# Configure all dependencies
include(dependencies)

Expand Down
8 changes: 1 addition & 7 deletions ci/scripts/github/cmake_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ fi
export CMAKE_BUILD_ALL_FEATURES="${_FLAGS[@]}"
unset _FLAGS

if [[ ${REAL_ARCH} == "aarch64" ]]; then
# Currently DOCA is failing to build on ARM
# https://github.com/nv-morpheus/Morpheus/issues/2092
export MORPHEUS_SUPPORT_DOCA=OFF
fi

if [[ ${MORPHEUS_SUPPORT_DOCA} == @(TRUE|ON) && ${REAL_ARCH} == "x86_64" ]]; then
if [[ ${MORPHEUS_SUPPORT_DOCA} == @(TRUE|ON) ]]; then
export CMAKE_BUILD_ALL_FEATURES="${CMAKE_BUILD_ALL_FEATURES} -DMORPHEUS_SUPPORT_DOCA=ON"
fi
5 changes: 0 additions & 5 deletions cmake/package_search/Finddoca.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ block(SCOPE_FOR VARIABLES
set("CMAKE_FIND_ROOT_PATH_MODE_INCLUDE" BOTH)
set("CMAKE_FIND_ROOT_PATH_MODE_LIBRARY" BOTH)

# CMAKE_LIBRARY_ARCHITECTURE needs to be set for this to work correctly. Will be restored at the end of the block
if(NOT DEFINED CMAKE_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE x86_64-linux-gnu)
endif()

# Find the include path
find_path(
doca_INCLUDE_DIR doca_gpunetio.h
Expand Down
7 changes: 1 addition & 6 deletions cmake/package_search/Findlibdpdk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ block(SCOPE_FOR VARIABLES
# List of required args. Start with INCLUDE_DIR since the first one is displayed
list(APPEND libdpdk_REQUIRED_VARS bsd_FOUND libdpdk_INCLUDE_DIR)

# CMAKE_LIBRARY_ARCHITECTURE needs to be set for this to work correctly. Will be restored at the end of the block
if(NOT DEFINED CMAKE_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE x86_64-linux-gnu)
endif()

# This library will always be installed on the host. Allow that to be searched here (Should fix this up in the future)
set("CMAKE_FIND_ROOT_PATH_MODE_INCLUDE" BOTH)
set("CMAKE_FIND_ROOT_PATH_MODE_LIBRARY" BOTH)
Expand Down Expand Up @@ -76,7 +71,7 @@ block(SCOPE_FOR VARIABLES
set_target_properties(${library_name} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${${library_name}_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${libdpdk_INCLUDE_DIR};${libdpdk_INCLUDE_DIR}/../x86_64-linux-gnu/dpdk"
INTERFACE_INCLUDE_DIRECTORIES "${libdpdk_INCLUDE_DIR};${libdpdk_INCLUDE_DIR}/../${CMAKE_LIBRARY_ARCHITECTURE}/dpdk"
INTERFACE_LINK_LIBRARIES "bsd::bsd"
)

Expand Down
Loading