Skip to content

Commit 6effd5d

Browse files
committed
Build lxml static deps with -fPIC for cp315 on manylinux2014
lxml's static build doesn't add -fPIC on Linux, so linking the static libiconv/libxslt into the etree extension fails with R_X86_64_32 relocation errors.
1 parent 73c87fb commit 6effd5d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/scripts/manylinux_build_and_test.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ case "$PY_ABI/$MANYLINUX_IMAGE" in
4040
cp315-*/manylinux2014_*)
4141
export STATIC_DEPS=true
4242
export LIBXML2_VERSION="${LIBXML2_VERSION:?}" LIBXSLT_VERSION="${LIBXSLT_VERSION:?}"
43-
echo "STATIC_DEPS=$STATIC_DEPS LIBXML2_VERSION=$LIBXML2_VERSION LIBXSLT_VERSION=$LIBXSLT_VERSION"
43+
# lxml links its static deps into a shared extension, so they need -fPIC.
44+
export CFLAGS="${CFLAGS:+$CFLAGS }-fPIC"
45+
echo "STATIC_DEPS=$STATIC_DEPS LIBXML2_VERSION=$LIBXML2_VERSION LIBXSLT_VERSION=$LIBXSLT_VERSION CFLAGS=$CFLAGS"
4446
;;
4547
esac
4648

0 commit comments

Comments
 (0)