All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zhou <li.zhou@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] python3: correct the multilib support patch
Date: Wed, 29 Jun 2016 11:12:55 +0800	[thread overview]
Message-ID: <20160629031255.3551-1-li.zhou@windriver.com> (raw)

When python3 rebased its multilib patch, the hard coded "lib" path
isn't really changed because of the rebasing's error, and cause
phthon3's failure when running on 64bit platforms as below:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Here correct the rebasing error and solve this issue.

Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
 ...ython3-correct-the-multilib-support-patch.patch | 47 ++++++++++++++++++++++
 meta/recipes-devtools/python/python3_3.5.1.bb      |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3/0001-python3-correct-the-multilib-support-patch.patch

diff --git a/meta/recipes-devtools/python/python3/0001-python3-correct-the-multilib-support-patch.patch b/meta/recipes-devtools/python/python3/0001-python3-correct-the-multilib-support-patch.patch
new file mode 100644
index 0000000..0443fb4
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-python3-correct-the-multilib-support-patch.patch
@@ -0,0 +1,47 @@
+From ea237efcfa72012f044c7b3091c9c9b038141df8 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Wed, 29 Jun 2016 10:45:01 +0800
+Subject: [PATCH] python3: correct the multilib support patch
+
+When python3 rebased its multilib patch, the hard coded "lib" path
+isn't really changed because of the rebasing's error, and cause
+phthon3's failure when running on 64bit platforms as below:
+Could not find platform independent libraries <prefix>
+Could not find platform dependent libraries <exec_prefix>
+Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
+Fatal Python error: Py_Initialize: Unable to get the locale encoding
+ImportError: No module named 'encodings'
+
+Here correct the rebasing error and solve this issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ Modules/getpath.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Modules/getpath.c b/Modules/getpath.c
+index 034d91a..5deb33d 100644
+--- a/Modules/getpath.c
++++ b/Modules/getpath.c
+@@ -132,7 +132,6 @@ static wchar_t prefix[MAXPATHLEN+1];
+ static wchar_t exec_prefix[MAXPATHLEN+1];
+ static wchar_t progpath[MAXPATHLEN+1];
+ static wchar_t *module_search_path = NULL;
+-static wchar_t *lib_python = L"" LIB_PYTHON;
+ 
+ /* Get file status. Encode the path to the locale encoding. */
+ 
+@@ -514,7 +513,7 @@ calculate_path(void)
+     _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL);
+     _prefix = Py_DecodeLocale(PREFIX, NULL);
+     _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL);
+-    lib_python = Py_DecodeLocale("lib/python" VERSION, NULL);
++    lib_python = Py_DecodeLocale(LIB_PYTHON, NULL);
+ 
+     if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
+         Py_FatalError(
+-- 
+2.9.0
+
diff --git a/meta/recipes-devtools/python/python3_3.5.1.bb b/meta/recipes-devtools/python/python3_3.5.1.bb
index 2fbb3cb..1e6626f 100644
--- a/meta/recipes-devtools/python/python3_3.5.1.bb
+++ b/meta/recipes-devtools/python/python3_3.5.1.bb
@@ -38,6 +38,7 @@ SRC_URI += "\
             file://setup.py-find-libraries-in-staging-dirs.patch \
             file://use_packed_importlib.patch \
             file://configure.ac-fix-LIBPL.patch \
+            file://0001-python3-correct-the-multilib-support-patch.patch \
            "
 SRC_URI[md5sum] = "e9ea6f2623fffcdd871b7b19113fde80"
 SRC_URI[sha256sum] = "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"
-- 
2.9.0



             reply	other threads:[~2016-06-29  3:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  3:12 Li Zhou [this message]
2016-06-29  6:33 ` [PATCH] python3: correct the multilib support patch Richard Purdie
2016-06-29 15:44   ` Randle, William C
2016-06-29 22:47     ` Dan McGregor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160629031255.3551-1-li.zhou@windriver.com \
    --to=li.zhou@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.