[OE-core] [PATCH] toolchain-scripts: Add PYTHONHOME in sdk env script

Burton, Ross ross.burton at intel.com
Tue Nov 21 21:11:21 UTC 2017


This fails all over the autobuilders:

======================================================================
ERROR: test_python_stdout (python.PythonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/lib/oeqa/sdk/cases/python.py",
line 23, in test_python_stdout
    output = self._run('python %s/test.py' % self.tc.sdk_dir)
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/meta/lib/oeqa/sdk/case.py",
line 12, in _run
    stderr=subprocess.STDOUT, universal_newlines=True)
  File "/usr/lib64/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '.
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato/1.0-r0/testimage-sdk/environment-setup-armv5e-poky-linux-gnueabi
> /dev/null; python
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-arm/build/build/tmp/work/qemuarm-poky-linux-gnueabi/core-image-sato/1.0-r0/testimage-sdk//test.py;'
returned non-zero exit status 1.

My guess is that its running host Python with PYTHONHOME set to the SDK,
which then fails massively as the binary parts won't be compatible.

Ross


On 13 November 2017 at 19:11, Thomas Perrot <thomas.perrot at tupi.fr> wrote:
>
> Otherwise, the host Python environment is used instead of Python
environment
> provided by the SDK.
>
> Signed-off-by: Thomas Perrot <thomas.perrot at tupi.fr>
> ---
>  meta/classes/toolchain-scripts.bbclass | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes/toolchain-scripts.bbclass
b/meta/classes/toolchain-scripts.bbclass
> index 9bcfe708c7..03bc652cd7 100644
> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -51,6 +51,7 @@ toolchain_create_sdk_env_script () {
>         echo "export OECORE_NATIVE_SYSROOT=\"$sdkpathnative\"" >> $script
>         echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script
>         echo "export OECORE_ACLOCAL_OPTS=\"-I
$sdkpathnative/usr/share/aclocal\"" >> $script
> +       echo "export PYTHONHOME=\"$sdkpathnative$libdir\"" >> $script
>         echo 'unset command_not_found_handle' >> $script
>
>         toolchain_shared_env_script
> --
> 2.13.6
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20171121/3c479267/attachment-0002.html>


More information about the Openembedded-core mailing list