Skip to contentSkip to conversation

pull request 20120327

PATCH Applied Steffen Sledz 3 participants 9 messages Mar 27, 2012 – Mar 29, 2012

lore
Share & tools
lore
#0 lore raw

cover pull request 20120327

Hi Tom,

please pull these commits cherry-picked from oe.dev. The fix some python build problems.
All are well tested in our own environment.

Thx,
Steffen

The following changes since commit ec639a6b04449ef8e064e7bf35660ab31c3e2eee:

libmatthew-0.7.1: SRC_URI updated (2012-03-24 07:16:26 +0100)

are available in the git repository at:
git://git.openembedded.org/openembedded sledz/pull3
http://cgit.openembedded.org/cgit.cgi/openembedded/log/?h=sledz/pull3

Paul Menzel (1):
python-scons_1.3.0: add python-native to DEPENDS_virtclass-native

Simon Busch (1):
python-2.6.6: backport pkgconfig support from version 2.7.1 and bump PR

Ulf Samuelsson (1):
python-2.6.6: Fix python-2.6.6 build failure on linux-3.x

 .../python/python-2.6.6/07-linux3-regen-fix.patch  |   18 ++++
 .../python/python-2.6.6/pkgconfig-support.patch    |   94 ++++++++++++++++++++
 recipes/python/python-scons_1.3.0.bb               |    1 +
 recipes/python/python_2.6.6.bb                     |    4 +-
 4 files changed, 116 insertions(+), 1 deletions(-)
 create mode 100644 recipes/python/python-2.6.6/07-linux3-regen-fix.patch
 create mode 100644 recipes/python/python-2.6.6/pkgconfig-support.patch
Signature · 1 line
1.7.7
#1 lore raw

PATCH 1/3 python-scons_1.3.0: add `python-native` to `DEPENDS_virtclass-native`

From: Paul Menzel <[email protected]>

A clean build fails with the following error [1].

| ERROR: Function 'do_compile' failed (see /home/sgh/oe-new-oe/build-vmc16/tmp/work/x86_64-linux/python-scons-native-1.3.0-r1/temp/log.do_compile.26596 for further information)
| + cd /home/sgh/oe-new-oe/build-vmc16/tmp/work/x86_64-linux/python-scons-native-1.3.0-r1/scons-1.3.0
| + do_compile
| + distutils_do_compile
| + STAGING_INCDIR=/home/sgh/oe-new-oe/build-vmc16/tmp/sysroots/x86_64-linux/usr/include
| + STAGING_LIBDIR=/home/sgh/oe-new-oe/build-vmc16/tmp/sysroots/x86_64-linux/usr/lib
| + BUILD_SYS=x86_64-linux
| + HOST_SYS=x86_64-linux
| + /home/sgh/oe-new-oe/build-vmc16/tmp/sysroots/x86_64-linux/usr/bin/python setup.py build
| /home/sgh/oe-new-oe/build-vmc16/tmp/work/x86_64-linux/python-scons-native-1.3.0-r1/temp/run.do_compile.26596: line 94: /home/sgh/oe-new-oe/build-vmc16/tmp/sysroots/x86_64-linux/usr/bin/python: No such file or directory
| + oefatal 'python setup.py build_ext execution failed.'
| + echo FATAL: 'python setup.py build_ext execution failed.'

Adding python-native to DEPENDS_virtclass-native as suggested in [1] and done for python-scons-native_1.2.0 fixes the issue.

