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 <rep...@bugs.python.org> <http://bugs.python.org/issue27101> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com