On Sun, Feb 03, 2013 at 11:21:54AM +0100, Julien Cristau wrote: > On Sat, Jan 26, 2013 at 16:30:04 +0000, Javi Merino wrote: > > > On Sat, Jan 26, 2013 at 01:45:44PM +0000, Javi Merino wrote: > > > Hi Laszlo, > > > > > > On Fri, 21 Dec 2012 22:50:40 +0000, Laszlo Boszormenyi wrote: > > > > On Wed, 2012-12-19 at 19:55 +0000, Adam D. Barratt wrote: > > > > > On Sat, 2012-11-24 at 13:34 +0000, Adam D. Barratt wrote: > > > > > > On Fri, 2012-11-09 at 23:08 +0100, Jelmer Vernooij wrote: > > > > > > > On Fri, 2012-11-09 at 06:08 +0000, Adam D. Barratt wrote: > > > > > > > > It also itself FTBFS on a few architectures - see > > > > > > > > https://buildd.debian.org/status/package.php?p=python-greenlet&suite=wheezy ; armel and mips{,el} are regressions from the current testing package. > > > > > > > > > > > > > > > Thanks, I should've noticed that but hadn't. This is quite surprising > > > > > > > too, I don't see anything in the NMU that might be the cause of this. > > > > > > > > > > > > I suspect the issue was already there - see #665890, which is also fixed > > > > > > in sid already. > > > > > > > > > > Laszlo, any chance of a fixed version? > > > > The good is that upstream uses git, I could check the individual > > > > commits. The bad is that the places where it FTBFS are assembly codes. > > > > Upstream reworked that parts with the relevant C code as well. So it's > > > > not easy, I'd say impossible for me to backport those changes. I don't > > > > speak ARM nor Sparc ASM at least. > > > > > > You can find more info on how to fix the FTBFS in armel in #697406. > > > Peter says that building python-greenlet from TPU with the version of > > > platform/switch_arm32_gcc.h from 0.4.0 solves the issue in armel. > > > > I've uploaded python-greenlet_0.3.1-2.2 to TPU which fixes the build > > for armel (tested in a porterbox). This won't fix the SPARC one > > though. > > > Are the debdiffs for the various NMUs in the BTS somewhere? I've attached them to this email. > 0.3.1-2.3 > seems to add /usr/share/dpkg/buildflags.mk to debian/rules, with no > build-dependency, which is not the same thing as "compile with -O2 on > mipsel". Why? That was an overlook on my side, I should fix that. Or are you saying that adding /usr/share/dpkg/buildflags.mk is not the right way of fixing this? Cheers, Javi
diff -Nru python-greenlet-0.3.1/debian/changelog python-greenlet-0.3.1/debian/changelog --- python-greenlet-0.3.1/debian/changelog 2012-08-25 15:05:43.000000000 +0100 +++ python-greenlet-0.3.1/debian/changelog 2013-01-26 15:57:17.000000000 +0000 @@ -1,3 +1,13 @@ +python-greenlet (0.3.1-2.2) wheezy-proposed-updates; urgency=low + + * Non-maintainer upload. + * Fix "python-greenlet FTBFS on armel in testing" by using + platform/switch_arm32_gcc.h from 0.4.0 to avoid compile errors in + armel (Closes: #697406) (Thanks to Peter Michael Green + <plugwash@raspbian.org>) + + -- Javi Merino <vicho@debian.org> Sat, 26 Jan 2013 14:40:01 +0000 + python-greenlet (0.3.1-2.1) wheezy-proposed-updates; urgency=low * Non-maintainer upload. diff -Nru python-greenlet-0.3.1/debian/patches/series python-greenlet-0.3.1/debian/patches/series --- python-greenlet-0.3.1/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ python-greenlet-0.3.1/debian/patches/series 2013-01-04 21:56:14.000000000 +0000 @@ -0,0 +1 @@ +switch_arm32_update.patch diff -Nru python-greenlet-0.3.1/debian/patches/switch_arm32_update.patch python-greenlet-0.3.1/debian/patches/switch_arm32_update.patch --- python-greenlet-0.3.1/debian/patches/switch_arm32_update.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-greenlet-0.3.1/debian/patches/switch_arm32_update.patch 2013-01-26 14:07:26.000000000 +0000 @@ -0,0 +1,64 @@ +Description: use platform/switch_arm32_gcc.h from 0.4.0 to avoid compile errors +Author: Peter Michael Green <plugwash@raspbian.org> +Bug-Debian: http://bugs.debian.org/697406 + +--- python-greenlet-0.3.1.orig/platform/switch_arm32_gcc.h ++++ python-greenlet-0.3.1/platform/switch_arm32_gcc.h +@@ -25,26 +25,51 @@ + + #ifdef SLP_EVAL + #define STACK_MAGIC 0 +-#define REGS_TO_SAVE /*"r1", "r2", "r3", "r4",*/ "r5", "r6", "fp", "ip", "lr" ++#define REG_SP "sp" ++#define REG_SPSP "sp,sp" ++#ifdef __thumb__ ++#define REG_FP "r7" ++#define REG_FPFP "r7,r7" ++#define REGS_TO_SAVE_GENERAL "r4", "r5", "r6", "r8", "r9", "r10", "r11", "lr" ++#else ++#define REG_FP "fp" ++#define REG_FPFP "fp,fp" ++#define REGS_TO_SAVE_GENERAL "r4", "r5", "r6", "r7", "r8", "r9", "lr" ++#endif ++#if defined(__SOFTFP__) ++#define REGS_TO_SAVE REGS_TO_SAVE_GENERAL ++#elif defined(__VFP_FP__) ++#define REGS_TO_SAVE REGS_TO_SAVE_GENERAL, "d8", "d9", "d10", "d11", \ ++ "d12", "d13", "d14", "d15" ++#elif defined(__MAVERICK__) ++#define REGS_TO_SAVE REGS_TO_SAVE_GENERAL, "mvf4", "mvf5", "mvf6", "mvf7", \ ++ "mvf8", "mvf9", "mvf10", "mvf11", \ ++ "mvf12", "mvf13", "mvf14", "mvf15" ++#else ++#define REGS_TO_SAVE REGS_TO_SAVE_GENERAL, "f4", "f5", "f6", "f7" ++#endif + + static int + slp_switch(void) + { ++ void *fp; + register int *stackref, stsizediff; + __asm__ volatile ("" : : : REGS_TO_SAVE); +- __asm__ ("mov %0,sp" : "=g" (stackref)); ++ __asm__ volatile ("mov r0," REG_FP "\n\tstr r0,%0" : "=m" (fp) : : "r0"); ++ __asm__ ("mov %0," REG_SP : "=r" (stackref)); + { + SLP_SAVE_STATE(stackref, stsizediff); + __asm__ volatile ( +- "add sp,sp,%0\n" +- "add fp,fp,%0\n" ++ "add " REG_SPSP ",%0\n" ++ "add " REG_FPFP ",%0\n" + : + : "r" (stsizediff) + ); + SLP_RESTORE_STATE(); +- return 0; + } ++ __asm__ volatile ("ldr r0,%0\n\tmov " REG_FP ",r0" : : "m" (fp) : "r0"); + __asm__ volatile ("" : : : REGS_TO_SAVE); ++ return 0; + } + + #endif +\ No newline at end of file
diff -Nru python-greenlet-0.3.1/debian/changelog python-greenlet-0.3.1/debian/changelog --- python-greenlet-0.3.1/debian/changelog 2013-01-26 15:57:17.000000000 +0000 +++ python-greenlet-0.3.1/debian/changelog 2013-01-27 19:30:58.000000000 +0000 @@ -1,3 +1,13 @@ +python-greenlet (0.3.1-2.3) wheezy-proposed-updates; urgency=low + + * Non-maintainer upload. + * Fix FTBFS in mipsel by compiling with -O2 which optimizes out the + buggy code (Closes: #665890) + * Fix "FTBFS on sparc" by adding fix_sparc_support.patch from upstream + (Closes: #699102) + + -- Javi Merino <vicho@debian.org> Sun, 27 Jan 2013 19:30:58 +0000 + python-greenlet (0.3.1-2.2) wheezy-proposed-updates; urgency=low * Non-maintainer upload. diff -Nru python-greenlet-0.3.1/debian/patches/fix_sparc_support.patch python-greenlet-0.3.1/debian/patches/fix_sparc_support.patch --- python-greenlet-0.3.1/debian/patches/fix_sparc_support.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-greenlet-0.3.1/debian/patches/fix_sparc_support.patch 2013-01-27 19:04:13.000000000 +0000 @@ -0,0 +1,28 @@ +Author: unixtool1192 <unixtool1192@gmail.com> +Origin: https://github.com/python-greenlet/greenlet/commit/619ab917e3ab47be7642ced21c8cfd8e8182844b +Description: add support for debian sparc and openbsd5-sparc64 + +--- a/platform/switch_sparc_sun_gcc.h ++++ b/platform/switch_sparc_sun_gcc.h +@@ -19,9 +19,9 @@ + + #ifdef SLP_EVAL + +-#include <sys/trap.h> + + #define STACK_MAGIC 0 ++#define ST_FLUSH_WINDOWS 3 + + static int + slp_switch(void) +--- a/slp_platformselect.h ++++ b/slp_platformselect.h +@@ -12,7 +12,7 @@ + #include "platform/switch_ppc_unix.h" /* gcc on PowerPC */ + #elif defined(__GNUC__) && defined(__ppc__) && defined(__APPLE__) + #include "platform/switch_ppc_macosx.h" /* Apple MacOS X on PowerPC */ +-#elif defined(__GNUC__) && defined(sparc) && defined(sun) ++#elif defined(__GNUC__) && defined(sparc) + #include "platform/switch_sparc_sun_gcc.h" /* SunOS sparc with gcc */ + #elif defined(__GNUC__) && defined(__s390__) && defined(__linux__) + #include "platform/switch_s390_unix.h" /* Linux/S390 */ diff -Nru python-greenlet-0.3.1/debian/patches/series python-greenlet-0.3.1/debian/patches/series --- python-greenlet-0.3.1/debian/patches/series 2013-01-04 21:56:14.000000000 +0000 +++ python-greenlet-0.3.1/debian/patches/series 2013-01-27 19:05:55.000000000 +0000 @@ -1 +1,2 @@ switch_arm32_update.patch +fix_sparc_support.patch diff -Nru python-greenlet-0.3.1/debian/rules python-greenlet-0.3.1/debian/rules --- python-greenlet-0.3.1/debian/rules 2013-01-26 13:57:46.000000000 +0000 +++ python-greenlet-0.3.1/debian/rules 2013-01-27 19:02:05.000000000 +0000 @@ -1,5 +1,8 @@ #!/usr/bin/make -f +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + %: dh $@
diff -Nru python-greenlet-0.3.1/debian/changelog python-greenlet-0.3.1/debian/changelog --- python-greenlet-0.3.1/debian/changelog 2013-01-27 19:30:58.000000000 +0000 +++ python-greenlet-0.3.1/debian/changelog 2013-01-28 21:58:50.000000000 +0000 @@ -1,3 +1,10 @@ +python-greenlet (0.3.1-2.4) wheezy-proposed-updates; urgency=low + + * Non-maintainer upload. + * add a patch from upstream that fixes sparc header, this time for real. + + -- Javi Merino <vicho@debian.org> Mon, 28 Jan 2013 21:58:50 +0000 + python-greenlet (0.3.1-2.3) wheezy-proposed-updates; urgency=low * Non-maintainer upload. diff -Nru python-greenlet-0.3.1/debian/patches/fix_solaris_sparc_header.patch python-greenlet-0.3.1/debian/patches/fix_solaris_sparc_header.patch --- python-greenlet-0.3.1/debian/patches/fix_solaris_sparc_header.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-greenlet-0.3.1/debian/patches/fix_solaris_sparc_header.patch 2013-01-28 21:34:00.000000000 +0000 @@ -0,0 +1,52 @@ +Author: Floris Bruynooghe <flub@devork.be> +Origin: https://github.com/python-greenlet/greenlet/commit/29d50b1aac84500163e48268355f3aa88b707539 +Subject: Fix the sparc/solaris header + +This header used a relic from the original stackless sources which +referred to a structure which does not exist in greenlet. Furthermore +it seems to have never worked with gcc > 4.0.0 as a dynamicly loaded +library as it clobbered gcc's PIC register (%l7). + +--- a/platform/switch_sparc_sun_gcc.h ++++ b/platform/switch_sparc_sun_gcc.h +@@ -42,20 +42,10 @@ slp_switch(void) + SLP_SAVE_STATE(stackref, stsizediff); + + /* Increment stack and frame pointer by stsizediff */ +- +- /* Sparc special: at first load new return address. +- This cannot be done later, because the stack +- might be overwritten again just after SLP_RESTORE_STATE +- has finished. BTW: All other registers (l0-l7 and i0-i5) +- might be clobbered too. +- */ + __asm__ volatile ( +- "ld [%0+60], %%i7\n\t" +- "add %1, %%sp, %%sp\n\t" +- "add %1, %%fp, %%fp" +- : : "r" (_cst->stack), "r" (stsizediff) +- : "%l0", "%l1", "%l2", "%l3", "%l4", "%l5", "%l6", "%l7", +- "%i0", "%i1", "%i2", "%i3", "%i4", "%i5"); ++ "add %0, %%sp, %%sp\n\t" ++ "add %0, %%fp, %%fp" ++ : : "r" (stsizediff)); + + SLP_RESTORE_STATE(); + +@@ -63,10 +53,12 @@ slp_switch(void) + * The LORD rained down burning sulfur on Sodom and Gomorra ... + */ + +- /* Sparc special: Must make it *very* clear to the CPU that +- it shouldn't look back into the register windows +- */ +- __asm__ volatile ( "ta %0" : : "i" (ST_CLEAN_WINDOWS)); ++ /* No need to restore any registers from the stack nor clear them: the ++ * frame pointer has just been set and the return value register is ++ * also being set by the return statement below. After returning a ++ * restore instruction is given and the frame below us will load all ++ * it's registers using a fill_trap if required. */ ++ + return 0; + } + } diff -Nru python-greenlet-0.3.1/debian/patches/series python-greenlet-0.3.1/debian/patches/series --- python-greenlet-0.3.1/debian/patches/series 2013-01-27 19:05:55.000000000 +0000 +++ python-greenlet-0.3.1/debian/patches/series 2013-01-28 21:28:00.000000000 +0000 @@ -1,2 +1,3 @@ switch_arm32_update.patch +fix_solaris_sparc_header.patch fix_sparc_support.patch
Attachment:
signature.asc
Description: Digital signature