diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2013-02-19 16:15:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-19 14:37:40 -0800 |
commit | e7a21cd69a326ab7e2d0e410db28f24956f61208 (patch) | |
tree | e4a20387f0f68b443f764d7e505e2c2c5620f4cb | |
parent | bb7a913e4a0da450cc85edfe0d8f80bdf4065fad (diff) | |
download | openembedded-core-e7a21cd69a326ab7e2d0e410db28f24956f61208.tar.gz openembedded-core-e7a21cd69a326ab7e2d0e410db28f24956f61208.tar.bz2 openembedded-core-e7a21cd69a326ab7e2d0e410db28f24956f61208.zip |
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.
[YOCTO #3839]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/toolchain-scripts.bbclass | 2 |
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 () { echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script + echo 'export PYTHONHOME=${SDKPATHNATIVE}${prefix_nativesdk}' >> $script } # This function creates an environment-setup-script in the TMPDIR which enables @@ -132,6 +133,7 @@ toolchain_create_sdk_env_script_for_installer () { echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script + echo 'export PYTHONHOME=${SDKPATHNATIVE}${prefix_nativesdk}' >> $script } #we get the cached site config in the runtime |