From 1a065765e5213a64d2f6d27ffefb18591f16d7d8 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 6 Aug 2026 15:22:10 +0200 Subject: [PATCH 1/4] [clib] mv to builtins folder since it's hard-coded external This is all C code that was copy-pasted from external packages in 1990x and 200x. It was then slightly adapted for ROOT but most of the structure is the same. Here, the code is put into the builtins directory. This is done for several reasons: - consistency with libafterimage, mathtext, glad: they have been all forked from upstream and fixed / adapted for ROOT. Likewise for core/clib, put them in builtins directory to have a better overview of all "dependencies" or borrowed things with upstream counterparts. - makes it clearer to deal with licensing and copyright notices by better separating source of the code - builtins folder gives kind of more recognition/overview to original authors (before adaptions and modifications) - system packagers (eg Debian) might complain less by better clarifying externals vs internals - when a bug is found in those builtins, it easens the opportunity to crosscheck with upstream whether it was fixed there - it allows in the future a more easy drop-in replacement with a more up-to-date library rather than a hard-coded copy paste - Less annoying surface for clang-tidy etc, things from builtins can be filtered out. --- CMakeLists.txt | 1 + builtins/clib/CMakeLists.txt | 54 +++++++++++++++++++++++ {core => builtins}/clib/inc/snprintf.h | 0 {core => builtins}/clib/inc/strlcpy.h | 0 {core => builtins}/clib/inc/strtok.h | 0 {core => builtins}/clib/res/mmalloc.h | 0 {core => builtins}/clib/res/mmconfig.h | 0 {core => builtins}/clib/res/mmprivate.h | 0 {core => builtins}/clib/src/attach.c | 0 {core => builtins}/clib/src/detach.c | 0 {core => builtins}/clib/src/getpagesize.c | 0 {core => builtins}/clib/src/keys.c | 0 {core => builtins}/clib/src/mcalloc.c | 0 {core => builtins}/clib/src/mfree.c | 0 {core => builtins}/clib/src/mmalloc.c | 0 {core => builtins}/clib/src/mmapsup.c | 0 {core => builtins}/clib/src/mmcheck.c | 0 {core => builtins}/clib/src/mrealloc.c | 0 {core => builtins}/clib/src/sbrksup.c | 0 {core => builtins}/clib/src/snprintf.c | 0 {core => builtins}/clib/src/strlcat.c | 0 {core => builtins}/clib/src/strlcpy.c | 0 core/CMakeLists.txt | 1 - core/clib/CMakeLists.txt | 50 --------------------- core/clingutils/CMakeLists.txt | 2 +- core/dictgen/CMakeLists.txt | 2 +- core/metacling/src/CMakeLists.txt | 2 +- core/newdelete/CMakeLists.txt | 2 +- core/unix/CMakeLists.txt | 2 +- documentation/doxygen/Doxyfile | 2 +- documentation/doxygen/makeinput.sh | 2 +- io/io/CMakeLists.txt | 2 +- rootx/CMakeLists.txt | 2 +- 33 files changed, 64 insertions(+), 60 deletions(-) create mode 100644 builtins/clib/CMakeLists.txt rename {core => builtins}/clib/inc/snprintf.h (100%) rename {core => builtins}/clib/inc/strlcpy.h (100%) rename {core => builtins}/clib/inc/strtok.h (100%) rename {core => builtins}/clib/res/mmalloc.h (100%) rename {core => builtins}/clib/res/mmconfig.h (100%) rename {core => builtins}/clib/res/mmprivate.h (100%) rename {core => builtins}/clib/src/attach.c (100%) rename {core => builtins}/clib/src/detach.c (100%) rename {core => builtins}/clib/src/getpagesize.c (100%) rename {core => builtins}/clib/src/keys.c (100%) rename {core => builtins}/clib/src/mcalloc.c (100%) rename {core => builtins}/clib/src/mfree.c (100%) rename {core => builtins}/clib/src/mmalloc.c (100%) rename {core => builtins}/clib/src/mmapsup.c (100%) rename {core => builtins}/clib/src/mmcheck.c (100%) rename {core => builtins}/clib/src/mrealloc.c (100%) rename {core => builtins}/clib/src/sbrksup.c (100%) rename {core => builtins}/clib/src/snprintf.c (100%) rename {core => builtins}/clib/src/strlcat.c (100%) rename {core => builtins}/clib/src/strlcpy.c (100%) delete mode 100644 core/clib/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 43418679c479c..5ac9879799a24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -393,6 +393,7 @@ install(FILES ${CMAKE_BINARY_DIR}/etc/gitinfo.txt DESTINATION ${CMAKE_INSTALL_SY #---Recurse into the given subdirectories. This does not actually cause another cmake executable # to run. The same process will walk through the project's entire directory structure. add_subdirectory (core) +add_subdirectory (builtins/clib) # hard coded builtin for core add_subdirectory (math) add_subdirectory (hist) add_subdirectory (tree) diff --git a/builtins/clib/CMakeLists.txt b/builtins/clib/CMakeLists.txt new file mode 100644 index 0000000000000..7b4e1f2c39e27 --- /dev/null +++ b/builtins/clib/CMakeLists.txt @@ -0,0 +1,54 @@ +# Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. +# All rights reserved. +# +# For the licensing terms see $ROOTSYS/LICENSE. +# For the list of contributors see $ROOTSYS/README/CREDITS. + +############################################################################ +# CMakeLists.txt file for building ROOT core/clib package +############################################################################ + +set_property(TARGET Core APPEND PROPERTY DICT_HEADERS + strlcpy.h # custom ROOT file (https://github.com/root-project/root/blob/b48975de4dcbcd5f1ecf7f60c3f8e39c38a1f6e3/core/clib/inc/strlcpy.h) + snprintf.h # custom ROOT file (https://github.com/root-project/root/blob/3c0f42cd0d4f7aeab78e01533afefeb6f1248946/clib/inc/snprintf.h vs https://github.com/daztucker/historic-ssh/blob/658f5a469b028b54a9934db11fb43f65319bb811/snprintf.h) + strtok.h # custom ROOT file (https://github.com/root-project/root/blob/d39c9211ba045c0b9aaa780ec76a32666e04cd1e/core/clib/inc/strtok.h) +) + +ROOT_OBJECT_LIBRARY(Clib + # All this code below is LGPL (GNU Lesser General Public License was called at that time GNU Library General Public License) + src/attach.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/attach.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/attach.c) + src/detach.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/detach.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/detach.c) + src/getpagesize.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/getpagesize.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mvalloc.c) + src/keys.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/keys.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/keys.c) + src/mcalloc.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/mcalloc.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mcalloc.c) + src/mfree.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/mfree.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mfree.c) + src/mmalloc.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/mmalloc.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mmalloc.c) + src/mmapsup.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/mmapsup.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mmap-sup.c) + src/mmcheck.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/mmcheck.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mmcheck.c) + src/mrealloc.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/mrealloc.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mrealloc.c) + src/sbrksup.c # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/src/sbrksup.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/sbrk-sup.c) + src/snprintf.c # forked in ~1998 maybe from Revision 1.19 / ssh 1.2.26 (https://github.com/root-project/root/blob/3c0f42cd0d4f7aeab78e01533afefeb6f1248946/clib/src/snprintf.c vs https://github.com/daztucker/historic-ssh/blob/ssh/snprintf.c) + src/strlcat.c # forked in 2010 from OpenBSD (https://github.com/root-project/root/blob/b48975de4dcbcd5f1ecf7f60c3f8e39c38a1f6e3/core/clib/src/strlcat.c vs https://github.com/libressl/openbsd/blob/032d9a965adfb74e42b18dc939b34fcda2cf740e/src/lib/libc/string/strlcat.c) + src/strlcpy.c # forked in 2010 from OpenBSD (https://github.com/root-project/root/blob/b48975de4dcbcd5f1ecf7f60c3f8e39c38a1f6e3/core/clib/src/strlcpy.c vs https://github.com/libressl/openbsd/blob/032d9a965adfb74e42b18dc939b34fcda2cf740e/src/lib/libc/string/strlcpy.c) + # res/mmalloc.h (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/inc/mmalloc.h vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mmalloc.h) + # res/mmconfig.h # custom ROOT file (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/inc/mmconfig.h) + # res/mmprivate.h # forked in 1999 from gdb-4 (https://github.com/root-project/root/blob/852600061bcacd9b255d44f6312c96b6b1e00a2d/clib/inc/mmprivate.c vs https://github.com/gnutools/binutils-gdb/blob/c906108c21474dfb4ed285bcc0ac6fe02cd400cc/mmalloc/mmprivate.c) +) + +target_include_directories(Clib + PUBLIC + $ + PRIVATE + ${CMAKE_BINARY_DIR}/ginclude + ${CMAKE_CURRENT_SOURCE_DIR}/res + ${CMAKE_CURRENT_SOURCE_DIR}/../core/foundation/inc # for RConfig.hxx +) + +target_include_directories(Core + PUBLIC + $ +) + +target_sources(Core PRIVATE $) + +ROOT_INSTALL_HEADERS() diff --git a/core/clib/inc/snprintf.h b/builtins/clib/inc/snprintf.h similarity index 100% rename from core/clib/inc/snprintf.h rename to builtins/clib/inc/snprintf.h diff --git a/core/clib/inc/strlcpy.h b/builtins/clib/inc/strlcpy.h similarity index 100% rename from core/clib/inc/strlcpy.h rename to builtins/clib/inc/strlcpy.h diff --git a/core/clib/inc/strtok.h b/builtins/clib/inc/strtok.h similarity index 100% rename from core/clib/inc/strtok.h rename to builtins/clib/inc/strtok.h diff --git a/core/clib/res/mmalloc.h b/builtins/clib/res/mmalloc.h similarity index 100% rename from core/clib/res/mmalloc.h rename to builtins/clib/res/mmalloc.h diff --git a/core/clib/res/mmconfig.h b/builtins/clib/res/mmconfig.h similarity index 100% rename from core/clib/res/mmconfig.h rename to builtins/clib/res/mmconfig.h diff --git a/core/clib/res/mmprivate.h b/builtins/clib/res/mmprivate.h similarity index 100% rename from core/clib/res/mmprivate.h rename to builtins/clib/res/mmprivate.h diff --git a/core/clib/src/attach.c b/builtins/clib/src/attach.c similarity index 100% rename from core/clib/src/attach.c rename to builtins/clib/src/attach.c diff --git a/core/clib/src/detach.c b/builtins/clib/src/detach.c similarity index 100% rename from core/clib/src/detach.c rename to builtins/clib/src/detach.c diff --git a/core/clib/src/getpagesize.c b/builtins/clib/src/getpagesize.c similarity index 100% rename from core/clib/src/getpagesize.c rename to builtins/clib/src/getpagesize.c diff --git a/core/clib/src/keys.c b/builtins/clib/src/keys.c similarity index 100% rename from core/clib/src/keys.c rename to builtins/clib/src/keys.c diff --git a/core/clib/src/mcalloc.c b/builtins/clib/src/mcalloc.c similarity index 100% rename from core/clib/src/mcalloc.c rename to builtins/clib/src/mcalloc.c diff --git a/core/clib/src/mfree.c b/builtins/clib/src/mfree.c similarity index 100% rename from core/clib/src/mfree.c rename to builtins/clib/src/mfree.c diff --git a/core/clib/src/mmalloc.c b/builtins/clib/src/mmalloc.c similarity index 100% rename from core/clib/src/mmalloc.c rename to builtins/clib/src/mmalloc.c diff --git a/core/clib/src/mmapsup.c b/builtins/clib/src/mmapsup.c similarity index 100% rename from core/clib/src/mmapsup.c rename to builtins/clib/src/mmapsup.c diff --git a/core/clib/src/mmcheck.c b/builtins/clib/src/mmcheck.c similarity index 100% rename from core/clib/src/mmcheck.c rename to builtins/clib/src/mmcheck.c diff --git a/core/clib/src/mrealloc.c b/builtins/clib/src/mrealloc.c similarity index 100% rename from core/clib/src/mrealloc.c rename to builtins/clib/src/mrealloc.c diff --git a/core/clib/src/sbrksup.c b/builtins/clib/src/sbrksup.c similarity index 100% rename from core/clib/src/sbrksup.c rename to builtins/clib/src/sbrksup.c diff --git a/core/clib/src/snprintf.c b/builtins/clib/src/snprintf.c similarity index 100% rename from core/clib/src/snprintf.c rename to builtins/clib/src/snprintf.c diff --git a/core/clib/src/strlcat.c b/builtins/clib/src/strlcat.c similarity index 100% rename from core/clib/src/strlcat.c rename to builtins/clib/src/strlcat.c diff --git a/core/clib/src/strlcpy.c b/builtins/clib/src/strlcpy.c similarity index 100% rename from core/clib/src/strlcpy.c rename to builtins/clib/src/strlcpy.c diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 3d2069d3d1d38..e15973c7010a3 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -61,7 +61,6 @@ add_subdirectory(sanitizer) add_subdirectory(rootcling_stage1) add_subdirectory(base) -add_subdirectory(clib) add_subdirectory(clingutils) add_subdirectory(cont) add_subdirectory(dictgen) diff --git a/core/clib/CMakeLists.txt b/core/clib/CMakeLists.txt deleted file mode 100644 index 64a874c3bc8f5..0000000000000 --- a/core/clib/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. -# All rights reserved. -# -# For the licensing terms see $ROOTSYS/LICENSE. -# For the list of contributors see $ROOTSYS/README/CREDITS. - -############################################################################ -# CMakeLists.txt file for building ROOT core/clib package -############################################################################ - -set_property(TARGET Core APPEND PROPERTY DICT_HEADERS - strlcpy.h - snprintf.h - strtok.h -) - -ROOT_OBJECT_LIBRARY(Clib - src/attach.c - src/detach.c - src/getpagesize.c - src/keys.c - src/mcalloc.c - src/mfree.c - src/mmalloc.c - src/mmapsup.c - src/mmcheck.c - src/mrealloc.c - src/sbrksup.c - src/snprintf.c - src/strlcat.c - src/strlcpy.c -) - -target_include_directories(Clib - PUBLIC - $ - PRIVATE - ${CMAKE_BINARY_DIR}/ginclude - ${CMAKE_CURRENT_SOURCE_DIR}/res - ${CMAKE_CURRENT_SOURCE_DIR}/../foundation/inc # for RConfig.hxx -) - -target_include_directories(Core - PUBLIC - $ -) - -target_sources(Core PRIVATE $) - -ROOT_INSTALL_HEADERS() diff --git a/core/clingutils/CMakeLists.txt b/core/clingutils/CMakeLists.txt index c3d1294aa0c87..463a892253ed4 100644 --- a/core/clingutils/CMakeLists.txt +++ b/core/clingutils/CMakeLists.txt @@ -36,7 +36,7 @@ target_include_directories(ClingUtils PRIVATE ${CMAKE_SOURCE_DIR}/core/foundation/res ${CMAKE_SOURCE_DIR}/core/foundation/inc ${CMAKE_SOURCE_DIR}/core/base/inc - ${CMAKE_SOURCE_DIR}/core/clib/inc + ${CMAKE_SOURCE_DIR}/builtins/clib/inc ${CMAKE_SOURCE_DIR}/core/meta/inc ${CMAKE_BINARY_DIR}/ginclude) diff --git a/core/dictgen/CMakeLists.txt b/core/dictgen/CMakeLists.txt index 3df26f190b2bd..9422567a6b910 100644 --- a/core/dictgen/CMakeLists.txt +++ b/core/dictgen/CMakeLists.txt @@ -47,7 +47,7 @@ target_include_directories(Dictgen PRIVATE ${CMAKE_SOURCE_DIR}/core/foundation/res ${CMAKE_SOURCE_DIR}/core/clingutils/res ${CMAKE_SOURCE_DIR}/core/base/inc - ${CMAKE_SOURCE_DIR}/core/clib/inc + ${CMAKE_SOURCE_DIR}/builtins/clib/inc ${CMAKE_SOURCE_DIR}/core/meta/inc ${CMAKE_SOURCE_DIR}/core/foundation/inc ${CMAKE_BINARY_DIR}/ginclude diff --git a/core/metacling/src/CMakeLists.txt b/core/metacling/src/CMakeLists.txt index ce830802a9b21..f7d91833b7e34 100644 --- a/core/metacling/src/CMakeLists.txt +++ b/core/metacling/src/CMakeLists.txt @@ -56,7 +56,7 @@ target_include_directories(MetaCling SYSTEM PRIVATE target_include_directories(MetaCling PRIVATE ${CLING_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/core/base/inc - ${CMAKE_SOURCE_DIR}/core/clib/inc + ${CMAKE_SOURCE_DIR}/builtins/clib/inc ${CMAKE_SOURCE_DIR}/core/clingutils/res ${CMAKE_SOURCE_DIR}/core/cont/inc ${CMAKE_SOURCE_DIR}/core/foundation/inc diff --git a/core/newdelete/CMakeLists.txt b/core/newdelete/CMakeLists.txt index de0a180cdbe8b..54462e3f37fb3 100644 --- a/core/newdelete/CMakeLists.txt +++ b/core/newdelete/CMakeLists.txt @@ -18,6 +18,6 @@ ROOT_LINKER_LIBRARY(New Core ) -target_include_directories(New PRIVATE ${CMAKE_SOURCE_DIR}/core/clib/res) +target_include_directories(New PRIVATE ${CMAKE_SOURCE_DIR}/core/builtins/res) ROOT_INSTALL_HEADERS() diff --git a/core/unix/CMakeLists.txt b/core/unix/CMakeLists.txt index f1bfed48174af..7c66f7b7cbbab 100644 --- a/core/unix/CMakeLists.txt +++ b/core/unix/CMakeLists.txt @@ -14,7 +14,7 @@ endif() set_property(TARGET Core APPEND PROPERTY DICT_HEADERS TUnixSystem.h) target_sources(Core PRIVATE src/TUnixSystem.cxx) -target_include_directories(Core PRIVATE inc ../clib/res) +target_include_directories(Core PRIVATE inc ../../builtins/clib/res) if (CMAKE_SYSTEM_NAME MATCHES FreeBSD) target_link_libraries(Core PRIVATE execinfo util) diff --git a/documentation/doxygen/Doxyfile b/documentation/doxygen/Doxyfile index a46142f3c676f..7aea790e399d0 100644 --- a/documentation/doxygen/Doxyfile +++ b/documentation/doxygen/Doxyfile @@ -1081,7 +1081,7 @@ EXCLUDE = ../../interpreter/ \ ../../cmake \ ../../etc \ ../../js \ - ../../core/clib/ \ + ../../builtins/clib/ \ ../../core/lzma/ \ ../../core/newdelete/ \ ../../core/textinput/ \ diff --git a/documentation/doxygen/makeinput.sh b/documentation/doxygen/makeinput.sh index b7c07d953bdf8..9ee8ad0580eee 100755 --- a/documentation/doxygen/makeinput.sh +++ b/documentation/doxygen/makeinput.sh @@ -76,7 +76,7 @@ echo " ../../bindings/pyroot/ \\" >> Doxyfile_INPUT echo " ../../bindings/pyroot/pythonizations/python/ROOT/_pythonization/ \\" >> Doxyfile_INPUT echo " ../../bindings/r/ \\" >> Doxyfile_INPUT -# echo " ../../core/clib/ \\" >> Doxyfile_INPUT +# echo " ../../builtins/clib/ \\" >> Doxyfile_INPUT # echo " ../../core/lzma/ \\" >> Doxyfile_INPUT # echo " ../../core/newdelete/ \\" >> Doxyfile_INPUT # echo " ../../core/textinput/ \\" >> Doxyfile_INPUT diff --git a/io/io/CMakeLists.txt b/io/io/CMakeLists.txt index 6f30d2d9ac96a..9e0c5f6b55f4d 100644 --- a/io/io/CMakeLists.txt +++ b/io/io/CMakeLists.txt @@ -65,7 +65,7 @@ ROOT_LINKER_LIBRARY(RIO Core ) -target_include_directories(RIO PRIVATE ${CMAKE_SOURCE_DIR}/core/clib/res) +target_include_directories(RIO PRIVATE ${CMAKE_SOURCE_DIR}/builtins/clib/res) target_link_libraries(RIO PUBLIC ${ROOT_ATOMIC_LIBS}) target_link_libraries(RIO PRIVATE nlohmann_json::nlohmann_json) diff --git a/rootx/CMakeLists.txt b/rootx/CMakeLists.txt index d6ceb48cedb86..5c0d1b67161b6 100644 --- a/rootx/CMakeLists.txt +++ b/rootx/CMakeLists.txt @@ -19,7 +19,7 @@ target_include_directories(root PRIVATE ${CMAKE_SOURCE_DIR}/core/foundation/inc ${CMAKE_SOURCE_DIR}/core/base/inc ${CMAKE_SOURCE_DIR}/core/base/res - ${CMAKE_SOURCE_DIR}/core/clib/inc # for snprintf.h + ${CMAKE_SOURCE_DIR}/builtins/clib/inc# for snprintf.h ${CMAKE_SOURCE_DIR}/core/meta/inc # for TGenericClassInfo.h ${CMAKE_BINARY_DIR}/ginclude # for RConfigure.h and rootCommandLineOptionsHelp.h ) From 1740c6038172efbac1ea2ed9ad95338d3ec181b0 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 6 Aug 2026 15:41:02 +0200 Subject: [PATCH 2/4] Update CMakeLists.txt --- builtins/clib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtins/clib/CMakeLists.txt b/builtins/clib/CMakeLists.txt index 7b4e1f2c39e27..c7a117f53b5b7 100644 --- a/builtins/clib/CMakeLists.txt +++ b/builtins/clib/CMakeLists.txt @@ -41,7 +41,7 @@ target_include_directories(Clib PRIVATE ${CMAKE_BINARY_DIR}/ginclude ${CMAKE_CURRENT_SOURCE_DIR}/res - ${CMAKE_CURRENT_SOURCE_DIR}/../core/foundation/inc # for RConfig.hxx + ${CMAKE_CURRENT_SOURCE_DIR}/../../core/foundation/inc # for RConfig.hxx ) target_include_directories(Core From 3a9c82cc3ad7a4306b55256275342bcca449871a Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 6 Aug 2026 15:41:40 +0200 Subject: [PATCH 3/4] Update CMakeLists.txt --- core/newdelete/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/newdelete/CMakeLists.txt b/core/newdelete/CMakeLists.txt index 54462e3f37fb3..d3a9dcc624f2d 100644 --- a/core/newdelete/CMakeLists.txt +++ b/core/newdelete/CMakeLists.txt @@ -18,6 +18,6 @@ ROOT_LINKER_LIBRARY(New Core ) -target_include_directories(New PRIVATE ${CMAKE_SOURCE_DIR}/core/builtins/res) +target_include_directories(New PRIVATE ${CMAKE_SOURCE_DIR}/builtins/clib/res) ROOT_INSTALL_HEADERS() From 041f39f0239dac65cfd0965393b29c6f599b2682 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 6 Aug 2026 16:46:50 +0200 Subject: [PATCH 4/4] [macosx] missing include path --- core/macosx/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/macosx/CMakeLists.txt b/core/macosx/CMakeLists.txt index e3e38e959316f..c01f45cf0cb54 100644 --- a/core/macosx/CMakeLists.txt +++ b/core/macosx/CMakeLists.txt @@ -32,6 +32,7 @@ if(cocoa) target_compile_options(Macosx PRIVATE -ObjC++) target_include_directories(Macosx PRIVATE ../unix/inc) + target_include_directories(Macosx PRIVATE ${CMAKE_SOURCE_DIR}/builtins/clib/inc) # for strtok.h target_sources(Core PRIVATE $)