-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Until v10.20250721 we provided a binary build for GLIBC2.17+ platforms (e.g. really old Centos machines). With the build v10.20250828 a build-dependency (splitmix) has introduced a dependency on sys.random.h.
splitmix > /tmp/stack-8d18e471e791b429/splitmix-0.1.3.1/cbits-unix/init.c:3:24: error:
splitmix > fatal error: sys/random.h: No such file or directory
splitmix > |
splitmix > 3 | #include <sys/random.h>
splitmix > | ^
splitmix >
splitmix > compilation terminated.
It appears that sys/random.h was added in GLIB2.25.
For posterity, here is the script that built the 2.17+ variant:
podman run -it docker.io/library/ubuntu:16.04
# javascript component needs this
export LC_ALL=C.UTF-8
apt-get -y update
apt-get -y install curl patchelf libmagic-dev libtinfo-dev
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
curl -sSL https://get.haskellstack.org/ | sh
git clone https://github.com/psychoinformatics-de/git-annex-wheel.git
cd git-annex-wheel/
git submodule init git-annex
git clone --no-checkout --depth 100 $(git config submodule.git-annex.url) git-annex
git submodule update --init --recursive --force git-annex
( cd git-annex
sed -i -e 's/magicmime: false/magicmime: true/' stack.yaml
mkdir dist
echo "$(git describe HEAD | sed -e 's/-/./' | sed -e 's/-g.*//')" > dist/pypi-version
echo -n "linux_x86_64" > dist/platform-tag
)
stack --version
( cd git-annex && stack setup )
( cd git-annex && stack build --only-dependencies --extra-include-dirs=$PWD --extra-lib-dirs=$PWD )
( cd git-annex && stack ghc --no-haddock Build/BuildVersion.hs )
( cd git-annex && ./Build/BuildVersion > dist/build-version )
( cd git-annex && stack install --no-haddock --local-bin-path . )
# embed magic.mgc
cp -Lv "$(dpkg -L libmagic1 | grep magic.mgc | head -n 1)" ./git-annex
uv build --wheel
# we need an auditwheel that can work with the patchelf 0.9 we have
# and we need a python version that can drive that auditwheel
uv tool install --python 3.9 'auditwheel==5.1.2'
# --plat is determined via `auditwheel show dist/*.whl`
auditwheel repair --plat manylinux_2_17_x86_64 -w tuned dist/*.whl
auditwheel show tuned/*.whl
# testing
uv tool install tuned/*.whl
git-annex version
git-annex test
Just upgrading to Ubuntu 18.04 doesn't work, because today's stack wants a minimum Git version of 2.22. The next version up is 20.04, but the GLIB2.34+ package is already build on Ubuntu 22.04.
I am stopping the investigation here for now. It is certainly possible to make this happen, but it is unclear to me whether there continues to be a demand.
Metadata
Metadata
Assignees
Labels
No labels