[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-April/032180.html

---
 recipes/python/python-scons_1.3.0.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
recipes/python/python-scons_1.3.0.bb +1 -0
index 82231f2..5a412cb 100644
@@ -2,6 +2,7 @@ DESCRIPTION = "A Software Construction Tool"
 SECTION = "devel/python"
 PRIORITY = "optional"
 LICENSE = "MIT"
+DEPENDS_virtclass-native = "python-native"
 SRCNAME = "scons"
 PR = "r1"
 
Signature · 1 line
1.7.7
#2 lore raw

PATCH 2/3 python-2.6.6: backport pkgconfig support from version 2.7.1 and bump PR

From: Simon Busch <[email protected]>

Version 2.6.6 of python does not have support for pkgconfig and 2.7.1 is not yet ready in OE so I back-ported the new pkgconfig feature to 2.6.6.

---
 .../python/python-2.6.6/pkgconfig-support.patch    |   94 ++++++++++++++++++++
 recipes/python/python_2.6.6.bb                     |    3 +-
 2 files changed, 96 insertions(+), 1 deletions(-)
 create mode 100644 recipes/python/python-2.6.6/pkgconfig-support.patch
recipes/python/python-2.6.6/pkgconfig-support.patch new file +94 -0
new file mode 100644
index 0000000..d970b00
@@ -0,0 +1,94 @@
+diff -Naur Python-2.6.6-orig/Makefile.pre.in Python-2.6.6/Makefile.pre.in
+--- Python-2.6.6-orig/Makefile.pre.in	2010-08-02 00:05:31.000000000 +0200
++++ Python-2.6.6/Makefile.pre.in	2011-05-24 21:16:19.943550002 +0200
+@@ -763,6 +763,9 @@
+ 	(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
+ 	-rm -f $(DESTDIR)$(BINDIR)/python-config
+ 	(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
++	-test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC)
++	-rm -f $(DESTDIR)$(LIBPC)/python.pc
++	(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python.pc)
+ 
+ # Install the interpreter with $(VERSION) affixed
+ # This goes into $(exec_prefix)
+@@ -936,8 +939,12 @@
+ # Install the library and miscellaneous stuff needed for extending/embedding
+ # This goes into $(exec_prefix)
+ LIBPL=		$(LIBP)/config
++
++# pkgconfig directory
++LIBPC=		$(LIBDIR)/pkgconfig
++
+ libainstall:	all
+-	@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
++	@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
+ 	do \
+ 		if test ! -d $(DESTDIR)$$i; then \
+ 			echo "Creating directory $$i"; \
+@@ -964,6 +971,7 @@
+ 	$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
+ 	$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
+ 	$(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
++	$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
+ 	$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
+ 	$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
+ 	# Substitution happens here, as the completely-expanded BINDIR
+@@ -1159,7 +1167,8 @@
+ # Keep configure and Python-ast.[ch], it's possible they can't be generated
+ distclean: clobber
+ 	-rm -f core Makefile Makefile.pre config.status \
+-		Modules/Setup Modules/Setup.local Modules/Setup.config
++		Modules/Setup Modules/Setup.local Modules/Setup.config \
++		Misc/python.pc
+ 	find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
+ 			   -o -name '[@,#]*' -o -name '*.old' \
+ 			   -o -name '*.orig' -o -name '*.rej' \
+diff -Naur Python-2.6.6-orig/Misc/python.pc.in Python-2.6.6/Misc/python.pc.in
+--- Python-2.6.6-orig/Misc/python.pc.in	1970-01-01 01:00:00.000000000 +0100
++++ Python-2.6.6/Misc/python.pc.in	2011-05-24 21:09:22.733550002 +0200
+@@ -0,0 +1,13 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: Python
++Description: Python library
++Requires: 
++Version: @VERSION@
++Libs.private: @LIBS@
++Libs: -L${libdir} -lpython@VERSION@
++Cflags: -I${includedir}/python@VERSION@ 
++
+diff -Naur Python-2.6.6-orig/configure Python-2.6.6/configure
+--- Python-2.6.6-orig/configure	2010-05-25 04:27:03.000000000 +0200
++++ Python-2.6.6/configure	2011-05-24 21:14:55.553550001 +0200
+@@ -12863,7 +12863,7 @@
+ $as_echo "done" >&6; }
+ 
+ # generate output files
+-ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
++ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
+ 
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -13557,6 +13557,7 @@
+     "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
+     "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
+     "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
++    "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
+ 
+   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+   esac
+diff -Naur Python-2.6.6-orig/configure.in Python-2.6.6/configure.in
+--- Python-2.6.6-orig/configure.in	2010-05-25 04:27:03.000000000 +0200
++++ Python-2.6.6/configure.in	2011-05-24 21:09:53.733550001 +0200
+@@ -3935,7 +3935,7 @@
+ AC_MSG_RESULT(done)
+ 
+ # generate output files
+-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config)
++AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
+ AC_OUTPUT
+ 
+ echo "creating Modules/Setup"
recipes/python/python_2.6.6.bb +2 -1
index 3c054bb..eacc5c2 100644
@@ -3,7 +3,7 @@ DEPENDS = "python-native db gdbm openssl readline sqlite3 tcl zlib\
            ${@base_contains('DISTRO_FEATURES', 'tk', 'tk', '', d)}"
 DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
 # set to .0 on every increase of INC_PR
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
 
 SRC_URI = "\
   http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
@@ -17,6 +17,7 @@ SRC_URI = "\
   file://ipv6-cross.patch \
   file://python-module-rpath-fix.patch \
   file://sitecustomize.py \
+  file://pkgconfig-support.patch \
 "
 SRC_URI[md5sum] = "cf4e6881bb84a7ce6089e4a307f71f14"
 SRC_URI[sha256sum] = "134c5e0736bae2e5570d0b915693374f11108ded63c35a23a35d282737d2ce83"
Signature · 1 line
1.7.7
#3 lore raw

PATCH 3/3 python-2.6.6: Fix python-2.6.6 build failure on linux-3.x

In reply to Steffen Sledz

From: Ulf Samuelsson <[email protected]>

python-2.6.6 build will crash when host is running linux kernel 3.x.

Fix backported from openembedded-core. meta/recipes-devtools/python/python/07-linux3-regen-fix.patch

---
 .../python/python-2.6.6/07-linux3-regen-fix.patch  |   18 ++++++++++++++++++
 recipes/python/python_2.6.6.bb                     |    3 ++-
 2 files changed, 20 insertions(+), 1 deletions(-)
 create mode 100644 recipes/python/python-2.6.6/07-linux3-regen-fix.patch
recipes/python/python-2.6.6/07-linux3-regen-fix.patch new file +18 -0
new file mode 100644
index 0000000..a059605
@@ -0,0 +1,18 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Without this patch it calls cross-compiled python if host is running linux-3.0
+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
+| ./regen: line 3: /OE/shr-core/tmp/work/armv4t-oe-linux-gnueabi/python-2.6.6-nk2.8/Python-2.6.6/python: cannot execute binary file
+
+diff -uNr Python-2.6.6.orig//Lib/plat-linux3/regen Python-2.6.6/Lib/plat-linux3/regen
+--- Python-2.6.6.orig//Lib/plat-linux3/regen 1970-01-01 01:00:00.000000000 +0100
++++ Python-2.6.6/Lib/plat-linux3/regen 2001-08-09 14:48:17.000000000 +0200
+@@ -0,0 +1,8 @@
++#! /bin/sh
++case `uname` in
++Linux*) ;;
++*) echo Probably not on a Linux system 1>&2
++ exit 1;;
++esac
++set -v
++h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
recipes/python/python_2.6.6.bb +2 -1
index eacc5c2..5b47fec 100644
@@ -3,7 +3,7 @@ DEPENDS = "python-native db gdbm openssl readline sqlite3 tcl zlib\
            ${@base_contains('DISTRO_FEATURES', 'tk', 'tk', '', d)}"
 DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
 # set to .0 on every increase of INC_PR
