[New-bugs-announce] [issue27101] Compilation of python (modules) for foreign target platform problem.
Petr Ovtchenkov
report at bugs.python.org
Tue May 24 01:14:47 EDT 2016
New submission from Petr Ovtchenkov:
Compilation of python for foreign target platform problem.
Host arch is x86_64, target arch is arm (arm32).
Configuration is (target arch part):
(cd build-python && \
DESTDIR=${SYSROOT} \
PKG_CONFIG=true \
LIBFFI_INCLUDEDIR= \
PATH=${CURDIR}/host-python-home/bin:$$PATH \
PYTHONHOME=${CURDIR}/host-python-home/lib \
PYTHONPATH=${CURDIR}/host-python-home/lib/python3.5 \
../cpython/configure \
--host=${TARGET_CROSS} \
--build=${BUILD_M_ARCH}-unknown-linux-gnu \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-shared \
--disable-ipv6 \
--with-system-ffi \
--with-system-expat \
--without-ensurepip \
--cache-file=config.cache\
)
sed -e 's/#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1/#undef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE/' -i build-python/pyconfig.h
sed -e '/^PGEN=/ s|=.*$$|=\t\t${CURDIR}/build-python-native/Parser/pgen|' -e '/^LDFLAGS=/ s|=.*$$|=\t\t-L.|' -e '/^\$$(PGEN):/,+1d' -e '/^LIBFFI_INCLUDEDIR=/ s|=.*$$|=|' -i build-python/Makefile
Problem: option -I/usr/include passed to compiler during modules compilation. This lead to fails, due to target platform is different from host.
Suggested patch resolve the issue for me.
BTW, pass -I/usr/include is useless even for native builds.
----------
components: Cross-Build
files: cpython.patch
keywords: patch
messages: 266225
nosy: Alex.Willmer, complement
priority: normal
severity: normal
status: open
title: Compilation of python (modules) for foreign target platform problem.
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file42963/cpython.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27101>
_______________________________________
More information about the New-bugs-announce
mailing list