Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/root-ci-config/buildconfig/alma10.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
builtin_civetweb=ON
builtin_vdt=ON
pythia8=ON
symlink_libs=OFF
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ def activate(self):
self.active = True
if self.firstActivation:
if platform.system() == "Windows":
dlOpenRint = 'gInterpreter->LoadFile("libRint.dll");'
dlOpenRint = 'gInterpreter->LoadFile("libROOTRint.dll");'
else:
utils.declareCppCode('#include "dlfcn.h"')
dlOpenRint = 'dlopen("libRint.so",RTLD_NOW);'
dlOpenRint = 'dlopen("libROOTRint.so",RTLD_NOW);'
utils.processCppCode(dlOpenRint)
utils.declareCppCode(_TTabComHookCode)
self.hook = ROOT._TTabComHook
Expand Down
1 change: 1 addition & 0 deletions cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ ROOT_BUILD_OPTION(soversion OFF "Set version number in sonames for shared librar
ROOT_BUILD_OPTION(spectrum ON "Enable support for TSpectrum")
ROOT_BUILD_OPTION(sqlite ON "Enable support for SQLite")
ROOT_BUILD_OPTION(ssl ON "Enable support for SSL encryption via OpenSSL")
ROOT_BUILD_OPTION(symlink_libs ON "Build backward compatibility symlinks for historical libnames (eg. point libCore.so to libROOTCore.so).")
ROOT_BUILD_OPTION(test_distrdf_dask OFF "Enable distributed RDataFrame tests that use dask")
ROOT_BUILD_OPTION(test_distrdf_pyspark OFF "Enable distributed RDataFrame tests that use pyspark")
ROOT_BUILD_OPTION(testsupport OFF "Build the ROOT::TestSupport library required to use all features of ROOT_ADD_GTEST and similar macros (requires gtest at build time)")
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/RootConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ else()
${CMAKE_BINARY_DIR}/ginclude/compiledata.h "${CMAKE_CXX_COMPILER}"
"${CMAKE_CXX_FLAGS_RELEASE}" "${CMAKE_CXX_FLAGS_DEBUG}" "${CMAKE_CXX_ACLIC_FLAGS}"
"${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}" "${CMAKE_EXE_LINKER_FLAGS}" "so"
"${libdir}" "-lCore" "-lRint" "" "" "${ROOT_ARCHITECTURE}" "${ROOTBUILD}"
"${libdir}" "-lCore" "-lROOTRint" "" "" "${ROOT_ARCHITECTURE}" "${ROOTBUILD}"
"${local_ROOT_COMPILEDATA_IGNORE_BUILD_NODE_CHANGES}")
endif()

Expand Down
73 changes: 67 additions & 6 deletions cmake/modules/RootMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
set(pcm_name ${library_output_dir}/${libprefix}${library_output_name}_${dictionary}_rdict.pcm)
set(rootmap_name ${library_output_dir}/${libprefix}${library_output_name}32.rootmap)
else()
set(cpp_module ${library_target_name})
set(cpp_module ${library_output_name})
endif(ARG_MULTIDICT)

if(runtime_cxxmodules)
Expand All @@ -607,7 +607,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
unset(cpp_module)
unset(cpp_module_file)
else()
list(APPEND local_modules_idx_deps ${cpp_module})
list(APPEND local_modules_idx_deps ${library_target_name})
set_property(GLOBAL PROPERTY modules_idx_deps_property "${local_modules_idx_deps}")
endif(ARG_NO_CXXMODULE)

Expand All @@ -628,9 +628,20 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
# dependency below are independent of configuration order and expand to
# nothing for a dictionary-less library.
set(dep_has_dict "$<TARGET_EXISTS:G__${dep}>")
set(dependent_pcm ${libprefix}${dep}_rdict.pcm)

# Determine the true output library name if the target defines an OUTPUT_NAME property
if(TARGET ${dep})
get_target_property(dep_out_name ${dep} OUTPUT_NAME)
if(NOT dep_out_name)
set(dep_out_name ${dep})
endif()
else()
set(dep_out_name ${dep})
endif()

set(dependent_pcm ${libprefix}${dep_out_name}_rdict.pcm)
if (runtime_cxxmodules AND NOT dep IN_LIST local_no_cxxmodules)
set(dependent_pcm ${dep}.pcm)
set(dependent_pcm ${dep_out_name}.pcm)
list(APPEND pcm_dependencies "$<${dep_has_dict}:$<TARGET_PROPERTY:${dep},ROOT_PCM_FILENAME>>")
endif()
set(newargs ${newargs} "$<${dep_has_dict}:-m>" "$<${dep_has_dict}:${dependent_pcm}>")
Expand Down Expand Up @@ -1339,7 +1350,7 @@ macro(ROOT_CREATE_HEADER_COPY_TARGETS)
endmacro()

