[yocto] Bitbaking python fails
João Henrique Freitas
joaohf at gmail.com
Sat Nov 12 17:05:50 PST 2011
Hi,
To fix it in Yocto 1.1.0 I tryed this:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=23d2eaf9d283cae47e52d1151f0d4ad53bbbe8a0
Works, my build host is Ubuntu 11.10 x86.
Thanks
PS: this paths works for me.
diff --git
a/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
new file mode 100644
index 0000000..aeef78f
--- /dev/null
+++
b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
@@ -0,0 +1,19 @@
+Index: Python-2.6.6/setup.py
+===================================================================
+--- Python-2.6.6.orig/setup.py 2011-11-12 22:54:14.257053822 -0200
++++ Python-2.6.6/setup.py 2011-11-12 22:54:19.701053981 -0200
+@@ -287,6 +287,14 @@
+ (ext.name, sys.exc_info()[1]))
+ self.failed.append(ext.name)
+ return
++ # If we're cross-compiling, we want to skip the import check
++ # i.e. we shouldn't be dynamically loading target shared libs
++ if os.environ.get('CROSS_COMPILE') is not None:
++ self.announce(
++ 'WARNING: skipping import check for cross-compiled "%s"'
%
++ ext.name)
++ return
++
+ # Workaround for Mac OS X: The Carbon-based modules cannot be
+ # reliably imported into a command-line Python
+ if 'Carbon' in ext.extra_link_args:
diff --git a/meta/recipes-devtools/python/python_2.6.6.bbb/meta/recipes-devtools/python/
python_2.6.6.bb
index aa7ec3c..3f12576 100644
--- a/meta/recipes-devtools/python/python_2.6.6.bb
+++ b/meta/recipes-devtools/python/python_2.6.6.bb
@@ -21,6 +21,7 @@ SRC_URI = "\
file://multilib.patch \
file://security_issue_2254_fix.patch \
file://cgi_py.patch \
+ file://setup_py_skip_cross_import_check.patch \
"
SRC_URI[md5sum] = "cf4e6881bb84a7ce6089e4a307f71f14"
@@ -61,6 +62,8 @@ do_compile() {
# then call do_install twice we get Makefile.orig == Makefile.sysroot
install -m 0644 Makefile Makefile.sysroot
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
STAGING_LIBDIR=${STAGING_LIBDIR} \
@@ -82,6 +85,8 @@ do_install() {
# make install needs the original Makefile, or otherwise the inclues
would
# go to ${D}${STAGING...}/...
install -m 0644 Makefile.orig Makefile
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
--
-----------------------------------------------------------
João Henrique Freitas - joaohf_at_gmail.com
Campinas-SP-Brasil
BSD051283
LPI 1
http://www.joaohfreitas.eti.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20111112/acc969c8/attachment.html>
More information about the yocto
mailing list