-PR = "${INC_PR}.3"
+PR = "${INC_PR}.4"
 
 SRC_URI = "\
   http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
@@ -14,6 +14,7 @@ SRC_URI = "\
   file://04-default-is-optimized.patch \
   file://05-enable-ctypes-cross-build.patch \
   file://06-ctypes-libffi-fix-configure.patch \
+  file://07-linux3-regen-fix.patch \
   file://ipv6-cross.patch \
   file://python-module-rpath-fix.patch \
   file://sitecustomize.py \
Signature · 1 line
1.7.7
#4 lore raw

Re: [2011.03-maintenance 3/3] python-2.6.6: Fix python-2.6.6 build failure on linux-3.x

Quoted 6 lines · Steffen Sledz

From: Ulf Samuelsson <[email protected]>

python-2.6.6 build will crash when host is running linux kernel 3.x.

Fix backported from openembedded-core. meta/recipes-devtools/python/python/07-linux3-regen-fix.patch

This patch has been superseded by a backport from upstream python, causing linux2 to be used for all kernel versions. See commit accb2b728ab10cae20be59253a56ac6410b8de10 in oe-core.

Quoted 52 lines
---
 .../python/python-2.6.6/07-linux3-regen-fix.patch  |   18 ++++++++++++++++++
 recipes/python/python_2.6.6.bb                     |    3 ++-
 2 files changed, 20 insertions(+), 1 deletions(-)
 create mode 100644 recipes/python/python-2.6.6/07-linux3-regen-fix.patch
