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
7 changes: 0 additions & 7 deletions 3rd_party/3rd_party.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand All @@ -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)
Expand All @@ -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}")
Expand Down Expand Up @@ -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}")
Expand Down
2 changes: 0 additions & 2 deletions 3rd_party/licenses/libxml2-INFO.csv

This file was deleted.

27 changes: 0 additions & 27 deletions 3rd_party/licenses/libxml2-LICENSE.txt

This file was deleted.

Empty file.
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<os>-<arch>.cmake` or set via `CMAKE_TOOLCHAIN_FILE`.
Expand Down
1 change: 0 additions & 1 deletion bin/controller/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ set (SRCS

set(ML_LINK_LIBRARIES
${Boost_LIBRARIES_WITH_UNIT_TEST}
${LIBXML2_LIBRARIES}
MlCore
MlProcessSpawnerRouter
MlSandbox
Expand Down
1 change: 0 additions & 1 deletion bin/pytorch_inference/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ set (SRCS

set(ML_LINK_LIBRARIES
${Boost_LIBRARIES_WITH_UNIT_TEST}
${LIBXML2_LIBRARIES}
MlCore
MlMathsCommon
MlMathsAnalytics
Expand Down
19 changes: 0 additions & 19 deletions build-setup/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://download.gnome.org/sources/libxml2/2.10/libxml2-2.10.4.tar.xz>.

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 <https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2>. You must get this exact version, as the Machine Learning build system requires it.
Expand Down
34 changes: 0 additions & 34 deletions build-setup/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz>.

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 -&gt; Apps -&gt; Visual Studio 2022 -&gt; 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 <https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2> . You must get this exact version, as the Machine Learning build system requires it.
Expand Down
10 changes: 1 addition & 9 deletions cmake/variables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down
15 changes: 0 additions & 15 deletions dev-tools/build_windows_third_party_deps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions dev-tools/docker/linux_aarch64_native_image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions dev-tools/docker/linux_image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions dev-tools/docker/ubuntu_devbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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} && \
Expand Down
11 changes: 0 additions & 11 deletions dev-tools/docker/ubuntu_devbox/Dockerfile.8.11
Original file line number Diff line number Diff line change
Expand Up @@ -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} && \
Expand Down
11 changes: 0 additions & 11 deletions dev-tools/docker/ubuntu_devbox/Dockerfile.8.16
Original file line number Diff line number Diff line change
Expand Up @@ -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} && \
Expand Down
1 change: 0 additions & 1 deletion lib/api/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ set (SRCS

set(ML_LINK_LIBRARIES
${Boost_LIBRARIES_WITH_UNIT_TEST}
${LIBXML2_LIBRARIES}
MlCore
MlMathsCommon
MlMathsAnalytics
Expand Down
7 changes: 6 additions & 1 deletion lib/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion lib/core/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ set (SRCS

set(ML_LINK_LIBRARIES
${Boost_LIBRARIES_WITH_UNIT_TEST}
${LIBXML2_LIBRARIES}
MlCore
MlMathsCommon
MlTest
Expand Down
1 change: 0 additions & 1 deletion lib/maths/analytics/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ set (SRCS

set(ML_LINK_LIBRARIES
${Boost_LIBRARIES_WITH_UNIT_TEST}
${LIBXML2_LIBRARIES}
MlCore
MlMathsCommon
MlMathsAnalytics
Expand Down
1 change: 0 additions & 1 deletion lib/model/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ set (SRCS

set(ML_LINK_LIBRARIES
${Boost_LIBRARIES_WITH_UNIT_TEST}
${LIBXML2_LIBRARIES}
MlCore
MlMathsCommon
MlMathsTimeSeries
Expand Down
1 change: 0 additions & 1 deletion lib/seccomp/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set (SRCS

set(ML_LINK_LIBRARIES
${Boost_LIBRARIES_WITH_UNIT_TEST}
${LIBXML2_LIBRARIES}
MlCore
MlSeccomp
MlTest
Expand Down
1 change: 0 additions & 1 deletion lib/ver/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ set (SRCS

set(ML_LINK_LIBRARIES
${Boost_LIBRARIES_WITH_UNIT_TEST}
${LIBXML2_LIBRARIES}
MlCore
MlVer
MlTest
Expand Down