Received: from mga14.intel.com ([143.182.124.37]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1U7oE0-0002Kn-JO for openembedded-core@lists.openembedded.org; Tue, 19 Feb 2013 15:31:24 +0100 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 19 Feb 2013 06:15:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,695,1355126400"; d="scan'208";a="258811377" Received: from lpalcu-linux (HELO localhost.localdomain) ([10.237.105.165]) by azsmga001.ch.intel.com with ESMTP; 19 Feb 2013 06:15:05 -0800 From: Laurentiu Palcu To: openembedded-core@lists.openembedded.org Date: Tue, 19 Feb 2013 16:15:03 +0200 Message-Id: <1361283303-12281-1-git-send-email-laurentiu.palcu@intel.com> X-Mailer: git-send-email 1.7.9.5 Subject: [PATCH] toolchain-scripts.bbclass: add PYTHONHOME variable to environment-setup X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 14:31:25 -0000 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 Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] 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 --- meta/classes/toolchain-scripts.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 6d8623c..d336397 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 -- 1.7.9.5