<div dir="ltr"><div><div><div>Ping.<br><br></div>Could not see the patch included in <a href="https://patchwork.openembedded.org/project/oe/series/?ordering=-last_updated">https://patchwork.openembedded.org/project/oe/series/?ordering=-last_updated</a>, do I need to resend it?<br><br></div>Regards,<br></div>Jagadeesh<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 18, 2017 at 10:29 AM, Jagadeesh Krishnanjanappa <span dir="ltr"><<a href="mailto:jkrishnanjanappa@mvista.com" target="_blank">jkrishnanjanappa@mvista.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Having hard coded "lib" string in lib_python path, searches for modules<br>
under /usr/lib/python3.x directory. This would result in an error on<br>
multilib environment, where BASELIB is other than lib.<br>
<br>
Example: On qemux86-64 with base_libdir and libdir as /lib64 and /usr/lib64<br>
respectively, would result in below error when python3 is executed:<br>
-- snip --<br>
root@qemux86-64:~# python3<br>
Could not find platform independent libraries <prefix><br>
Could not find platform dependent libraries <exec_prefix><br>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]<br>
Fatal Python error: Py_Initialize: Unable to get the locale encoding<br>
ImportError: No module named 'encodings'<br>
<br>
Current thread 0x00007f65dbb53700 (most recent call first):<br>
Aborted<br>
root@qemux86-64:~#<br>
-- snip --<br>
<br>
Similar issue observed at:<br>
<a href="https://knowledge.windriver.com/en-us/000_Products/000/010/040/040/000_LIN8-4040_%3A_python3_does_not_work_in_a_multilib_environment" rel="noreferrer" target="_blank">https://knowledge.windriver.<wbr>com/en-us/000_Products/000/<wbr>010/040/040/000_LIN8-4040_%3A_<wbr>python3_does_not_work_in_a_<wbr>multilib_environment</a><br>
<br>
Signed-off-by: Jagadeesh Krishnanjanappa <<a href="mailto:jkrishnanjanappa@mvista.com">jkrishnanjanappa@mvista.com</a>><br>
---<br>
...remove-hard-coded-lib-<wbr>string-for-multilib.patch | 37 ++++++++++++++++++++++<br>
meta/recipes-devtools/python/<a href="http://python3_3.5.2.bb" rel="noreferrer" target="_blank">p<wbr>ython3_3.5.2.bb</a> | 1 +<br>
2 files changed, 38 insertions(+)<br>
create mode 100644 meta/recipes-devtools/python/<wbr>python3/python-3.5.2-remove-<wbr>hard-coded-lib-string-for-<wbr>multilib.patch<br>
<br>
diff --git a/meta/recipes-devtools/<wbr>python/python3/python-3.5.2-<wbr>remove-hard-coded-lib-string-<wbr>for-multilib.patch b/meta/recipes-devtools/<wbr>python/python3/python-3.5.2-<wbr>remove-hard-coded-lib-string-<wbr>for-multilib.patch<br>
new file mode 100644<br>
index 0000000..786f086<br>
--- /dev/null<br>
+++ b/meta/recipes-devtools/<wbr>python/python3/python-3.5.2-<wbr>remove-hard-coded-lib-string-<wbr>for-multilib.patch<br>
@@ -0,0 +1,37 @@<br>
+Having hard coded "lib" string in lib_python path, searches for modules<br>
+under /usr/lib/python3.x directory. This would result in an error on<br>
+multilib environment, where BASELIB is other than lib.<br>
+<br>
+Example: On qemux86-64 with base_libdir and libdir as /lib64 and /usr/lib64<br>
+respectively, would result in below error when python3 is executed:<br>
+-- snip --<br>
+root@qemux86-64:~# python3<br>
+Could not find platform independent libraries <prefix><br>
+Could not find platform dependent libraries <exec_prefix><br>
+Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]<br>
+Fatal Python error: Py_Initialize: Unable to get the locale encoding<br>
+ImportError: No module named 'encodings'<br>
+<br>
+Current thread 0x00007f65dbb53700 (most recent call first):<br>
+Aborted<br>
+root@qemux86-64:~#<br>
+-- snip --<br>
+<br>
+Note: LIB is defined with actual base_libdir used via -DLIB during<br>
+compilation.<br>
+<br>
+Upstream-Status: Pending<br>
+<br>
+Signed-off-by: Jagadeesh Krishnanjanappa <<a href="mailto:jkrishnanjanappa@mvista.com">jkrishnanjanappa@mvista.com</a>><br>
+diff -Naurp Python-3.5.2_org/Modules/<wbr>getpath.c Python-3.5.2/Modules/getpath.c<br>
+--- Python-3.5.2_org/Modules/<wbr>getpath.c 2017-02-17 00:58:28.312583182 +0530<br>
++++ Python-3.5.2/Modules/getpath.c 2017-02-17 01:01:58.984805492 +0530<br>
+@@ -502,7 +502,7 @@ calculate_path(void)<br>
+ _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL);<br>
+ _prefix = Py_DecodeLocale(PREFIX, NULL);<br>
+ _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL);<br>
+- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL);<br>
++ lib_python = Py_DecodeLocale(LIB "/python" VERSION, NULL);<br>
+<br>
+ if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {<br>
+ Py_FatalError(<br>
diff --git a/meta/recipes-devtools/<wbr>python/<a href="http://python3_3.5.2.bb" rel="noreferrer" target="_blank">python3_3.5.2.bb</a> b/meta/recipes-devtools/<wbr>python/<a href="http://python3_3.5.2.bb" rel="noreferrer" target="_blank">python3_3.5.2.bb</a><br>
index 2ff7c9e..26f49f6 100644<br>
--- a/meta/recipes-devtools/<wbr>python/<a href="http://python3_3.5.2.bb" rel="noreferrer" target="_blank">python3_3.5.2.bb</a><br>
+++ b/meta/recipes-devtools/<wbr>python/<a href="http://python3_3.5.2.bb" rel="noreferrer" target="_blank">python3_3.5.2.bb</a><br>
@@ -37,6 +37,7 @@ SRC_URI += "\<br>
file://configure.ac-fix-LIBPL.<wbr>patch \<br>
file://python3-fix-CVE-2016-<wbr>1000110.patch \<br>
file://upstream-random-fixes.<wbr>patch \<br>
+ file://python-3.5.2-remove-<wbr>hard-coded-lib-string-for-<wbr>multilib.patch \<br>
"<br>
SRC_URI[md5sum] = "<wbr>8906efbacfcdc7c3c9198aeefafd15<wbr>9e"<br>
SRC_URI[sha256sum] = "<wbr>0010f56100b9b74259ebcd5d4b295a<wbr>32324b58b517403a10d1a2aa7cb22b<wbr>ca40"<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
</font></span></blockquote></div><br></div>