#---------------------------------------------------------------------------------------------------
#---ROOT_STANDARD_LIBRARY_PACKAGE(libname
#---ROOT_STANDARD_LIBRARY_PACKAGE(libname : the name of the CMake target. If OUTPUT_NAME not specified, will be also name on disk eg lib${libname}.so.
# [NO_INSTALL_HEADERS] : don't install headers for this package
# [NO_GLOB_HEADERS] : don't glob for headers, only install listed ones
# [STAGE1] : use rootcling_stage1 for generating
Expand All @@ -1351,6 +1362,9 @@ endmacro()
# [OBJECT_LIBRARY] : use ROOT_OBJECT_LIBRARY to generate object files
# and then use those for linking.
# LIBRARIES lib1 lib2 : private arguments for target_link_library()
# OUTPUT_NAME outname : if specified, outname is the name of the lib when written do disk (eg "ROOTCore" so that libROOTCore.so is installed). If not set, libname will be used.
# EXPORT_NAME exportname : if specified, exportname is the name of the CMake target when downstream projects find_package(ROOT) and want to
# link against it. For example "Core" so that ROOT::Core can be linked against. If not set, libname will be used.
# DEPENDENCIES lib1 lib2 : PUBLIC arguments for target_link_library() such as Core, MathCore
# BUILTINS builtin1 builtin2 : builtins like xxhash
# LINKDEF LinkDef.h : linkdef file, default value is "LinkDef.h"
Expand All @@ -1361,7 +1375,7 @@ endmacro()
#---------------------------------------------------------------------------------------------------
function(ROOT_STANDARD_LIBRARY_PACKAGE libname)
set(options NO_INSTALL_HEADERS NO_GLOB_HEADERS STAGE1 NO_HEADERS NO_SOURCES OBJECT_LIBRARY NO_CXXMODULE)
set(oneValueArgs LINKDEF)
set(oneValueArgs LINKDEF OUTPUT_NAME EXPORT_NAME)
set(multiValueArgs DEPENDENCIES HEADERS NODEPHEADERS SOURCES BUILTINS LIBRARIES DICTIONARY_OPTIONS INSTALL_OPTIONS)
CMAKE_PARSE_ARGUMENTS(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

Expand Down Expand Up @@ -1445,6 +1459,18 @@ function(ROOT_STANDARD_LIBRARY_PACKAGE libname)
"dictionary will be empty. Consider using ROOT_LINKER_LIBRARY instead.")
endif()


if (ARG_OUTPUT_NAME)
# this must go before ROOT_GENERATE_DICTIONARY since that function depends on OUTPUT_NAME target property
set_target_properties(${libname} PROPERTIES OUTPUT_NAME ${ARG_OUTPUT_NAME})
if (NOT ARG_OUTPUT_NAME STREQUAL "${libname}")
ROOT_SYMLINK_LIBRARY_NAME(${libname} ${ARG_OUTPUT_NAME} ${libname}) # historicalname matches libname
endif()
endif()
if (ARG_EXPORT_NAME)
set_target_properties(${libname} PROPERTIES EXPORT_NAME ${ARG_EXPORT_NAME})
endif()

