Skip to content

Commit

Permalink
Merge 'build: finalize numactl dependency removal' from Kefu Chai
Browse files Browse the repository at this point in the history
Following 8ab0267, which dropped the build dependency on numactl, this commit removes all remaining references from the build system. This includes cleaning up template files (.pc.in and .cmake.in) that still contained unnecessary numactl references.

Changes:
- Remove Findnumactl.cmake since it's no longer needed at configuration time
- Remove numactl::numactl library linking as we no longer need its headers or libraries
- Remove unused Seastar_NUMA CMake option
- Remove numactl from SeastarDependencies.cmake

This completes the work started in 8ab0267 and ensures Seastar applications no longer pull in numactl's cflags or libraries during the build process.

Closes #2648

* github.com:scylladb/seastar:
  build: finalize numactl dependency removal
  build: link DPDK against libnuma when detected during build
  • Loading branch information
avikivity committed Feb 18, 2025
2 parents 652dc71 + f62d1c7 commit b9a666e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 76 deletions.
12 changes: 0 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,6 @@ option (Seastar_INSTALL
"Install targets."
${Seastar_MASTER_PROJECT})

option (Seastar_NUMA
"Enable NUMA support."
ON)

option (Seastar_TESTING
"Enable testing targets."
${Seastar_MASTER_PROJECT})
Expand Down Expand Up @@ -1046,13 +1042,6 @@ if (Seastar_LD_FLAGS)
PRIVATE ${Seastar_LD_FLAGS})
endif ()

if (Seastar_NUMA)
list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_HAVE_NUMA)

target_link_libraries (seastar
PRIVATE numactl::numactl)
endif ()

if (SystemTap-SDT_FOUND)
list (APPEND Seastar_PRIVATE_COMPILE_DEFINITIONS SEASTAR_HAVE_SYSTEMTAP_SDT)

Expand Down Expand Up @@ -1407,7 +1396,6 @@ if (Seastar_INSTALL)
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findhwloc.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findlksctp-tools.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findlz4.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findnumactl.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findragel.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findrt.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Finducontext.cmake
Expand Down
16 changes: 10 additions & 6 deletions cmake/Finddpdk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,16 @@ find_package_handle_standard_args (dpdk
REQUIRED_VARS
${dpdk_REQUIRED})

# Depending on whether libbsd-dev exists at build time, DPDK may be built with a dependency on
# libbsd. Note that other libraries in dpdk_PC_LIBRARIES are handled using separate logic
# (see rte_libs above), thus the additional dependencies must be handled on a case by case basis.
if ("bsd" IN_LIST dpdk_PC_LIBRARIES)
list (APPEND dpdk_dependencies "bsd")
endif ()
# DPDK's build system adds certain dependencies conditionally based on what's available
# at build time. While most libraries from dpdk_PC_LIBRARIES are handled through the
# rte_libs logic elsewhere, external dependencies ('bsd' and 'numa' in this case) are
# explicitly handled below. This foreach loop checks if these specific libraries are
# present in dpdk_PC_LIBRARIES and adds them to the dpdk_dependencies list if found.
foreach (lib "bsd" "numa")
if (lib IN_LIST dpdk_PC_STATIC_LIBRARIES)
list (APPEND dpdk_dependencies ${lib})
endif()
endforeach ()

# As of DPDK 23.07, if libarchive-dev is present, it will make DPDK depend on the library.
# Unfortunately DPDK also has a bug in its .pc file generation and will not include libarchive
Expand Down
50 changes: 0 additions & 50 deletions cmake/Findnumactl.cmake

This file was deleted.

1 change: 0 additions & 1 deletion cmake/SeastarConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ include (SeastarDependencies)
set (Seastar_DPDK @Seastar_DPDK@)
set (Seastar_IO_URING @Seastar_IO_URING@)
set (Seastar_HWLOC @Seastar_HWLOC@)
set (Seastar_NUMA @Seastar_NUMA@)
seastar_find_dependencies ()

if (NOT TARGET Seastar::seastar)
Expand Down
3 changes: 0 additions & 3 deletions cmake/SeastarDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ macro (seastar_find_dependencies)
SystemTap-SDT
hwloc
lksctp-tools # No version information published.
numactl # No version information published.
rt
ucontext
yaml-cpp)
Expand Down Expand Up @@ -128,8 +127,6 @@ macro (seastar_find_dependencies)
OPTION ${Seastar_HWLOC})
seastar_set_dep_args (lksctp-tools REQUIRED)
seastar_set_dep_args (rt REQUIRED)
seastar_set_dep_args (numactl
OPTION ${Seastar_NUMA})
seastar_set_dep_args (ucontext REQUIRED)
seastar_set_dep_args (yaml-cpp REQUIRED
VERSION 0.5.1)
Expand Down
6 changes: 2 additions & 4 deletions pkgconfig/seastar.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ lksctp_tools_cflags=-I$<JOIN:@lksctp-tools_INCLUDE_DIRS@, -I>
lksctp_tools_libs=$<JOIN:@lksctp-tools_LIBRARIES@, >
liburing_cflags=$<$<BOOL:@Seastar_IO_URING@>:-I$<JOIN:$<TARGET_PROPERTY:URING::uring,INTERFACE_INCLUDE_DIRECTORIES>, -I>>
liburing_libs=$<$<BOOL:@Seastar_IO_URING@>:$<JOIN:@URING_LIBRARIES@, >>
numactl_cflags=-I$<JOIN:@numactl_INCLUDE_DIRS@, -I>
numactl_libs=$<JOIN:@numactl_LIBRARIES@, >
dpdk_libs=$<JOIN:@dpdk_LIBRARIES@, >
# Us.
seastar_cflags=${seastar_include_flags} $<JOIN:$<TARGET_PROPERTY:seastar,INTERFACE_COMPILE_OPTIONS>, > -D$<JOIN:$<TARGET_PROPERTY:seastar,INTERFACE_COMPILE_DEFINITIONS>, -D>
Expand All @@ -38,6 +36,6 @@ seastar_libs=${libdir}/$<TARGET_FILE_NAME:seastar> @Seastar_SPLIT_DWARF_FLAG@ $<
Requires: liblz4 >= 1.7.3
Requires.private: gnutls >= 3.2.26, protobuf >= 2.5.0, hwloc >= 1.11.2, $<$<BOOL:@Seastar_IO_URING@>:liburing $<ANGLE-R>= 2.0, >yaml-cpp >= 0.5.1
Conflicts:
Cflags: @Seastar_CXX_COMPILE_OPTION@ ${boost_cflags} ${c_ares_cflags} ${fmt_cflags} ${liburing_cflags} ${lksctp_tools_cflags} ${numactl_cflags} ${seastar_cflags}
Cflags: @Seastar_CXX_COMPILE_OPTION@ ${boost_cflags} ${c_ares_cflags} ${fmt_cflags} ${liburing_cflags} ${lksctp_tools_cflags} ${seastar_cflags}
Libs: ${seastar_libs} ${boost_program_options_libs} ${boost_thread_libs} ${c_ares_libs} ${fmt_libs}
Libs.private: ${dl_libs} ${rt_libs} ${boost_thread_libs} ${lksctp_tools_libs} ${liburing_libs} ${numactl_libs} ${stdatomic_libs} ${dpdk_libs}
Libs.private: ${dl_libs} ${rt_libs} ${boost_thread_libs} ${lksctp_tools_libs} ${liburing_libs} ${stdatomic_libs} ${dpdk_libs}

0 comments on commit b9a666e

Please sign in to comment.