Hi, Am 28.02.2011 um 23:38 schrieb Michael Olbrich:
> Hi, > > this patch is broken too. > Some more comments below. Hmm ... > On Mon, Feb 28, 2011 at 10:14:55AM +0100, Daniel Kriesten wrote: >> Even if we are cross compiling we have some default paths which should be >> consulted for the modules to be linked against. >> >> Signed-off-by: Daniel Kriesten <[email protected]> >> --- >> ...e-default-pathes-to-lib_dris-and-inc_dirs.patch | 33 >> ++++++++++++++++++++ >> patches/Python-2.6.6/series | 3 +- >> 2 files changed, 34 insertions(+), 2 deletions(-) >> >> diff --git >> a/patches/Python-2.6.6/0018-add-some-default-pathes-to-lib_dris-and-inc_dirs.patch >> >> b/patches/Python-2.6.6/0018-add-some-default-pathes-to-lib_dris-and-inc_dirs.patch >> new file mode 100644 >> index 0000000..21b74c4 >> --- /dev/null >> +++ >> b/patches/Python-2.6.6/0018-add-some-default-pathes-to-lib_dris-and-inc_dirs.patch >> @@ -0,0 +1,33 @@ >> +From 0b56e8d610c2c726b42a869fbff3937f100a14ed Mon Sep 17 00:00:00 2001 >> +From: Daniel Kriesten <[email protected]> >> +Date: Fri, 25 Feb 2011 09:36:48 +0100 >> +Subject: [PATCH] add some default pathes to lib_dris and inc_dirs if cross >> compiling >> + >> +Signed-off-by: Daniel Kriesten <[email protected]> >> +--- >> + setup.py | 9 +++++++++ >> + 1 files changed, 9 insertions(+), 0 deletions(-) >> + >> +diff --git a/setup.py b/setup.py >> +index 8c86ed8..3969a23 100644 >> +--- a/setup.py >> ++++ b/setup.py >> +@@ -364,6 +364,15 @@ class PyBuildExt(build_ext): >> + if os.environ.get('CROSS_COMPILING') != 'yes': >> + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') >> + add_dir_to_list(self.compiler.include_dirs, >> '/usr/local/include') >> ++ else: >> ++ # we still have kind of standard path stuff >> ++ # and all the LDFLAG stuf doesn'T seem to work for us? >> ++ print "CROSS_COMPILING; adding _python_sysroot to lib and inc >> path" >> ++ add_dir_to_list(self.compiler.library_dirs, >> os.environ.get('_python_sysroot')+"/lib") >> ++ add_dir_to_list(self.compiler.library_dirs, >> os.environ.get('_python_sysroot')+"/usr/lib") >> ++ add_dir_to_list(self.compiler.include_dirs, >> os.environ.get('_python_sysroot')+"/include") >> ++ add_dir_to_list(self.compiler.include_dirs, >> os.environ.get('_python_sysroot')+"/usr/include") > > Can you give an example where this is necessary? Right now I use it to reproducible build _tkinter.so. I tried the official way modifying Setup, Setup.{dist,local} to build _tkinter.so and enable readline support on a ppc target. But all three ways did not replay correctly in all cases and I could not fully figure out why. By the time I can only guess it is a strange behavior in setup.py. It checks for the dependencies (like readline.so and Tcl/Tk) before Setup.dist is read an evaluated. So the -L and -I flags given in Setup.dist fail and the modules are not build. > >> ++ >> + >> + # Add paths specified in the environment variables LDFLAGS and >> + # CPPFLAGS for header and library files. >> +-- >> +1.7.3.4 >> + >> diff --git a/patches/Python-2.6.6/series b/patches/Python-2.6.6/series >> index c99720e..296dfa0 100644 >> --- a/patches/Python-2.6.6/series >> +++ b/patches/Python-2.6.6/series >> @@ -1,4 +1,3 @@ >> -# generated by git-ptx-patches >> 0001-Add-support-for-socketcan-to-the-python-socket-modul.patch >> 0002-printf-format-zd.patch >> 0003-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch >> @@ -16,4 +15,4 @@ >> 0015-0017-fix-for-new-autoconf.diff.patch >> 0016-0018-dont-add-rpaths.diff.patch >> 0017-assume-non-buggy-getaddrinfo-when-cross-compiling.patch >> -# af3d1249cd85718d1faf28b107c2d3df - git-ptx-patches magic >> +0018-add-some-default-pathes-to-lib_dris-and-inc_dirs.patch > > Try "git ptx-patches" to export the patches. ptxdist creates this alias to > make exporting patches easier. Ok, will try it. > > Michael > >> -- >> 1.7.3.4 >> >> >> -- >> ptxdist mailing list >> [email protected] >> > > -- > 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 > [email protected] > regards, Daniel -- Daniel Kriesten Chair for Circuit and System Design Chemnitz University of Technology, Reichenhainer Str. 70, D-09126 Chemnitz Phone: +49 371 531-33158, Fax: +49 371 531-833158 http://www.tu-chemnitz.de/etit/sse -- ptxdist mailing list [email protected]