ROOT_GENERATE_DICTIONARY(G__${libname} ${ARG_HEADERS}
${NO_CXXMODULE_FLAG}
${STAGE1_FLAG}
Expand Down Expand Up @@ -1472,6 +1498,7 @@ function(ROOT_STANDARD_LIBRARY_PACKAGE libname)
ROOT_INSTALL_HEADERS(${ARG_INSTALL_OPTIONS})
endif()
endif()

endfunction()

#---------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -3704,3 +3731,37 @@ function (ROOT_GET_CLANG_LIBRARIES clang_libraries)
endforeach(extra_lib)
SET(${clang_libraries} "${found_libraries}" PARENT_SCOPE)
endfunction(ROOT_GET_CLANG_LIBRARIES)

#---------------------------------------------------------------------------------------------------
# ROOT_SYMLINK_LIBRARY_NAME( tgt outputname historicalname )
#
# This function is used when the output name of a target, for example libROOTCore for the
# ROOT::Core target does not match the CMake target name: for backward compatibility,
# it creates a symlink to old historical name, if ROOT built with -Dsymlink_libs=ON (default)
# tgt: the CMake target, for example "Core"
# outputname: the name of the lib when written do disk (eg "ROOTCore" so that libROOTCore.so is installed)
# historicalname: the output-name of the lib being written to disk in CMake target historically.
# Usually, this name was just the name of the CMake target since no separate outputname was set.
#---------------------------------------------------------------------------------------------------
function (ROOT_SYMLINK_LIBRARY_NAME tgt outputname historicalname)
if (symlink_libs)
get_target_property(target_type ${tgt} TYPE)
if(NOT target_type STREQUAL "INTERFACE_LIBRARY")
add_custom_command(TARGET ${tgt} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:${tgt}> ${LIB_PREFIX}${historicalname}${LIB_SUFFIX}
WORKING_DIRECTORY $<TARGET_FILE_DIR:${tgt}>
COMMENT "Creating bw-compatibility symlink for target ${tgt}: ${LIB_PREFIX}${historicalname}${LIB_SUFFIX} -> $<TARGET_FILE_NAME:${tgt}>"
)
install(CODE "
set(LIB_DIR \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\")
set(NEW_NAME \"${CMAKE_SHARED_LIBRARY_PREFIX}${outputname}${CMAKE_SHARED_LIBRARY_SUFFIX}\")
set(OLD_NAME \"${CMAKE_SHARED_LIBRARY_PREFIX}${historicalname}${CMAKE_SHARED_LIBRARY_SUFFIX}\")
message(STATUS \"Creating symlink for target ${tgt}: \${OLD_NAME} -> \${NEW_NAME}\")
execute_process(
COMMAND \${CMAKE_COMMAND} -E create_symlink \${NEW_NAME} \${OLD_NAME}
WORKING_DIRECTORY \${LIB_DIR}
)
")
endif()
endif()
endfunction(ROOT_SYMLINK_LIBRARY_NAME)
2 changes: 1 addition & 1 deletion config/root-config.bat.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ set cxxflags=!cxxflags:-FIsehmap.h=-FI"sehmap.h"!

set rootglibs=libGui.lib
set rootevelibs=libEve.lib libEG.lib libGeom.lib libGed.lib libRGL.lib
set rootlibs=libCore.lib libImt.lib libRIO.lib libNet.lib libHist.lib libGraf.lib libGraf3d.lib libGpad.lib libROOTVecOps.lib libTree.lib libTreePlayer.lib libRint.lib libPostscript.lib libMatrix.lib libPhysics.lib libMathCore.lib libThread.lib
set rootlibs=libCore.lib libImt.lib libRIO.lib libNet.lib libHist.lib libGraf.lib libGraf3d.lib libGpad.lib libROOTVecOps.lib libTree.lib libTreePlayer.lib libROOTRint.lib libPostscript.lib libMatrix.lib libPhysics.lib libMathCore.lib libThread.lib

set out=
set err=0
Expand Down
2 changes: 1 addition & 1 deletion config/root-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ newlib="-lNew"
rootglibs="-lGui"
rootevelibs="-lEve -lEG -lGeom -lGed -lRGL"
rootlibs="-lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lROOTVecOps -lTree -lTreePlayer\
-lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lROOTNTuple -lROOTNTupleUtil"
-lROOTRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lROOTNTuple -lROOTNTupleUtil"

# MultiProc is not supported on Windows
if test "$platform" != "win32"; then
Expand Down
2 changes: 1 addition & 1 deletion core/README
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ libThread depends on libCore and contains:
libNew depends on libCore and contains:
- newdelete

libRint depends on libCore and contains:
libROOTRint depends on libCore and contains:
- rint

libMultiProc depends on explicitly on libCore, libNet, libTreePlayer and
Expand Down
2 changes: 1 addition & 1 deletion core/base/src/TROOT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ namespace Internal {
//
// The order of loading for is:
// libCore.so
// libRint.so
// libROOTRint.so
// ... anything other library hard linked to the executable ...
// ... for example libEvent
// libCling.so
Expand Down
2 changes: 1 addition & 1 deletion core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ bool TCling::RegisterPrebuiltModulePath(const std::string &FullPath,
////////////////////////////////////////////////////////////////////////////////
/// List of dicts that have the PCM information already in the PCH.
static const std::unordered_set<std::string> gIgnoredPCMNames = {"libCore",
"libRint",
"libROOTRint",
"libThread",
"libRIO",
"libImt",
Expand Down
5 changes: 4 additions & 1 deletion core/rint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ ROOT_STANDARD_LIBRARY_PACKAGE(Rint
SOURCES
src/TRint.cxx
src/TTabCom.cxx
OUTPUT_NAME
ROOTRint
EXPORT_NAME
Rint
DICTIONARY_OPTIONS
-writeEmptyRootPCM
DEPENDENCIES
Core
)

target_include_directories(Core PRIVATE inc)

ROOT_ADD_TEST_SUBDIRECTORY(test)
2 changes: 1 addition & 1 deletion roottest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if(MSVC)
if(CMAKE_GENERATOR MATCHES Ninja)
set(ROOT_LIBRARIES Core RIO Net Hist Gpad Graf Tree Rint Matrix MathCore)
else()
set(ROOT_LIBRARIES libCore libRIO libNet libHist libGpad libGraf libTree libRint libMatrix libMathCore)
set(ROOT_LIBRARIES libCore libRIO libNet libHist libGpad libGraf libTree libROOTRint libMatrix libMathCore)
endif()
else()
# We can not use CMAKE_SHARED_LIBRARY_SUFFIX as on macos it uses the standard dylib rather than the .so
Expand Down
2 changes: 1 addition & 1 deletion roottest/root/rint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if (NOT MSVC)
# ROOT-5843
ROOTTEST_ADD_TEST(dotLibraries
COMMAND $<TARGET_FILE:root> -b -q -e ".libraries"
PASSREGEX "libRint")
PASSREGEX "libROOTRint")

ROOTTEST_ADD_TEST(TabCom
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/driveTabCom.py
Expand Down
Loading