python: Fix host contamination issue

Submitted by Richard Purdie on April 11, 2012, 10:58 a.m. | Patch ID: 25575


Message ID 1334141902.10826.145.camel@ted
State Accepted
Commit 546175abbac8a3c7ec4b5a4d014b05378bbb092f
Headers show

Commit Message

Richard Purdie April 11, 2012, 10:58 a.m.
python-nativesdk could fail with:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/sysroots/x86_64-linux/usr/bin/python: /lib64/ version `GLIBC_2.14' not found (required by /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/python-nativesdk-2.7.2-r1.9/Python-2.7.2/
| make: *** [sharedmods] Error 1
which is caused by the fact LD_LIBRARY_PATH is being set to include WORKDIR
when calling HOSTPYTHON. HOSTPYTHON is from python-native and needs no such
help so the easiest fix here is not to set crazy LD_LIBRARY_PATH values
since we should never be running anything from WORKDIR given the way we build
The patch clears out the RUNSHARED variable which would contain the
LD_LIBRARY_PATH value prior to this patch.
Signed-off-by: Richard Purdie <>

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/python/ b/meta/recipes-devtools/python/
index 8cf45da..53e994f 100644
--- a/meta/recipes-devtools/python/
+++ b/meta/recipes-devtools/python/
@@ -1,6 +1,6 @@ 
 DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}.9"
+PR = "${INC_PR}.10"
 DISTRO_SRC_URI ?= "file://"
 DISTRO_SRC_URI_linuxstdbase = ""
@@ -62,6 +62,9 @@  do_compile() {
 	# remove hardcoded ccache, see
 	sed -i -e s,ccache,'$(CCACHE)', Makefile
+	# remove any bogus LD_LIBRARY_PATH
+	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
 	install -m 0644 Makefile Makefile.orig
 	sed -i -e 's,${includedir},${STAGING_INCDIR},' Makefile
 	sed -i -e 's,${libdir},${STAGING_LIBDIR},' Makefile