recipes/python/python-2.6.6/07-linux3-regen-fix.patch new file +18 -0
new file mode 100644
index 0000000..a059605
@@ -0,0 +1,18 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Without this patch it calls cross-compiled python if host is running linux-3.0
+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
+| ./regen: line 3: /OE/shr-core/tmp/work/armv4t-oe-linux-gnueabi/python-2.6.6-nk2.8/Python-2.6.6/python: cannot execute binary file
+
+diff -uNr Python-2.6.6.orig//Lib/plat-linux3/regen Python-2.6.6/Lib/plat-linux3/regen
+--- Python-2.6.6.orig//Lib/plat-linux3/regen 1970-01-01 01:00:00.000000000 +0100
++++ Python-2.6.6/Lib/plat-linux3/regen 2001-08-09 14:48:17.000000000 +0200
+@@ -0,0 +1,8 @@
++#! /bin/sh
++case `uname` in
++Linux*) ;;
++*) echo Probably not on a Linux system 1>&2
++ exit 1;;
++esac
++set -v
++h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
recipes/python/python_2.6.6.bb +2 -1
index eacc5c2..5b47fec 100644
@@ -3,7 +3,7 @@ DEPENDS = "python-native db gdbm openssl readline sqlite3 tcl zlib\
            ${@base_contains('DISTRO_FEATURES', 'tk', 'tk', '', d)}"
 DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
 # set to .0 on every increase of INC_PR
-PR = "${INC_PR}.3"
+PR = "${INC_PR}.4"
 
 SRC_URI = "\
   http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
@@ -14,6 +14,7 @@ SRC_URI = "\
   file://04-default-is-optimized.patch \
   file://05-enable-ctypes-cross-build.patch \
   file://06-ctypes-libffi-fix-configure.patch \
+  file://07-linux3-regen-fix.patch \
   file://ipv6-cross.patch \
   file://python-module-rpath-fix.patch \
   file://sitecustomize.py \
#5 lore raw

Re: [2011.03-maintenance 3/3] python-2.6.6: Fix python-2.6.6 build failure on linux-3.x

Quoted 11 lines · Andreas Oberritter
Quoted 6 lines · Steffen Sledz

From: Ulf Samuelsson <[email protected]>

python-2.6.6 build will crash when host is running linux kernel 3.x.

Fix backported from openembedded-core. meta/recipes-devtools/python/python/07-linux3-regen-fix.patch

This patch has been superseded by a backport from upstream python, causing linux2 to be used for all kernel versions. See commit accb2b728ab10cae20be59253a56ac6410b8de10 in oe-core.

Is this patch available in oe-classic master?

I'm just trying to keep the 2011.03-maintenance branch usable with a minimum of work. And the one from the pull request is good enough for me at the moment.

Steffen

Signature · 7 lines
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:[email protected]
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
#6 lore raw

Re: [2011.03-maintenance 3/3] python-2.6.6: Fix python-2.6.6 build failure on linux-3.x

Quoted 6 lines · Steffen Sledz
Quoted 5 lines · Andreas Oberritter
Quoted 4 lines · Steffen Sledz

From: Ulf Samuelsson <[email protected]>

