* Re: [ptxdist] python: don't create '$(PTXCONF_SYSROOT_CROSS)/bin/python' link
@ 2012-11-29 23:36 George McCollister
2012-11-30 22:11 ` Michael Olbrich
0 siblings, 1 reply; 5+ messages in thread
From: George McCollister @ 2012-11-29 23:36 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
Why did you decide to remove this link? This breaks several of my
package rules that use the waf build system. Specifically talloc and
tevent. Is there a case when you don't want to use CROSS_PYTHON? If
you did this to solve a specific problem let me know because I was
having some python related problems until I applied the attached
patch. Maybe you ran into this as well.
Regards,
George
[-- Attachment #2: 0001-python-Add-SYSROOT-to-path-in-python2.6-config.patch --]
[-- Type: application/octet-stream, Size: 2749 bytes --]
From 373b02e5a722414aa9e25e19c1563f245c1d49ea Mon Sep 17 00:00:00 2001
From: George McCollister <george.mccollister@gmail.com>
Date: Thu, 16 Dec 2010 07:56:48 -0600
Subject: [PATCH] python: Add SYSROOT to path in python2.6-config
Add SYSROOT to python path in python2.6-config so it works correctly.
Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
.../0020-python-add-sysroot-to-EXENAME-path.patch | 38 ++++++++++++++++++++++
patches/Python-2.6.6/series | 1 +
2 files changed, 39 insertions(+)
create mode 100644 patches/Python-2.6.6/0020-python-add-sysroot-to-EXENAME-path.patch
diff --git a/patches/Python-2.6.6/0020-python-add-sysroot-to-EXENAME-path.patch b/patches/Python-2.6.6/0020-python-add-sysroot-to-EXENAME-path.patch
new file mode 100644
index 0000000..af52bdb
--- /dev/null
+++ b/patches/Python-2.6.6/0020-python-add-sysroot-to-EXENAME-path.patch
@@ -0,0 +1,38 @@
+From 2229c9e1a3e657b7b3fadf9b2487caef3c501d08 Mon Sep 17 00:00:00 2001
+From: George McCollister <george.mccollister@gmail.com>
+Date: Wed, 15 Dec 2010 17:35:24 -0600
+Subject: [PATCH 20/20] python: add sysroot to EXENAME path.
+
+python2.6-config points to the wrong location for the host python
+binary.
+
+Signed-off-by: George McCollister <george.mccollister@gmail.com>
+---
+ Makefile.pre.in | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 99ca8be..085fff1 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -77,6 +77,8 @@ ifndef DESTDIR
+ sysroot= @SYSROOT@
+ endif
+
++SYSROOTFORCONFIG=@SYSROOT@
++
+ # Machine-dependent subdirectories
+ MACHDEP= @MACHDEP@
+
+@@ -974,7 +976,7 @@ libainstall: all
+ $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
+ # Substitution happens here, as the completely-expanded BINDIR
+ # is not available in configure
+- sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
++ sed -e "s,@EXENAME@,$(SYSROOTFORCONFIG)$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
+ $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
+ rm python-config
+ @if [ -s Modules/python.exp -a \
+--
+1.7.1
+
diff --git a/patches/Python-2.6.6/series b/patches/Python-2.6.6/series
index 3b95370..ab88a34 100644
--- a/patches/Python-2.6.6/series
+++ b/patches/Python-2.6.6/series
@@ -19,4 +19,5 @@
0017-python-don-t-add-rpaths-in-setup.py.patch
0018-assume-non-buggy-getaddrinfo-when-cross-compiling.patch
0019-also-build-_sha256-_sha512-if-openssl-is-not-found.patch
+0020-python-add-sysroot-to-EXENAME-path.patch
# 31950c9abe57324bafb77406b67f36fb - git-ptx-patches magic
--
1.8.0
[-- Attachment #3: Type: text/plain, Size: 48 bytes --]
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] python: don't create '$(PTXCONF_SYSROOT_CROSS)/bin/python' link
2012-11-29 23:36 [ptxdist] python: don't create '$(PTXCONF_SYSROOT_CROSS)/bin/python' link George McCollister
@ 2012-11-30 22:11 ` Michael Olbrich
2012-11-30 22:44 ` George McCollister
2012-11-30 22:55 ` George McCollister
0 siblings, 2 replies; 5+ messages in thread
From: Michael Olbrich @ 2012-11-30 22:11 UTC (permalink / raw)
To: ptxdist
Hi,
On Thu, Nov 29, 2012 at 05:36:21PM -0600, George McCollister wrote:
> Why did you decide to remove this link? This breaks several of my
> package rules that use the waf build system. Specifically talloc and
> tevent. Is there a case when you don't want to use CROSS_PYTHON? If
> you did this to solve a specific problem let me know because I was
> having some python related problems until I applied the attached
> patch. Maybe you ran into this as well.
The problem is, that this link hides the system python
($PTXDIST_TOPDIR}/bin/python). So packages that need python for building
sometimes get the wrong python (if python is built first).
Also, I don't see why it should break you packages. There is still a python
in PATH.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] python: don't create '$(PTXCONF_SYSROOT_CROSS)/bin/python' link
2012-11-30 22:11 ` Michael Olbrich
@ 2012-11-30 22:44 ` George McCollister
2012-11-30 22:55 ` George McCollister
1 sibling, 0 replies; 5+ messages in thread
From: George McCollister @ 2012-11-30 22:44 UTC (permalink / raw)
To: ptxdist
On 11/30/2012 04:11 PM, Michael Olbrich wrote:
> The problem is, that this link hides the system python
> ($PTXDIST_TOPDIR}/bin/python). So packages that need python for building
> sometimes get the wrong python (if python is built first).
> Also, I don't see why it should break you packages. There is still a python
> in PATH.
Breaks packages because talloc creates python bindings then tevent
checks for talloc python bindings before building its python bindings.
Seems like it would be a better idea to select HOST_PYTHON for packages
that require python to build. Then the same version would always be used.
Maybe I can find a clean way to force waf to use CROSS_PYTHON
Broken:
Excerpt from: talloc.prepare:
Checking for program
python
: /home/georgem/ptxdist.rebase.novatech-llc.com/bin/python
Checking for Python version >=
2.4.2 : ok 2.7.3
Checking for library
python2.7
: not found
Checking for library
python2.7
: not found
Checking for library
python27
: not found
Checking for program
python2.7-config
: /usr/bin/python2.7-config
Checking for custom
code
: Could not find the python development headers
Disabling pytalloc-util as python devel libs not found
'configure' finished successfully (27.534s)
finished target talloc.prepare
Excerpt from tevent.prepare:
Checking for system talloc >=
2.0.7 : yes
Checking for system pytalloc-util >=
2.0.7 : not found
ERROR: System library pytalloc-util of version 2.0.7 not found, and
bundling disabled
make: ***
[/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/state/tevent.prepare]
Error 1
Working:
Excerpt from: talloc.prepare:
Checking for program
python
:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python
Checking for Python version >=
2.4.2 : ok 2.6.6
Checking for library
python2.6
: yes
Checking for program
python2.6-config
:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python2.6-config
Checking for custom
code
: yes
'configure' finished successfully (27.606s)
finished target talloc.prepare
Excerpt from talloc.prepare:
Checking for system talloc >=
2.0.7 : yes
Checking for system pytalloc-util >=
2.0.7 : yes
Checking for program
xsltproc :
/usr/bin/xsltproc
Checking for stylesheet
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
: ok
Checking for program
python
:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python
Checking for program
python
:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python
Checking for Python version >=
2.4.2 : ok 2.6.6
Checking for library
python2.6
: yes
Checking for program
python2.6-config
:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python2.6-config
Checking for custom
code
: yes
Checking linker accepts
-Wl,-no-undefined
: yes
Checking linker accepts ['-undefined',
'dynamic_lookup'] : no
Checking for
epoll_create
: ok
Checking for program
python
:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python
Checking for Python version >=
2.4.2 : ok 2.6.6
Checking for python
headers
: using cache
Checking linker accepts
-Wl,-no-undefined
: yes
Checking linker accepts ['-undefined',
'dynamic_lookup'] : no
'configure' finished successfully (29.256s)
finished target tevent.prepare
--
George McCollister
Software Architect
NovaTech, LLC
13555 W. 107th Street
Lenexa, KS 66215
(913) 451-1880 (main)
(913) 742-4519 (direct)
george.mccollister@novatechweb.com
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] python: don't create '$(PTXCONF_SYSROOT_CROSS)/bin/python' link
2012-11-30 22:11 ` Michael Olbrich
2012-11-30 22:44 ` George McCollister
@ 2012-11-30 22:55 ` George McCollister
2012-12-01 9:11 ` Michael Olbrich
1 sibling, 1 reply; 5+ messages in thread
From: George McCollister @ 2012-11-30 22:55 UTC (permalink / raw)
To: ptxdist
On 11/30/2012 04:11 PM, Michael Olbrich wrote:
> The problem is, that this link hides the system python
> ($PTXDIST_TOPDIR}/bin/python). So packages that need python for
> building sometimes get the wrong python (if python is built first).
> Also, I don't see why it should break you packages. There is still a
> python in PATH.
Breaks packages because talloc creates python bindings then tevent
checks for talloc python bindings before building its python bindings.
Seems like it would be a better idea to select HOST_PYTHON for packages
that require python to build. Then the same version would always be used.
Maybe I can find a clean way to force waf to use CROSS_PYTHON
Broken:
Excerpt from: talloc.prepare:
Checking for program python:
/home/georgem/ptxdist.rebase.novatech-llc.com/bin/python
Checking for Python version >= 2.4.2: ok 2.7.3
Checking for library python2.7: not found
Checking for library python2.7: not found
Checking for library python27: not found
Checking for program python2.7-config: /usr/bin/python2.7-config
Checking for custom code: Could not find the python development headers
Disabling pytalloc-util as python devel libs not found
'configure' finished successfully (27.534s)
finished target talloc.prepare
Excerpt from tevent.prepare:
Checking for system talloc >= 2.0.7: yes
Checking for system pytalloc-util >= 2.0.7: not found
ERROR: System library pytalloc-util of version 2.0.7 not found, and
bundling disabled
make: ***
[/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/state/tevent.prepare]
Error 1
Working:
Excerpt from: talloc.prepare:
Checking for program python:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python
Checking for Python version >= 2.4.2: ok 2.6.6
Checking for library python2.6: yes
Checking for program python2.6-config:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python2.6-config
Checking for custom code: yes
'configure' finished successfully (27.606s)
finished target talloc.prepare
Excerpt from talloc.prepare:
Checking for system talloc >= 2.0.7: yes
Checking for system pytalloc-util >= 2.0.7: yes
Checking for program xsltproc: /usr/bin/xsltproc
Checking for stylesheet
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl: ok
Checking for program python
:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python
Checking for program python:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python
Checking for Python version >= 2.4.2: ok 2.6.6
Checking for library python2.6: yes
Checking for program python2.6-config:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python2.6-config
Checking for custom code: yes
Checking linker accepts -Wl,-no-undefined: yes
Checking linker accepts ['-undefined', 'dynamic_lookup']: no
Checking for epoll_create: ok
Checking for program python:
/home/georgem/workspace_linux-3.2-upstream-rebase_armeb/platform-armeb-xscale/sysroot-cross/bin/python
Checking for Python version >= 2.4.2: ok 2.6.6
Checking for python headers: using cache
Checking linker accepts -Wl,-no-undefined: yes
Checking linker accepts ['-undefined', 'dynamic_lookup']: no
'configure' finished successfully (29.256s)
finished target tevent.prepare
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] python: don't create '$(PTXCONF_SYSROOT_CROSS)/bin/python' link
2012-11-30 22:55 ` George McCollister
@ 2012-12-01 9:11 ` Michael Olbrich
0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2012-12-01 9:11 UTC (permalink / raw)
To: ptxdist
On Fri, Nov 30, 2012 at 04:55:40PM -0600, George McCollister wrote:
> On 11/30/2012 04:11 PM, Michael Olbrich wrote:
> >The problem is, that this link hides the system python
> >($PTXDIST_TOPDIR}/bin/python). So packages that need python for
> >building sometimes get the wrong python (if python is built first).
> >Also, I don't see why it should break you packages. There is still a
> >python in PATH.
> Breaks packages because talloc creates python bindings then tevent
> checks for talloc python bindings before building its python bindings.
> Seems like it would be a better idea to select HOST_PYTHON for packages
> that require python to build. Then the same version would always be used.
>
> Maybe I can find a clean way to force waf to use CROSS_PYTHON
Look at the other patches I've committed. Most setting
PYTHON=$(CROSS_PYTHON) in *_CONF_ENV usually helps.
michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-01 9:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29 23:36 [ptxdist] python: don't create '$(PTXCONF_SYSROOT_CROSS)/bin/python' link George McCollister
2012-11-30 22:11 ` Michael Olbrich
2012-11-30 22:44 ` George McCollister
2012-11-30 22:55 ` George McCollister
2012-12-01 9:11 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox