-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: cross build some modules requiring external libraries #146
Comments
When I was testing cross-compilation within msys2 using msys2/MINGW-packages#8762 I was able to build all the modules that were included in the MINGW-packages mingw-w64-python package. But that was with 3.10, I have not tried that with 3.11 yet. |
I just tried with 3.11 (before #145 was merged) and successfully got this summary from setup.py:
Which looks correct. In case it helps, here's the script I used (needed minor tweaks for python 3.11 and the Python cross-compile script for MSYS2#!/bin/bash -ex
TARGET=${TARGET:-aarch64-w64-mingw32}
PREFIX=${PREFIX:-/clangarm64}
export PKG_CONFIG_LIBDIR=${PREFIX}/lib/pkgconfig:${PREFIX}/share/pkgconfig
export CC=${TARGET}-clang
export CXX=${CC}++
pacman -S --asdeps --needed --noconfirm --noprogressbar autoconf autoconf-archive automake-wrapper
git clone --depth 1 --single-branch https://github.com/msys2-contrib/cpython-mingw.git
cd cpython-mingw
autoreconf -vfi
mkdir _build && cd _build
../configure \
--prefix=${PREFIX} \
--build=${MINGW_CHOST} \
--host=${TARGET} \
--with-build-python=python \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
--without-ensurepip \
--enable-loadable-sqlite-extensions \
--with-tzpath=${PREFIX}/share/zoneinfo
make -j8
make -j1 install DESTDIR=python_pkgdir |
The following modules don't build in the cross CI jobs currently because external dependencies are missing:
Modules/pyexpat.c:5:10: fatal error: 'expat.h' file not found
Modules/_elementtree.c:3033:10: fatal error: 'expat.h' file not found
Modules/_decimal/_decimal.c:35:10: fatal error: 'mpdecimal.h' file not found
Modules/_ctypes/_ctypes.c:118:10: fatal error: 'ffi.h' file not found
We could build the external dependencies, then build Python with them, dist them, and test that the modules can be imported in the "cross-gcc-x86_64-test" job.
This is motivated by #145 (comment)
The text was updated successfully, but these errors were encountered: