This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年05月24日 05:14 by complement, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| 0001-Compilation-modules-for-foreign-target-platform.patch | complement, 2016年05月25日 04:08 | [PATCH 1/2] Compilation modules for foreign target platform | ||
| 0002-Compilation-ssl-module-for-foreign-target-platform.patch | complement, 2016年05月25日 04:09 | [PATCH 2/2] Compilation ssl module for foreign target platform | ||
| 0001-Compilation-modules-for-foreign-target-platform.patch | complement, 2016年05月25日 04:12 | [PATCH 1/2] Compilation modules for foreign target platform | ||
| 0002-Compilation-ssl-module-for-foreign-target-platform.patch | complement, 2016年05月25日 04:13 | [PATCH 2/2] Compilation ssl module for foreign target platform | ||
| Messages (10) | |||
|---|---|---|---|
| msg266225 - (view) | Author: Petr Ovtchenkov (complement) | Date: 2016年05月24日 05:14 | |
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.
|
|||
| msg266298 - (view) | Author: Petr Ovtchenkov (complement) | Date: 2016年05月25日 04:08 | |
for 3.5 branch |
|||
| msg266299 - (view) | Author: Petr Ovtchenkov (complement) | Date: 2016年05月25日 04:09 | |
for 3.5 branch |
|||
| msg266300 - (view) | Author: Petr Ovtchenkov (complement) | Date: 2016年05月25日 04:12 | |
for 2.7 branch |
|||
| msg266301 - (view) | Author: Petr Ovtchenkov (complement) | Date: 2016年05月25日 04:13 | |
for 2.7 branch |
|||
| msg267345 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2016年06月04日 23:28 | |
The 0002-* patches look fine, however the 0001-* patches are wrong if you are in a Multi-Arch environment, where you can find valid headers in /usr/include. From my point of view, the set of include and header directories should be directly initialized from the compiler defaults, and not hard coded. |
|||
| msg267520 - (view) | Author: Petr Ovtchenkov (complement) | Date: 2016年06月06日 07:32 | |
Matthias, This question is really for you: fc1903166 (doko 2012年09月21日 13:52:29 +0200 422) if multiarch_path_component != '': fc1903166 (doko 2012年09月21日 13:52:29 +0200 423) add_dir_to_list(self.compiler.library_dirs, fc1903166 (doko 2012年09月21日 13:52:29 +0200 424) '/usr/lib/' + multiarch_path_component) fc1903166 (doko 2012年09月21日 13:52:29 +0200 425) add_dir_to_list(self.compiler.include_dirs, fc1903166 (doko 2012年09月21日 13:52:29 +0200 426) '/usr/include/' + multiarch_path_component) fc1903166 (doko 2012年09月21日 13:52:29 +0200 427) return |
|||
| msg267533 - (view) | Author: Matthias Klose (doko) * (Python committer) | Date: 2016年06月06日 14:55 | |
sorry, I don't understand your last comment. |
|||
| msg267538 - (view) | Author: Petr Ovtchenkov (complement) | Date: 2016年06月06日 16:09 | |
This mean that code for search in /usr/include/... in multiarch environment was added by you in commit fc1903166 2012年09月21日 13:52:29 +0200, so in my suggestion I just don't change behaviour of you code. As for my opinion, any additions of -I/usr/include/... are wrong: compiler either see it without such -I... or shouldn't see it at all (as for cross), or require hint from builder (something like CURSES_CFLAGS=-I/home/bluser/new_curses/include). |
|||
| msg412092 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2022年01月29日 18:37 | |
2.7 and 3.5 are no longer maintained. Please create a new issue if you are still having this problem with a current version (>= 3.9). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:31 | admin | set | github: 71288 |
| 2022年01月29日 18:37:52 | iritkatriel | set | status: open -> closed nosy: + iritkatriel messages: + msg412092 resolution: out of date stage: resolved |
| 2016年06月06日 16:09:37 | complement | set | messages: + msg267538 |
| 2016年06月06日 14:55:56 | doko | set | messages: + msg267533 |
| 2016年06月06日 07:32:30 | complement | set | messages: + msg267520 |
| 2016年06月04日 23:28:23 | doko | set | messages: + msg267345 |
| 2016年05月28日 15:31:22 | ned.deily | set | nosy:
+ doko |
| 2016年05月25日 04:13:33 | complement | set | files:
+ 0002-Compilation-ssl-module-for-foreign-target-platform.patch messages: + msg266301 |
| 2016年05月25日 04:12:48 | complement | set | files:
+ 0001-Compilation-modules-for-foreign-target-platform.patch messages: + msg266300 versions: + Python 2.7 |
| 2016年05月25日 04:09:12 | complement | set | files:
+ 0002-Compilation-ssl-module-for-foreign-target-platform.patch messages: + msg266299 |
| 2016年05月25日 04:08:04 | complement | set | files:
+ 0001-Compilation-modules-for-foreign-target-platform.patch messages: + msg266298 |
| 2016年05月25日 04:05:55 | complement | set | files: - cpython.patch |
| 2016年05月24日 05:14:47 | complement | create | |