python-2.6.6 build will crash when host is running linux kernel 3.x.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Fix backported from openembedded-core. meta/recipes-devtools/python/python/07-linux3-regen-fix.patch

This patch has been superseded by a backport from upstream python, causing linux2 to be used for all kernel versions. See commit accb2b728ab10cae20be59253a56ac6410b8de10 in oe-core.

Is this patch available in oe-classic master?

I don't know.

Quoted 1 line

I'm just trying to keep the 2011.03-maintenance branch usable with a minimum of work. And the one from the pull request is good enough for me at the moment.

I don't want to block your pull request. I was just trying to make you aware of problems that have already been fixed in oe-core. Building python on 32-bit vs. 64-bit build systems and on 2.x vs. 3.x kernels (running on the build system) produces different results, even with this patch applied. Some of these problems have already been fixed in oe-core, some are still pending (patches were sent to the oe-core mailing list).

Regards,
Andreas

#7 lore raw

Re: [2011.03-maintenance 3/3] python-2.6.6: Fix python-2.6.6 build failure on linux-3.x

Quoted 20 lines · Andreas Oberritter
Quoted 6 lines · Steffen Sledz
Quoted 5 lines · Andreas Oberritter
Quoted 4 lines · Steffen Sledz

From: Ulf Samuelsson <[email protected]>

python-2.6.6 build will crash when host is running linux kernel 3.x.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Fix backported from openembedded-core. meta/recipes-devtools/python/python/07-linux3-regen-fix.patch

This patch has been superseded by a backport from upstream python, causing linux2 to be used for all kernel versions. See commit accb2b728ab10cae20be59253a56ac6410b8de10 in oe-core.

Is this patch available in oe-classic master?

I don't know.

Quoted 1 line

I'm just trying to keep the 2011.03-maintenance branch usable with a minimum of work. And the one from the pull request is good enough for me at the moment.

Quoted 7 lines

I don't want to block your pull request. I was just trying to make you aware of problems that have already been fixed in oe-core. Building python on 32-bit vs. 64-bit build systems and on 2.x vs. 3.x kernels (running on the build system) produces different results, even with this patch applied. Some of these problems have already been fixed in oe-core, some are still pending (patches were sent to the oe-core mailing list).

Tom, would be nice, if you accept my pull request for the moment.

*If* i have some time later i can try to have a look at oe-core stuff. Or may be someone else.

Thx,
Steffen

Signature · 7 lines
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:[email protected]
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
Applied
#8 lore raw
In reply to Steffen Sledz
Quoted 26 lines · Steffen Sledz

Hi Tom,

please pull these commits cherry-picked from oe.dev. The fix some python build problems.
All are well tested in our own environment.

Thx,
Steffen

The following changes since commit ec639a6b04449ef8e064e7bf35660ab31c3e2eee:

libmatthew-0.7.1: SRC_URI updated (2012-03-24 07:16:26 +0100)

are available in the git repository at:
git://git.openembedded.org/openembedded sledz/pull3
http://cgit.openembedded.org/cgit.cgi/openembedded/log/?h=sledz/pull3

Paul Menzel (1):
python-scons_1.3.0: add python-native to DEPENDS_virtclass-native

Simon Busch (1):
python-2.6.6: backport pkgconfig support from version 2.7.1 and bump PR

Ulf Samuelsson (1):
python-2.6.6: Fix python-2.6.6 build failure on linux-3.x

Quoted 7 lines
 .../python/python-2.6.6/07-linux3-regen-fix.patch  |   18 ++++
 .../python/python-2.6.6/pkgconfig-support.patch    |   94 ++++++++++++++++++++
 recipes/python/python-scons_1.3.0.bb               |    1 +
 recipes/python/python_2.6.6.bb                     |    4 +-
 4 files changed, 116 insertions(+), 1 deletions(-)
 create mode 100644 recipes/python/python-2.6.6/07-linux3-regen-fix.patch
 create mode 100644 recipes/python/python-2.6.6/pkgconfig-support.patch

Applied, thanks!

Signature · 1 line
Tom