Patchwork python: Fix host contamination issue

login
register
mail settings
Submitter Richard Purdie
Date April 11, 2012, 10:58 a.m.
Message ID <1334141902.10826.145.camel@ted>
Download mbox | patch
Permalink /patch/25575/
State Accepted
Commit 546175abbac8a3c7ec4b5a4d014b05378bbb092f
Headers show

Comments

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/libc.so.6: 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/libpython2.7.so.1.0)
| 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
things.
    
The patch clears out the RUNSHARED variable which would contain the
LD_LIBRARY_PATH value prior to this patch.
    
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch

diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb
index 8cf45da..53e994f 100644
--- a/meta/recipes-devtools/python/python_2.7.2.bb
+++ b/meta/recipes-devtools/python/python_2.7.2.bb
@@ -1,6 +1,6 @@ 
 require python.inc
 DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}.9"
+PR = "${INC_PR}.10"
 
 DISTRO_SRC_URI ?= "file://sitecustomize.py"
 DISTRO_SRC_URI_linuxstdbase = ""
@@ -62,6 +62,9 @@  do_compile() {
 	# remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
 	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