From 6492856a2073d3d836338ca917271e54c8e20b78 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 18 May 2026 16:27:37 +0200 Subject: [PATCH 1/2] [cmake] error out if ZeroMQ has no draft api support Fixes https://github.com/root-project/root/issues/22300 --- cmake/modules/FindZeroMQ.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cmake/modules/FindZeroMQ.cmake b/cmake/modules/FindZeroMQ.cmake index 6075e5047596b..e8c2889962e3b 100644 --- a/cmake/modules/FindZeroMQ.cmake +++ b/cmake/modules/FindZeroMQ.cmake @@ -37,6 +37,21 @@ find_library(ZeroMQ_LIBRARY set ( ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY} ) set ( ZeroMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR} ) +# check for zmq_ppoll +if(ZeroMQ_LIBRARIES) + include(CheckCXXSymbolExists) + set(CMAKE_REQUIRED_LIBRARIES ${ZeroMQ_LIBRARIES}) + set(CMAKE_REQUIRED_INCLUDES ${ZeroMQ_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_DEFINITIONS "-DZMQ_BUILD_DRAFT_API") + check_cxx_symbol_exists(zmq_ppoll zmq.h ZeroMQ_HAS_PPOLL) + if(NOT ZeroMQ_HAS_PPOLL) + message(SEND_ERROR "ZeroMQ library was compiled without draft API support (-DENABLE_DRAFTS).") + endif() + unset(CMAKE_REQUIRED_LIBRARIES) + unset(CMAKE_REQUIRED_INCLUDES) + unset(CMAKE_REQUIRED_DEFINITIONS) +endif() + include ( FindPackageHandleStandardArgs ) # handle the QUIETLY and REQUIRED arguments and set ZeroMQ_FOUND to TRUE # if all listed variables are TRUE From e28b80ef7f011c90cfd5ac16d89e9afb6fc2b1e1 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 18 May 2026 16:30:28 +0200 Subject: [PATCH 2/2] [cmake] fix typo in zmq version --- cmake/modules/RootBuildOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index f4bb748557412..59f0fded3cd5c 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -150,7 +150,7 @@ ROOT_BUILD_OPTION(pythia8 OFF "Enable support for Pythia 8.x [GPL]") ROOT_BUILD_OPTION(qt6web OFF "Enable support for Qt6 web-based display (requires Qt6::WebEngineCore and Qt6::WebEngineWidgets)") ROOT_BUILD_OPTION(r OFF "Enable support for R bindings (requires R, Rcpp, and RInside)") ROOT_BUILD_OPTION(roofit ON "Build the advanced fitting package RooFit, and RooStats for statistical tests. If xml is available, also build HistFactory.") -ROOT_BUILD_OPTION(roofit_multiprocess OFF "Build RooFit::MultiProcess and multi-process RooFit::TestStatistics classes (requires ZeroMQ >= 3.4.5 built with -DENABLE_DRAFTS and cppzmq).") +ROOT_BUILD_OPTION(roofit_multiprocess OFF "Build RooFit::MultiProcess and multi-process RooFit::TestStatistics classes (requires ZeroMQ >= 4.3.5 built with -DENABLE_DRAFTS and cppzmq).") ROOT_BUILD_OPTION(root7 ON "Build ROOT 7 experimental components of ROOT") ROOT_BUILD_OPTION(runtime_cxxmodules ON "Enable runtime support for C++ modules") ROOT_BUILD_OPTION(shadowpw OFF "Enable support for shadow passwords")