summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2013-03-11 14:10:27 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-23 13:00:51 +0100
commit18fe42cef9bf28a6b769891f8d2b61eccd38a73b (patch)
tree5a894937caaa03f44e7ed83f382244ca572973c4 /meta
parent88de87eb4e8ee79815ca48cd592292950ac1cf56 (diff)
downloadpoky-18fe42cef9bf28a6b769891f8d2b61eccd38a73b.tar.gz
toolchain-scripts.bbclass:add PYTHONHOME variable to environment-setup
When relocating the SDK, applications using python will search for python modules in the default location and will fail to start. The below errors are thrown by gdb, for example: Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] ImportError: No module named site In order to overcome this, add the PYTHONHOME variable to the environment-setup script for both standalone toolchain and adt-installer. No need to do that for meta-ide-support environment script since this toolchain does not get relocated. Cherry-pick commit db0a02492c2a53c1917b753bcf21c4ee7c0ecf59 [YOCTO #3839] (From OE-Core rev: 15454b99e3cbeaf2e411f1e374b512a19a72995a) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/toolchain-scripts.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 6d8623ccfa..d336397f9e 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -45,6 +45,7 @@ toolchain_create_sdk_env_script () {
45 echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script 45 echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
46 echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script 46 echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
47 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script 47 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
48 echo 'export PYTHONHOME=${SDKPATHNATIVE}${prefix_nativesdk}' >> $script
48} 49}
49 50
50# This function creates an environment-setup-script in the TMPDIR which enables 51# This function creates an environment-setup-script in the TMPDIR which enables
@@ -132,6 +133,7 @@ toolchain_create_sdk_env_script_for_installer () {
132 echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script 133 echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
133 echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script 134 echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
134 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script 135 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
136 echo 'export PYTHONHOME=${SDKPATHNATIVE}${prefix_nativesdk}' >> $script
135} 137}
136 138
137#we get the cached site config in the runtime 139#we get the cached site config in the runtime