Skip to content

Conversation

@jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Jan 19, 2026

In this project, we try to maintain a low-enough GLIBC requirement for Linux wheels and the prebuilt shared library via 2 mechanisms:

  1. a script that manually checks liblightgbm.so built in CI

LightGBM/.ci/test.sh

Lines 58 to 62 in 56be785

if [[ $OS_NAME == "linux" ]] && [[ $COMPILER == "gcc" ]]; then
objdump -T ./lib_lightgbm.so > ./objdump.log || exit 1
objdump -T ./lib_lightgbm_swig.so >> ./objdump.log || exit 1
./.ci/check-dynamic-dependencies.sh ./objdump.log || exit 1
fi

  1. building Linux wheels using official manylinux images from https://github.com/pypa/manylinux

This proposes adding auditwheel as a a third check to give us higher confidence that published wheels support the expected GLIBC versions, and more logs to help with debugging issues with the build process. It can also sometimes detect that an even-more-portable tag could be used, possibly allowing lightgbm to be installed on more platforms without too much new effort here 😁

Comment on lines +168 to +172
if [[ $ARCH == "x86_64" ]]; then
PLATFORM="manylinux_2_27_x86_64.manylinux_2_28_x86_64"
else
PLATFORM="manylinux2014_aarch64.manylinux_2_17_aarch64"
fi
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice these tags are different... auditwheel found that we could cover more platforms than the tags we'd been using!!

INFO:auditwheel.main_repair:Repairing lightgbm-4.6.0.99-py3-none-linux_aarch64.whl
INFO:auditwheel.lddtree:Excluding libgomp.so.1
INFO:auditwheel.wheeltools:Previous filename tags: linux_aarch64
INFO:auditwheel.wheeltools:New filename tags: manylinux_2_17_aarch64, manylinux2014_aarch64
INFO:auditwheel.wheeltools:Previous WHEEL info tags: py3-none-linux_aarch64
INFO:auditwheel.wheeltools:New WHEEL info tags: py3-none-manylinux_2_17_aarch64, py3-none-manylinux2014_aarch64
INFO:auditwheel.main_repair:
Fixed-up wheel written to /LightGBM/dist-fixed/lightgbm-4.6.0.99-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

(aarch64 logs)

The x86_64 logs could support GLIBC 2.27 (Ubuntu 18.04, for example) and the aarch64 wheels could support GLIBC 2.17!

@jameslamb jameslamb changed the title WIP: [python-package] [ci] use 'auditwheel' to check GLIBC versions for Linux wheels WIP: [python-package] [ci] use 'auditwheel' to check GLIBC versions for Linux wheels, update wheel tags Jan 19, 2026
@jameslamb jameslamb changed the title WIP: [python-package] [ci] use 'auditwheel' to check GLIBC versions for Linux wheels, update wheel tags [python-package] [ci] use 'auditwheel' to check GLIBC versions for Linux wheels, update wheel tags Jan 19, 2026
@jameslamb jameslamb marked this pull request as ready for review January 19, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants