diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-05-05 17:18:49 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-06 08:41:26 +0100 |
commit | c8e1aeebd854c3517db4a483f729424f10235e40 (patch) | |
tree | 82ec68164f75f758b3173937fe4f7951f9947986 /meta/lib | |
parent | 5c2ccb059dc672efea1211c0ef3785ebe000ff7e (diff) | |
download | poky-c8e1aeebd854c3517db4a483f729424f10235e40.tar.gz |
Revert "oeqa: Set LD_LIBRARY_PATH when executing native commands"
LD_LIBRARY_PATH leaks into host executables too, and breaks them
as they are not uninative-enabled. E.g. on ubuntu 18.04 trying
to run host bash with a sysroot that was built on Fedora 33:
akanavin@ubuntu1804-ty-3:/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-24341/tmp/work/x86_64-linux/gnupg-native/2.3.1-r0/recipe-sysroot-native$ LD_LIBRARY_PATH=./usr/lib /bin/bash
/bin/bash: ./usr/lib/libtinfo.so.5: no version information available (required by /bin/bash)
/bin/bash: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./usr/lib/libtinfo.so.5)
This was seen e.g. here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/2090/steps/14/logs/stdio
(From OE-Core rev: 0e9850486b74a3de934527ca1077df001d3a8d22)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index a71c16ab14..024261410e 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -174,11 +174,8 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, sync=T | |||
174 | if native_sysroot: | 174 | if native_sysroot: |
175 | extra_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \ | 175 | extra_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \ |
176 | (native_sysroot, native_sysroot, native_sysroot) | 176 | (native_sysroot, native_sysroot, native_sysroot) |
177 | extra_libpaths = "%s/lib:%s/usr/lib" % \ | ||
178 | (native_sysroot, native_sysroot) | ||
179 | nenv = dict(options.get('env', os.environ)) | 177 | nenv = dict(options.get('env', os.environ)) |
180 | nenv['PATH'] = extra_paths + ':' + nenv.get('PATH', '') | 178 | nenv['PATH'] = extra_paths + ':' + nenv.get('PATH', '') |
181 | nenv['LD_LIBRARY_PATH'] = extra_libpaths + ':' + nenv.get('LD_LIBRARY_PATH', '') | ||
182 | options['env'] = nenv | 179 | options['env'] = nenv |
183 | 180 | ||
184 | cmd = Command(command, timeout=timeout, output_log=output_log, **options) | 181 | cmd = Command(command, timeout=timeout, output_log=output_log, **options) |