From 85f9949bbc1edc26dd67fdd1cf99e2db20d99d84 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Fri, 24 Apr 2026 14:35:19 +0200 Subject: [PATCH] [Build] Remove deprecated `builtin_zeromq` and `builtin_cppzmq` options These build options were deprecated in ROOT 6.40 (see commit be642930240b5ac26cda6c35d3dcc61ac44606f6), and should be removed in the 6.42 development cycle. --- .../root-ci-config/buildconfig/global.txt | 2 - README/ReleaseNotes/v642/index.md | 1 + builtins/zeromq/cppzmq/CMakeLists.txt | 23 ------- builtins/zeromq/libzmq/CMakeLists.txt | 49 -------------- cmake/modules/RootBuildOptions.cmake | 8 +-- cmake/modules/SearchInstalledSoftware.cmake | 64 +------------------ 6 files changed, 5 insertions(+), 142 deletions(-) delete mode 100644 builtins/zeromq/cppzmq/CMakeLists.txt delete mode 100644 builtins/zeromq/libzmq/CMakeLists.txt diff --git a/.github/workflows/root-ci-config/buildconfig/global.txt b/.github/workflows/root-ci-config/buildconfig/global.txt index 18e484ba557e8..91b34924b26f0 100644 --- a/.github/workflows/root-ci-config/buildconfig/global.txt +++ b/.github/workflows/root-ci-config/buildconfig/global.txt @@ -6,7 +6,6 @@ asserts=OFF builtin_cfitsio=OFF builtin_clang=ON builtin_cling=ON -builtin_cppzmq=OFF builtin_fftw3=OFF builtin_freetype=OFF builtin_ftgl=OFF @@ -24,7 +23,6 @@ builtin_unuran=OFF builtin_vdt=OFF builtin_xrootd=OFF builtin_xxhash=OFF -builtin_zeromq=OFF builtin_zlib=OFF builtin_zstd=OFF ccache=ON diff --git a/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index fde7245cdb151..7cbfe52de3bda 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -42,6 +42,7 @@ The following people have contributed to this new version: * The method `RooRealVar::removeRange()` and the corresponding method in `RooErrorVar` that were deprecated in ROOT 6.40 are now removed. * The overloads of `RooAbsReal::createChi2()` and `RooAbsReal::chi2FitTo()` that take unbinned **RooDataSet** data objects were deprecated in ROOT 6.40 and are now removed. * The **RooStats::HybridPlot** class and the related **HybridResult::GetPlot** method were deprecated in ROOT 6.40 and are now removed. +* The `builtin_zeromq` and `builtin_cppzmq` build options that were deprecated in ROOT 6.40 are now removed. ## Python Interface diff --git a/builtins/zeromq/cppzmq/CMakeLists.txt b/builtins/zeromq/cppzmq/CMakeLists.txt deleted file mode 100644 index 4aa1240ce3edd..0000000000000 --- a/builtins/zeromq/cppzmq/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -include(ExternalProject) - -set(cppzmq_HEADER_PATH ${CMAKE_CURRENT_BINARY_DIR}/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq) - -set(cppzmq_version 4.10.0) -ExternalProject_Add(BUILTIN_cppzmq - URL ${lcgpackages}/cppzmq-${cppzmq_version}.tar.gz - URL_HASH SHA256=c81c81bba8a7644c84932225f018b5088743a22999c6d82a2b5f5cd1e6942b74 - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - DEPENDS libzmq - BUILD_BYPRODUCTS ${cppzmq_HEADER_PATH}/zmq.hpp -) - -# find_package emulation -set(cppzmq_FOUND TRUE CACHE BOOL "" FORCE) -set(cppzmq_INCLUDE_DIR ${cppzmq_HEADER_PATH} CACHE INTERNAL "" FORCE) -set(cppzmq_INCLUDE_DIRS ${cppzmq_INCLUDE_DIR} CACHE INTERNAL "" FORCE) - -add_library(cppzmq INTERFACE IMPORTED GLOBAL) -target_include_directories(cppzmq INTERFACE $) -add_dependencies(cppzmq BUILTIN_cppzmq) diff --git a/builtins/zeromq/libzmq/CMakeLists.txt b/builtins/zeromq/libzmq/CMakeLists.txt deleted file mode 100644 index 6e933c5d494ec..0000000000000 --- a/builtins/zeromq/libzmq/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -include(ExternalProject) - -set(ZeroMQ_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/BUILTIN_ZeroMQ-prefix) -set(ZeroMQ_LIBNAME ${CMAKE_STATIC_LIBRARY_PREFIX}zmq${CMAKE_STATIC_LIBRARY_SUFFIX}) - -set(ZeroMQ_LIBRARY ${ZeroMQ_PREFIX}/lib/${ZeroMQ_LIBNAME} CACHE INTERNAL "" FORCE) -set(ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY} CACHE INTERNAL "" FORCE) - -if(NOT WIN32) - # 2021-10-07: libzmq's minimum CMake version does not yet support CXX_VISIBILITY_PRESET, so we need to pass the flag manually - set(cxx_visibility_flag "-fvisibility=hidden") -else() - set(cxx_visibility_flag "") -endif() - -set(libzeromq_version 4.3.5) -ExternalProject_Add(BUILTIN_ZeroMQ - URL ${lcgpackages}/zeromq-${libzeromq_version}.tar.gz - URL_HASH SHA256=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43 - CMAKE_ARGS - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - -DCMAKE_INSTALL_PREFIX= - -DCMAKE_INSTALL_LIBDIR=lib - -DWITH_PERF_TOOL=OFF - -DBUILD_TESTS=OFF - -DENABLE_DRAFTS=ON - -DENABLE_NO_EXPORT=ON - -DENABLE_CURVE=OFF - -DWITH_DOCS=OFF - -DENABLE_WS=OFF - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -DCMAKE_CXX_FLAGS=${cxx_visibility_flag}\ ${CMAKE_CXX_FLAGS}\ -w - BUILD_BYPRODUCTS ${ZeroMQ_LIBRARIES} - ) - -set(ZeroMQ_FOUND TRUE CACHE BOOL "" FORCE) - -set(ZeroMQ_INCLUDE_DIR ${ZeroMQ_PREFIX}/include CACHE INTERNAL "" FORCE) -set(ZeroMQ_INCLUDE_DIRS ${ZeroMQ_PREFIX}/include CACHE INTERNAL "" FORCE) - -# Workaround to propagate INTERFACE_INCLUDE_DIRECTORIES, see https://stackoverflow.com/a/47358004/1199693 -file(MAKE_DIRECTORY ${ZeroMQ_INCLUDE_DIR}) - -add_library(libzmq INTERFACE IMPORTED GLOBAL) -target_include_directories(libzmq INTERFACE $) -target_link_libraries(libzmq INTERFACE $) -add_dependencies(libzmq BUILTIN_ZeroMQ) - -set(ZeroMQ_DIR ${ZeroMQ_PREFIX}/share/cmake/ZeroMQ CACHE INTERNAL "" FORCE) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 7562c6118c30e..f983c82a631e0 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -86,7 +86,6 @@ ROOT_BUILD_OPTION(builtin_clang ON "Build bundled copy of Clang") ROOT_BUILD_OPTION(builtin_cling ON "Build bundled copy of Cling. Only build with an external cling if you know what you are doing: associating ROOT commits with cling commits is tricky.") MARK_AS_ADVANCED(builtin_cling) ROOT_BUILD_OPTION(builtin_civetweb ON "Use civetweb distributed with ROOT") -ROOT_BUILD_OPTION(builtin_cppzmq OFF "Use ZeroMQ C++ bindings installed by ROOT (requires network)") ROOT_BUILD_OPTION(builtin_fftw3 OFF "Build FFTW3 internally (requires network) [GPL]") ROOT_BUILD_OPTION(builtin_freetype OFF "Build bundled copy of freetype") ROOT_BUILD_OPTION(builtin_ftgl OFF "Build bundled copy of FTGL") @@ -108,7 +107,6 @@ ROOT_BUILD_OPTION(builtin_unuran OFF "Build bundled copy of unuran [GPL]") ROOT_BUILD_OPTION(builtin_vdt OFF "Build VDT internally (requires network)") ROOT_BUILD_OPTION(builtin_xrootd OFF "Build XRootD internally (requires network)") ROOT_BUILD_OPTION(builtin_xxhash OFF "Build bundled copy of xxHash") -ROOT_BUILD_OPTION(builtin_zeromq OFF "Build ZeroMQ internally (requires network)") ROOT_BUILD_OPTION(builtin_zlib OFF "Build bundled copy of zlib") ROOT_BUILD_OPTION(builtin_zstd OFF "Build included libzstd, or use system libzstd") ROOT_BUILD_OPTION(ccache OFF "Enable ccache usage for speeding up builds") @@ -256,7 +254,6 @@ if(builtin_all) set(builtin_civetweb_defvalue ON) set(builtin_clang_defvalue ON) set(builtin_cling_defvalue ON) - set(builtin_cppzmq_defvalue ON) # set(builtin_fftw3_defvalue ON) (GPL) set(builtin_freetype_defvalue ON) set(builtin_ftgl_defvalue ON) @@ -280,7 +277,6 @@ if(builtin_all) set(builtin_vdt_defvalue ON) set(builtin_xrootd_defvalue ON) set(builtin_xxhash_defvalue ON) - set(builtin_zeromq_defvalue ON) set(builtin_zlib_defvalue ON) set(builtin_zstd_defvalue ON) endif() @@ -376,14 +372,14 @@ foreach(opt afdsmgrd afs alien bonjour builtin_afterimage builtin_davix castor c geocad gfal glite globus gsl_shared hdfs html ios jemalloc krb5 ldap memstat minuit2 monalisa oracle proof pyroot-python2 pyroot_legacy pythia6 pythia6_nolink python qt qtgsi qt5web rfio ruby sapdb srp table - tcmalloc vmc xproofd mysql odbc pgsql) + tcmalloc vmc xproofd mysql odbc pgsql builtin_cppzmq builtin_zeromq) if(${opt}) message(FATAL_ERROR ">>> '${opt}' is no longer part of ROOT ${ROOT_VERSION} build options.") endif() endforeach() #---Deprecated options------------------------------------------------------------------------ -foreach(opt builtin_cppzmq builtin_zeromq) +foreach(opt ) if(${opt}) message(DEPRECATION ">>> Option '${opt}' is deprecated and will be removed in the next release of ROOT. Please contact root-dev@cern.ch should you still need it.") endif() diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index f0eb9dfb4aada..142a5a1eed6ee 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -1404,14 +1404,7 @@ endif() #---Check for ZeroMQ when building RooFit::MultiProcess-------------------------------------------- if (roofit_multiprocess) - if(NOT builtin_zeromq) message(STATUS "Looking for ZeroMQ (libzmq)") - # Clear cache before calling find_package(ZeroMQ), - # necessary to be able to toggle builtin_zeromq and - # not have find_package(ZeroMQ) find builtin ZeroMQ. - foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS LIBRARY LIBRARIES) - unset(ZeroMQ_${suffix} CACHE) - endforeach() # Temporarily prefer config mode over module mode, so that a CMake-installed system version # gets detected before looking for an autotools-installed system version (which the @@ -1419,67 +1412,14 @@ if (roofit_multiprocess) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG_ORIGINAL_VALUE ${CMAKE_FIND_PACKAGE_PREFER_CONFIG}) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) - if(fail-on-missing) - find_package(ZeroMQ 4.3.5 REQUIRED) - else() - find_package(ZeroMQ 4.3.5) - if(NOT ZeroMQ_FOUND) - message(STATUS "ZeroMQ not found. Switching on builtin_zeromq option") - set(builtin_zeromq ON CACHE BOOL "Enabled because ZeroMQ not found (${builtin_zeromq_description})" FORCE) - # If the ZeroMQ system version is too old, we can't use the system C++ - # headers either (note that find_package(ZeroMQ) not only checks if the - # library exists, but also if it's a recent version with zmq_ppoll). - set(builtin_cppzmq ON CACHE BOOL "Enabled because ZeroMQ not found (${builtin_cppzmq_description})" FORCE) - endif() - endif() + find_package(ZeroMQ 4.3.5 REQUIRED) # Reset default find_package mode set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ${CMAKE_FIND_PACKAGE_PREFER_CONFIG_ORIGINAL_VALUE}) unset(CMAKE_FIND_PACKAGE_PREFER_CONFIG_ORIGINAL_VALUE) - endif() - - if(builtin_zeromq) - ROOT_CHECK_CONNECTION("builtin_zeromq=OFF") - if(NO_CONNECTION) - message(STATUS "No internet connection, disabling the `builtin_zeromq` and `roofit_multiprocess` options") - set(builtin_zeromq OFF CACHE BOOL "Disabled because there is no internet connection" FORCE) - set(roofit_multiprocess OFF CACHE BOOL "Disabled because there is no internet connection" FORCE) - else() - list(APPEND ROOT_BUILTINS ZeroMQ) - add_subdirectory(builtins/zeromq/libzmq) - endif() - endif() - if(NOT builtin_cppzmq) message(STATUS "Looking for ZeroMQ C++ bindings (cppzmq)") - # Clear cache before calling find_package(cppzmq), - # necessary to be able to toggle builtin_cppzmq and - # not have find_package(cppzmq) find builtin cppzmq. - foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS) - unset(cppzmq_${suffix} CACHE) - endforeach() - if(fail-on-missing) - find_package(cppzmq REQUIRED) - else() - find_package(cppzmq QUIET) - if(NOT cppzmq_FOUND) - message(STATUS "ZeroMQ C++ bindings not found. Switching on builtin_cppzmq option") - set(builtin_cppzmq ON CACHE BOOL "Enabled because ZeroMQ C++ bindings not found (${builtin_cppzmq_description})" FORCE) - endif() - endif() - endif() - - if(builtin_cppzmq) - ROOT_CHECK_CONNECTION("builtin_cppzmq=OFF") - if(NO_CONNECTION) - message(STATUS "No internet connection, disabling the `builtin_cppzmq` and `roofit_multiprocess` options") - set(builtin_cppzmq OFF CACHE BOOL "Disabled because there is no internet connection" FORCE) - set(roofit_multiprocess OFF CACHE BOOL "Disabled because there is no internet connection" FORCE) - else() - list(APPEND ROOT_BUILTINS cppzmq) - add_subdirectory(builtins/zeromq/cppzmq) - endif() - endif() + find_package(cppzmq REQUIRED) endif (roofit_multiprocess) #---Check for googletest---------------------------------------------------------------