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/build-setup/linux.md b/build-setup/linux.md index 0fc99dffa5..7359fcc871 100644 --- a/build-setup/linux.md +++ b/build-setup/linux.md @@ -156,25 +156,6 @@ sudo make prefix=/usr install Without the `prefix=/usr` bit, you'll end up with a personal Git build in `~/bin` instead of one everyone on the machine can use. -### libxml2 - -Download `libxml2-2.10.4.tar.xz` from . - -Uncompress and untar the resulting file. Then run: - -``` -./configure --prefix=/usr/local/gcc133 --without-python --without-readline -``` - -This should build an appropriate Makefile. Assuming it does, type: - -``` -make -sudo make install -``` - -to install. - ### Boost 1.86.0 Download version 1.86.0 of Boost from . You must get this exact version, as the Machine Learning build system requires it. diff --git a/build-setup/windows.md b/build-setup/windows.md index 2f84c0f43f..79ca05f33a 100644 --- a/build-setup/windows.md +++ b/build-setup/windows.md @@ -95,40 +95,6 @@ nmake -f win32/Makefile.msc test All the build output will end up in the top level `C:\tools\zlib-1.3.1` directory. Once the build is complete, copy `zlib1.dll` and `minigzip.exe` to `C:\usr\local\bin`. Copy `zlib.lib` and `zdll.lib` to `C:\usr\local\lib`. And copy `zlib.h` and `zconf.h` to `C:\usr\local\include`. -### libxml2 - -Download `libxml2-2.9.14.tar.xz` from . - -Extract it in a Git bash shell using the GNU tar that comes with Git for Windows, e.g.: - -``` -cd /c/tools -tar Jxvf /z/cpp_src/libxml2-2.9.14.tar.xz -``` - -Edit `C:\tools\libxml2-2.9.14\win32\Makefile.msvc` and change the following lines: - -``` -CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 -``` - -to: - -``` -CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /Zi /D_WIN32_WINNT=0x0601 -``` - -(because we might as well generate a PDB file and we want to limit Windows API functions to those that exist in Windows Server 2008r2). - -Start a command prompt using Start Menu -> Apps -> Visual Studio 2022 -> x64 Native Tools Command Prompt for VS 2022, then in it type: - -``` -cd \tools\libxml2-2.9.14\win32 -cscript configure.js iconv=no prefix=C:\usr\local -nmake -nmake install -``` - ### Boost 1.86.0 Download version 1.86.0 of Boost from . You must get this exact version, as the Machine Learning build system requires it. 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/dev-tools/build_windows_third_party_deps.ps1 b/dev-tools/build_windows_third_party_deps.ps1 index 7b69b5c853..19b429b9ec 100644 --- a/dev-tools/build_windows_third_party_deps.ps1 +++ b/dev-tools/build_windows_third_party_deps.ps1 @@ -49,21 +49,6 @@ Copy-Item .\zlib.h -Destination C:\usr\local\include\ Copy-Item .\zconf.h -Destination C:\usr\local\include\ Write-Host "--- Done Installing zlib 1.3.1" -# Build and install libxml2 2.9.14 -Write-Host "--- Installing libxml2 2.9.14" -cd c:\tools -$Archive="libxml2-2.9.14.tar.xz" -$ZipSource="https://download.gnome.org/sources/libxml2/2.9/$Archive" -$ZipDestination="\tools\$Archive" -(New-Object Net.WebClient).DownloadFile($ZipSource, $ZipDestination) -C:\Progra~1\git\bin\bash.exe -c "tar Jxvf libxml2-2.9.14.tar.xz" -cd \tools\libxml2-2.9.14\win32 -(Get-Content .\Makefile.msvc) -replace """NDEBUG"" /O2" , """NDEBUG"" /O2 /Zi /D_WIN32_WINNT=0x0601" | Set-Content .\Makefile.msvc -cscript configure.js iconv=no prefix=C:\usr\local -nmake -nmake install -Write-Host "--- Done Installing libxml2 2.9.14" - # Build and install Boost 1.86.0 Write-Host "--- Installing boost 1.86.0" cd c:\tools diff --git a/dev-tools/docker/linux_aarch64_native_image/Dockerfile b/dev-tools/docker/linux_aarch64_native_image/Dockerfile index d74836d504..83f03a9166 100644 --- a/dev-tools/docker/linux_aarch64_native_image/Dockerfile +++ b/dev-tools/docker/linux_aarch64_native_image/Dockerfile @@ -65,17 +65,6 @@ RUN \ cd .. && \ rm -rf binutils-2.41 /tmp/* -# Build libxml2 -RUN \ - cd ${build_dir} && \ - wget --quiet -O - https://download.gnome.org/sources/libxml2/2.10/libxml2-2.10.4.tar.xz | tar Jxf - && \ - cd libxml2-2.10.4 && \ - ./configure --prefix=/usr/local/gcc133 --without-python --without-readline --without-lzma --without-zstd && \ - make -j$(nproc) && \ - make install && \ - cd .. && \ - rm -rf libxml2-2.10.4 /tmp/* - RUN \ for i in $(ls /lib64/libzstd.*); do mv $i "$i.bak" ; done && \ for i in $(ls /lib64/liblzma.*); do mv $i "$i.bak" ; done diff --git a/dev-tools/docker/linux_image/Dockerfile b/dev-tools/docker/linux_image/Dockerfile index f047430525..95eff05bda 100644 --- a/dev-tools/docker/linux_image/Dockerfile +++ b/dev-tools/docker/linux_image/Dockerfile @@ -65,17 +65,6 @@ RUN \ cd .. && \ rm -rf binutils-2.41 /tmp/* -# Build libxml2 -RUN \ - cd ${build_dir} && \ - wget --quiet -O - https://download.gnome.org/sources/libxml2/2.10/libxml2-2.10.4.tar.xz | tar Jxf - && \ - cd libxml2-2.10.4 && \ - ./configure --prefix=/usr/local/gcc133 --without-python --without-readline --without-lzma --without-zstd && \ - make -j$(nproc) && \ - make install && \ - cd .. && \ - rm -rf libxml2-2.10.4 /tmp/* - RUN \ for i in $(ls /lib64/libzstd.*); do mv $i "$i.bak" ; done && \ for i in $(ls /lib64/liblzma.*); do mv $i "$i.bak" ; done diff --git a/dev-tools/docker/ubuntu_devbox/Dockerfile b/dev-tools/docker/ubuntu_devbox/Dockerfile index 0d5a7becb3..bf563bde84 100644 --- a/dev-tools/docker/ubuntu_devbox/Dockerfile +++ b/dev-tools/docker/ubuntu_devbox/Dockerfile @@ -69,17 +69,6 @@ RUN \ cd .. && \ rm -rf binutils-2.41 -# Build libxml2 -RUN \ - cd ${build_dir} && \ - wget --quiet --no-check-certificate -O - https://download.gnome.org/sources/libxml2/2.10/libxml2-2.10.4.tar.xz | tar Jxf - && \ - cd libxml2-2.10.4 && \ - ./configure --prefix=/usr/local/gcc133 --without-python --without-readline && \ - make -j`nproc` && \ - make install && \ - cd .. && \ - rm -rf libxml2-2.10.4 - # Build Boost RUN \ cd ${build_dir} && \ diff --git a/dev-tools/docker/ubuntu_devbox/Dockerfile.8.11 b/dev-tools/docker/ubuntu_devbox/Dockerfile.8.11 index 16bc0dbb27..f9f5187d1b 100644 --- a/dev-tools/docker/ubuntu_devbox/Dockerfile.8.11 +++ b/dev-tools/docker/ubuntu_devbox/Dockerfile.8.11 @@ -62,17 +62,6 @@ RUN \ cd .. && \ rm -rf binutils-2.37 -# Build libxml2 -RUN \ - cd ${build_dir} && \ - wget --quiet --no-check-certificate -O - https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz | tar Jxf - && \ - cd libxml2-2.9.14 && \ - ./configure --prefix=/usr/local/gcc103 --without-python --without-readline && \ - make -j`nproc` && \ - make install && \ - cd .. && \ - rm -rf libxml2-2.9.14 - # Build Boost RUN \ cd ${build_dir} && \ diff --git a/dev-tools/docker/ubuntu_devbox/Dockerfile.8.16 b/dev-tools/docker/ubuntu_devbox/Dockerfile.8.16 index c101b3968c..a7943602a3 100644 --- a/dev-tools/docker/ubuntu_devbox/Dockerfile.8.16 +++ b/dev-tools/docker/ubuntu_devbox/Dockerfile.8.16 @@ -62,17 +62,6 @@ RUN \ cd .. && \ rm -rf binutils-2.37 -# Build libxml2 -RUN \ - cd ${build_dir} && \ - wget --quiet --no-check-certificate -O - https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz | tar Jxf - && \ - cd libxml2-2.9.14 && \ - ./configure --prefix=/usr/local/gcc103 --without-python --without-readline && \ - make -j`nproc` && \ - make install && \ - cd .. && \ - rm -rf libxml2-2.9.14 - # Build Boost RUN \ cd ${build_dir} && \ 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