From: Vitus Jensen <vjensen@gmx.de>
To: openembedded-devel@openembedded.org
Subject: Re: python roadmap
Date: Thu, 26 Feb 2009 01:15:32 +0000 (UTC) [thread overview]
Message-ID: <go4qfk$oe2$1@ger.gmane.org> (raw)
In-Reply-To: gme8cj$ejn$1@ger.gmane.org
Am Thu, 05 Feb 2009 08:35:31 +0000 schrieb Vitus Jensen:
> Am Wed, 14 Jan 2009 15:47:26 +0100 schrieb Michael 'Mickey' Lauer:
>
>> Thanks to some extrashifts this work has proceeded faster than
>> scheduled. I plan to merge mickey/python26 into master on friday. If
>> you see something dangerous, yell.
>
> Yell ;-)
>
> See http://bugs.openembedded.net/show_bug.cgi?id=5013
>
> python26 fails to build for the big-endian machines I tried, namely
> nslu2be. And as python25 was removed it is a real blocker for packages
> which DEPEND on pathon, which inturn is the case for php. And php I'm
> trying to get a version working again.
>
> do_compile tries to load a .so on the host which was build for armeb and
> complains about wrong byteorder. But there is no complain when
> MACHINE=nslu2le in which case the .so shouldn't be loadable, too (it's
> for arm after all, not x86). AND python25 used exactly the same
> do_compile method, and does not fail!
Yes yes, I know: python builds fine on all hosts ;-)
But here is a patch set which forces do_compile() to load shared
objects from STAGING_LIBDIR_NATIVE instead of work/python-2.6.1/
(which contains target code). Additionally I removed Makefile
patching which created senseless paths
(like /oestuff/.../arm/python/oestuff/...arm/python). Tested
on ixp4xxbe, nslu2be and nslu2le.
diff --git a/packages/python/python-2.6.1/07-ld_library_path.patch b/packages/python/python-2.6.1/07-ld_library_path.patch
new file mode 100644
index 0000000..bdc47d7
--- /dev/null
+++ b/packages/python/python-2.6.1/07-ld_library_path.patch
@@ -0,0 +1,16 @@
+# RUNSHARED uses cwd as LD_LIBRARY_PATH which contains target executable
+# code. LDLIBRARYDIR can be passed from the receipe to point to native
+# (host executable) code.
+
+diff -Naur Python-2.6.1.orig/configure.in Python-2.6.1/configure.in
+--- Python-2.6.1.orig/configure.in 2009-02-26 00:24:41.000000000 +0100
++++ Python-2.6.1/configure.in 2009-02-26 00:34:32.000000000 +0100
+@@ -707,7 +707,7 @@
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
+ LDLIBRARY='libpython$(VERSION).so'
+ BLDLIBRARY='-L. -lpython$(VERSION)'
+- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
++ RUNSHARED=LD_LIBRARY_PATH='${LDLIBRARYDIR}':${LD_LIBRARY_PATH}
+ case $ac_sys_system in
+ FreeBSD*)
+ SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
diff --git a/packages/python/python_2.6.1.bb b/packages/python/python_2.6.1.bb
index 57c64df..4ec9eae 100644
--- a/packages/python/python_2.6.1.bb
+++ b/packages/python/python_2.6.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "\
file://04-default-is-optimized.patch;patch=1 \
file://05-enable-ctypes-cross-build.patch;patch=1 \
file://06-libffi-enable-default-mips.patch;patch=1 \
+ file://07-ld_library_path.patch;patch=1 \
file://99-ignore-optimization-flag.patch;patch=1 \
\
# not yet pushed forward
@@ -41,17 +42,13 @@ do_compile_prepend() {
install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
- install -m 0644 Makefile Makefile.orig
- install -m 0644 Makefile Makefile.backup
- sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile
- install -m 0644 Makefile Makefile.backup
- sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile
install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
}
do_compile() {
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+ LDLIBRARYDIR=${STAGING_LIBDIR_NATIVE} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
@@ -61,6 +58,7 @@ do_compile() {
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+ LDLIBRARYDIR=${STAGING_LIBDIR_NATIVE} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
@@ -73,10 +71,9 @@ do_stage() {
}
do_install() {
- install -m 0644 Makefile.orig Makefile
-
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
+ LDLIBRARYDIR=${STAGING_LIBDIR_NATIVE} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
STAGING_INCDIR=${STAGING_INCDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
--
Vitus Jensen, Hannover, Germany, Earth, Milky Way, Universe (current)
prev parent reply other threads:[~2009-02-26 1:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-11 23:19 python roadmap Michael 'Mickey' Lauer
2009-01-14 14:47 ` Michael 'Mickey' Lauer
2009-02-05 8:35 ` Vitus Jensen
2009-02-17 6:35 ` Vitus Jensen
2009-02-17 8:09 ` Koen Kooi
2009-02-17 10:03 ` Vitus Jensen
2009-02-17 22:36 ` Vitus Jensen
2009-02-26 1:15 ` Vitus Jensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='go4qfk$oe2$1@ger.gmane.org' \
--to=vjensen@gmx.de \
--cc=openembedded-devel@lists.openembedded.org \
--cc=openembedded-devel@openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox