diff --git a/3rd_party/3rd_party.cmake b/3rd_party/3rd_party.cmake index 83d2611e2f..e24a6d8fa9 100644 --- a/3rd_party/3rd_party.cmake +++ b/3rd_party/3rd_party.cmake @@ -57,7 +57,6 @@ if ("${HOST_SYSTEM_NAME}" STREQUAL "darwin") endif() set(BOOST_EXTENSION "mt-${BOOST_ARCH}-1_86.dylib") set(BOOST_LIBRARIES "atomic" "chrono" "date_time" "filesystem" "iostreams" "log" "log_setup" "program_options" "regex" "system" "thread" "unit_test_framework") - set(XML_LOCATION) set(GCC_RT_LOCATION) set(STL_LOCATION) set(OMP_LOCATION) @@ -81,8 +80,6 @@ elseif ("${HOST_SYSTEM_NAME}" STREQUAL "linux") endif() set(BOOST_EXTENSION mt-${BOOST_ARCH}-1_86.so.1.86.0) set(BOOST_LIBRARIES "atomic" "chrono" "date_time" "filesystem" "iostreams" "log" "log_setup" "program_options" "regex" "system" "thread" "unit_test_framework") - set(XML_LOCATION "/usr/local/gcc133/lib") - set(XML_EXTENSION ".so.2") set(GCC_RT_LOCATION "/usr/local/gcc133/lib64") set(GCC_RT_EXTENSION ".so.1") set(STL_LOCATION "/usr/local/gcc133/lib64") @@ -102,7 +99,6 @@ elseif ("${HOST_SYSTEM_NAME}" STREQUAL "linux") set(BOOST_COMPILER "clang-darwin${CMAKE_CXX_COMPILER_VERSION_MAJOR}") set(BOOST_EXTENSION "mt-x64-1_86.dylib") set(BOOST_LIBRARIES "atomic" "chrono" "date_time" "filesystem" "iostreams" "log" "log_setup" "program_options" "regex" "system" "thread" "unit_test_framework") - set(XML_LOCATION) set(GCC_RT_LOCATION) set(STL_LOCATION) set(OMP_LOCATION) @@ -123,8 +119,6 @@ else() set(BOOST_COMPILER "vc") set(BOOST_EXTENSION "mt-x64-1_86.dll") set(BOOST_LIBRARIES "atomic" "chrono" "date_time" "filesystem" "iostreams" "log" "log_setup" "program_options" "regex" "system" "thread" "unit_test_framework") - set(XML_LOCATION "${LOCAL_DRIVE}/usr/local/bin") - set(XML_EXTENSION ".dll") set(GCC_RT_LOCATION) # Read VCBASE from environment if defined, otherwise default to VS Professional 2019 message(STATUS "3rd_party: \$ENV{VCBASE} $ENV{VCBASE}") @@ -231,7 +225,6 @@ endfunction() file(MAKE_DIRECTORY "${INSTALL_DIR}") install_libs("Boost" ${BOOST_LOCATION} "boost*" "${BOOST_COMPILER}*${BOOST_EXTENSION}" ${BOOST_LIBRARIES}) -install_libs("libxml2" ${XML_LOCATION} "" "${XML_EXTENSION}" "libxml2") install_libs("gcc runtime library" ${GCC_RT_LOCATION} "" "${GCC_RT_EXTENSION}" "libgcc_s") install_libs("C++ standard library" ${STL_LOCATION} "" "${STL_EXTENSION}" "${STL_PATTERN}") install_libs("OMP runtime library" ${OMP_LOCATION} "" "${OMP_EXTENSION}" "${OMP_PATTERN}") diff --git a/3rd_party/licenses/libxml2-INFO.csv b/3rd_party/licenses/libxml2-INFO.csv deleted file mode 100644 index 49ed125b57..0000000000 --- a/3rd_party/licenses/libxml2-INFO.csv +++ /dev/null @@ -1,2 +0,0 @@ -name,version,revision,url,license,copyright,sourceURL -Libxml2,2.10.4,7846b0a677f8d3ce72486125fa281e92ac9970e8,http://xmlsoft.org/,MIT,Copyright (C) 1998-2012 Daniel Veillard, diff --git a/3rd_party/licenses/libxml2-LICENSE.txt b/3rd_party/licenses/libxml2-LICENSE.txt deleted file mode 100644 index 417e95531f..0000000000 --- a/3rd_party/licenses/libxml2-LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -Except where otherwise noted in the source code (e.g. the files hash.c, -list.c and the trio files, which are covered by a similar licence but -with different Copyright notices) all the files are: - - Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is fur- -nished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- -NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- -NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Daniel Veillard shall not -be used in advertising or otherwise to promote the sale, use or other deal- -ings in this Software without prior written authorization from him. - diff --git a/3rd_party/licenses/libxml2-NOTICE.txt b/3rd_party/licenses/libxml2-NOTICE.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/AGENTS.md b/AGENTS.md index 35607e24d6..2dc8d52aa5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ - **Language**: C++20 (`CMAKE_CXX_STANDARD 20`). - **Build system**: CMake (primary) or Gradle wrapper (`./gradlew`). - **Compilers**: GCC 13.3.0 on Linux (built from source, installed to `/usr/local/gcc133/`), Xcode Clang on macOS (Xcode 15.2+ for Ventura/Sonoma), Visual Studio 2022 Professional (MSVC) on Windows. -- **Key dependencies**: Boost 1.86.0 (dynamic linking, includes Boost.Json for JSON handling), PyTorch 2.7.1 (libtorch), libxml2. +- **Key dependencies**: Boost 1.86.0 (dynamic linking, includes Boost.Json for JSON handling), PyTorch 2.7.1 (libtorch). - **Header-only libraries**: Eigen and valijson are header-only and managed by the `3rd_party/` CMake system (pulled automatically during configuration). - **Platforms**: Linux x86_64/aarch64, macOS aarch64, Windows x86_64. - **Toolchain files**: Auto-selected from `cmake/-.cmake` or set via `CMAKE_TOOLCHAIN_FILE`. diff --git a/bin/controller/unittest/CMakeLists.txt b/bin/controller/unittest/CMakeLists.txt index dd2bd13c3b..3ba80bcf2a 100644 --- a/bin/controller/unittest/CMakeLists.txt +++ b/bin/controller/unittest/CMakeLists.txt @@ -21,7 +21,6 @@ set (SRCS set(ML_LINK_LIBRARIES ${Boost_LIBRARIES_WITH_UNIT_TEST} - ${LIBXML2_LIBRARIES} MlCore MlProcessSpawnerRouter MlSandbox diff --git a/bin/pytorch_inference/unittest/CMakeLists.txt b/bin/pytorch_inference/unittest/CMakeLists.txt index fe3c544a55..5fbeebf1ee 100644 --- a/bin/pytorch_inference/unittest/CMakeLists.txt +++ b/bin/pytorch_inference/unittest/CMakeLists.txt @@ -21,7 +21,6 @@ set (SRCS set(ML_LINK_LIBRARIES ${Boost_LIBRARIES_WITH_UNIT_TEST} - ${LIBXML2_LIBRARIES} MlCore MlMathsCommon MlMathsAnalytics diff --git a/cmake/variables.cmake b/cmake/variables.cmake index afd4cca0ef..3d02158030 100644 --- a/cmake/variables.cmake +++ b/cmake/variables.cmake @@ -107,12 +107,6 @@ else() set(C10_LIB "${ML_BASE_PATH}/lib/libc10${ML_LIBEXT}") endif() -if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(LIBXML2_LIBRARIES "-lxml2") -else() - set(LIBXML2_LIBRARIES "${ML_BASE_PATH}/lib/libxml2${ML_LIBEXT}") -endif() - if (CMAKE_SYSTEM_NAME STREQUAL "Windows") set(ZLIB_LIBRARIES "${ML_BASE_PATH}/lib/zlib${ML_LIBEXT}") else() @@ -128,9 +122,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") if (CMAKE_CROSSCOMPILING) list(APPEND ML_SYSTEM_INCLUDE_DIRECTORIES ${SYSROOT}/usr/include/c++/v1) endif() - list(APPEND ML_SYSTEM_INCLUDE_DIRECTORIES ${SYSROOT}/usr/include ${SYSROOT}/usr/include/libxml2 ${SYSROOT}/usr/local/include) -else () - list(APPEND ML_SYSTEM_INCLUDE_DIRECTORIES ${ML_BASE_PATH}/include/libxml2) + list(APPEND ML_SYSTEM_INCLUDE_DIRECTORIES ${SYSROOT}/usr/include ${SYSROOT}/usr/local/include) endif() list(APPEND ML_SYSTEM_INCLUDE_DIRECTORIES diff --git a/lib/api/unittest/CMakeLists.txt b/lib/api/unittest/CMakeLists.txt index 69d62a7ac8..e9f76cb174 100644 --- a/lib/api/unittest/CMakeLists.txt +++ b/lib/api/unittest/CMakeLists.txt @@ -61,7 +61,6 @@ set (SRCS set(ML_LINK_LIBRARIES ${Boost_LIBRARIES_WITH_UNIT_TEST} - ${LIBXML2_LIBRARIES} MlCore MlMathsCommon MlMathsAnalytics diff --git a/lib/core/CMakeLists.txt b/lib/core/CMakeLists.txt index bb9647d0d0..e58897072a 100644 --- a/lib/core/CMakeLists.txt +++ b/lib/core/CMakeLists.txt @@ -13,9 +13,14 @@ project("ML Core") set(ML_LINK_LIBRARIES ${ZLIB_LIBRARIES} - ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES}) +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + # CCrashHandler_Linux.cc calls dladdr(), which lives in libdl on the glibc + # versions we build against. This used to be satisfied transitively by libxml2. + list(APPEND ML_LINK_LIBRARIES ${CMAKE_DL_LIBS}) +endif() + ml_add_library(MlCore SHARED CBase64Filter.cc CBlockingCallCancellerThread.cc diff --git a/lib/core/unittest/CMakeLists.txt b/lib/core/unittest/CMakeLists.txt index d03089046b..44196928d7 100644 --- a/lib/core/unittest/CMakeLists.txt +++ b/lib/core/unittest/CMakeLists.txt @@ -82,7 +82,6 @@ set (SRCS set(ML_LINK_LIBRARIES ${Boost_LIBRARIES_WITH_UNIT_TEST} - ${LIBXML2_LIBRARIES} MlCore MlMathsCommon MlTest diff --git a/lib/maths/analytics/unittest/CMakeLists.txt b/lib/maths/analytics/unittest/CMakeLists.txt index 79ef9a50ca..6b951fbb16 100644 --- a/lib/maths/analytics/unittest/CMakeLists.txt +++ b/lib/maths/analytics/unittest/CMakeLists.txt @@ -28,7 +28,6 @@ set (SRCS set(ML_LINK_LIBRARIES ${Boost_LIBRARIES_WITH_UNIT_TEST} - ${LIBXML2_LIBRARIES} MlCore MlMathsCommon MlMathsAnalytics diff --git a/lib/model/unittest/CMakeLists.txt b/lib/model/unittest/CMakeLists.txt index 8e6d6dcf48..b23df9e3d4 100644 --- a/lib/model/unittest/CMakeLists.txt +++ b/lib/model/unittest/CMakeLists.txt @@ -62,7 +62,6 @@ set (SRCS set(ML_LINK_LIBRARIES ${Boost_LIBRARIES_WITH_UNIT_TEST} - ${LIBXML2_LIBRARIES} MlCore MlMathsCommon MlMathsTimeSeries diff --git a/lib/seccomp/unittest/CMakeLists.txt b/lib/seccomp/unittest/CMakeLists.txt index 39b28546e2..85ee35fc46 100644 --- a/lib/seccomp/unittest/CMakeLists.txt +++ b/lib/seccomp/unittest/CMakeLists.txt @@ -20,7 +20,6 @@ set (SRCS set(ML_LINK_LIBRARIES ${Boost_LIBRARIES_WITH_UNIT_TEST} - ${LIBXML2_LIBRARIES} MlCore MlSeccomp MlTest diff --git a/lib/ver/unittest/CMakeLists.txt b/lib/ver/unittest/CMakeLists.txt index a4d2fe30f6..c125974e4e 100644 --- a/lib/ver/unittest/CMakeLists.txt +++ b/lib/ver/unittest/CMakeLists.txt @@ -18,7 +18,6 @@ set (SRCS set(ML_LINK_LIBRARIES ${Boost_LIBRARIES_WITH_UNIT_TEST} - ${LIBXML2_LIBRARIES} MlCore MlVer MlTest