Skip to content

Upgrade XGBoost to v3.0.5 and modernize build#47

Open
cdmwebs wants to merge 16 commits intoacalejos:mainfrom
cdmwebs:main
Open

Upgrade XGBoost to v3.0.5 and modernize build#47
cdmwebs wants to merge 16 commits intoacalejos:mainfrom
cdmwebs:main

Conversation

@cdmwebs
Copy link

@cdmwebs cdmwebs commented Sep 9, 2025

The core of the update is a major version upgrade of the underlying XGBoost C++ dependency, along with significant modernization of the build system and fixes for API compatibility.

Problem

The library was pinned to an older v2-era version of XGBoost. This resulted in build failures on up-to-date toolchains, including:

  • Outdated CMake syntax rejected by modern CMake versions (3 -> 4).
  • C code that was not compatible with modern Clang compilers on macOS.
  • Elixir code that was incompatible with the new model configuration format in XGBoost v3, leading to MatchError exceptions.
  • Deprecation warnings from recent Elixir versions and updated dependencies.

Solution

This PR addresses these issues with the following key changes:

  • Upgraded Core Dependency: The XGBoost C++ library is now pinned to the modern stable version v3.0.5.
  • Modernized Build System: The Makefile has been refactored to use a standard, incremental build process with CMake and Ninja. The old sed patch and macOS-specific LLVM workarounds have been removed.
  • API and Compiler Fixes: The NIF C code and Elixir wrapper have been patched to be compatible with the new XGBoost C API, modern compilers, and updated data formats.
  • Dependency & Deprecation Cleanup: All dependencies have been updated, and deprecation warnings related to charlists and VegaLite have been resolved.

The library now compiles cleanly and passes its entire test suite on a modern Erlang (28) and Elixir (1.18) development environment.

Precompiled Binaries (GH workflows)

  • Updated runner to use ubuntu-24.04
  • Dropped Erlang 25.0, 26.0; Elixir 1.14 for Erlang 27/28 and Elixir 1.18
  • Dropped Intel Mac support (they did build successfully -- happy to add back)

@cdmwebs cdmwebs marked this pull request as ready for review September 9, 2025 18:23
@acalejos
Copy link
Owner

@cdmwebs Thanks so much for this PR! I'll try to take a look this weekend

@javiercr
Copy link

This is fantastic! Thank you so much for your effort in keeping this library up to date 🙏

@cdmwebs
Copy link
Author

cdmwebs commented Sep 25, 2025

We use it everyday. Happy to help.

@iperks
Copy link

iperks commented Sep 29, 2025

@acalejos do you think this is good to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants