18 lines
1.4 KiB
Diff
18 lines
1.4 KiB
Diff
diff -urN a/configure.ac b/configure.ac
|
|
--- a/configure.ac 2014-10-11 22:44:06.197795500 +0100
|
|
+++ b/configure.ac 2014-10-11 22:44:09.163965100 +0100
|
|
@@ -30,7 +30,12 @@
|
|
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
|
|
fi
|
|
AC_MSG_RESULT($interp)
|
|
- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
|
|
+ # For reference see: http://bugs.python.org/msg180577
|
|
+ # interp's DESTSHARED must appear before that contained in pybuilddir.txt as otherwise, when compiling during make install,
|
|
+ # the build Python will attempt to load shared modules from the host Python, which will fail due to them being of the wrong
|
|
+ # architecture (e.g. x86_64 vs x86 or arm). It would probably be better if _sysconfigdata.py was placed elsewhere,
|
|
+ # i.e. in a folder that does not also contain incompatible shared modules.
|
|
+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH='$($interp -c "import sysconfig; print sysconfig.get_config_var(\"DESTSHARED\")")':$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
|
|
fi
|
|
elif test "$cross_compiling" = maybe; then
|
|
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
|