reopen 307094
thanks

The fix did not help as cthreads.dpatch calls autoheader, which exits
with a non-zero status, resulting in dpatch (or make) to abort the build:

debian/patches/cthreads.dpatch -patch
patching file configure.in
configure.in:1680: warning: AC_TRY_RUN called without default to allow
        cross compiling
configure.in:2000: warning: AC_TRY_RUN called without default to allow
        cross compiling
configure.in:1680: warning: AC_TRY_RUN called without default to allow
        cross compiling
configure.in:2000: warning: AC_TRY_RUN called without default to allow
        cross compiling
/usr/bin/autoheader2.13: Symbol `SIZEOF_WCHAR_T' is not covered by
/usr/share/autoconf2.13/acconfig.h ./acconfig.h
make: *** [patch-stamp-cthreads] Error 1
******************************************************************************
Build finished at 20050505-1844
FAILED [dpkg-buildpackage died]


On further inspection, it turned out that deb-build.dpatch includes the
part of configure.in cthreads.dpatch is disabling, so just removing it
from there should be better.  Along this, hurd.dpatch can also be
dropped as it depended on the HURD_C_THREADS changes in configure.in.

I rebuilt python2.2 with the attached patch and it is linking correctly
to libpthread.

Shall I submit similar patches for python2.3 and python2.4, or will you
take care of this (provided you agree with the patch, of course)?


thanks,

Michael
  * debian/patches/hurd.dpatch: Removed.
  * debian/patches/cthreads.dpatch: Likewise.
  * debian/patches/deb-build.dpatch: Removed cthread-specific hunks.
  * debian/rules: Disable hurd.dpatch and cthreads.dpatch.

 -- Michael Banck <[EMAIL PROTECTED]>  Thu,  5 May 2005 21:44:19 +0200

diff -Naur debian.orig/patches/cthreads.dpatch debian/patches/cthreads.dpatch
--- debian.orig/patches/cthreads.dpatch 2005-05-05 21:43:22.000000000 +0200
+++ debian/patches/cthreads.dpatch      1970-01-01 01:00:00.000000000 +0100
@@ -1,55 +0,0 @@
-#! /bin/sh -e
-
-# DP: Remove cthreads detection
-
-dir=
-if [ $# -eq 3 -a "$2" = '-d' ]; then
-    pdir="-d $3"
-    dir="$3/"
-elif [ $# -ne 1 ]; then
-    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
-    exit 1
-fi
-case "$1" in
-    -patch)
-        patch $pdir -f --no-backup-if-mismatch -p0 < $0
-        autoconf
-       autoheader
-        ;;
-    -unpatch)
-        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
-        #rm ${dir}gcc/configure
-        ;;
-    *)
-       echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
-        exit 1
-esac
-exit 0
-
---- configure.in.orig  2005-04-30 16:52:11.091728016 +0200
-+++ configure.in       2005-04-30 16:52:27.073298448 +0200
-@@ -1090,15 +1090,6 @@
-     AC_MSG_RESULT($unistd_defines_pthreads)
- 
-     AC_DEFINE(_REENTRANT)
--    AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
--    AC_DEFINE(C_THREADS)
--    AC_DEFINE(HURD_C_THREADS)
--    LIBS="$LIBS -lthreads"
--    LIBOBJS="$LIBOBJS thread.o"],[
--    AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
--    AC_DEFINE(C_THREADS)
--    AC_DEFINE(MACH_C_THREADS)
--    LIBOBJS="$LIBOBJS thread.o"],[
-     AC_MSG_CHECKING(for --with-pth)
-     AC_ARG_WITH(pth,
-     [  --with-pth                      use GNU pth threading libraries], [
-@@ -1151,7 +1142,7 @@
-     LIBS="$LIBS -lcma"
-     LIBOBJS="$LIBOBJS thread.o"],[
-     USE_THREAD_MODULE="#"])
--    ])])])])])])])])])])
-+    ])])])])])])])])
- 
-     if test "$posix_threads" = "yes"; then
-       if test "$unistd_defines_pthreads" = "no"; then
diff -Naur debian.orig/patches/deb-build.dpatch debian/patches/deb-build.dpatch
--- debian.orig/patches/deb-build.dpatch        2005-05-05 21:43:20.000000000 
+0200
+++ debian/patches/deb-build.dpatch     2005-05-05 21:42:58.000000000 +0200
@@ -297,27 +297,3 @@
        # -u libsys_s pulls in all symbols in libsys
        Darwin/*) 
                # -u __dummy makes the linker aware of the objc runtime
-@@ -1066,8 +1074,14 @@
-     AC_MSG_RESULT($unistd_defines_pthreads)
- 
-     AC_DEFINE(_REENTRANT)
-+    AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
-+    AC_DEFINE(C_THREADS)
-+    AC_DEFINE(HURD_C_THREADS)
-+    LIBS="$LIBS -lthreads"
-+    LIBOBJS="$LIBOBJS thread.o"],[
-     AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
-     AC_DEFINE(C_THREADS)
-+    AC_DEFINE(MACH_C_THREADS)
-     LIBOBJS="$LIBOBJS thread.o"],[
-     AC_MSG_CHECKING(for --with-pth)
-     AC_ARG_WITH(pth,
-@@ -1121,7 +1135,7 @@
-     LIBS="$LIBS -lcma"
-     LIBOBJS="$LIBOBJS thread.o"],[
-     USE_THREAD_MODULE="#"])
--    ])])])])])])])])])
-+    ])])])])])])])])])])
- 
-     if test "$posix_threads" = "yes"; then
-       if test "$unistd_defines_pthreads" = "no"; then
diff -Naur debian.orig/patches/hurd.dpatch debian/patches/hurd.dpatch
--- debian.orig/patches/hurd.dpatch     2005-05-05 21:43:20.000000000 +0200
+++ debian/patches/hurd.dpatch  1970-01-01 01:00:00.000000000 +0100
@@ -1,71 +0,0 @@
-#! /bin/sh -e
-
-# DP: Patch for building on the Hurd
-
-dir=
-if [ $# -eq 3 -a "$2" = '-d' ]; then
-    pdir="-d $3"
-    dir="$3/"
-elif [ $# -ne 1 ]; then
-    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
-    exit 1
-fi
-case "$1" in
-    -patch)
-        patch $pdir -l -f --no-backup-if-mismatch -p0 < $0
-        autoconf
-        ;;
-    -unpatch)
-        patch $pdir -l -f --no-backup-if-mismatch -R -p0 < $0
-        rm configure
-        ;;
-    *)
-       echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
-        exit 1
-esac
-exit 0
-
-# append the patch here and adjust the -p? flag in the patch calls.
---- Python/thread_cthread.old.h        Wed Oct 31 22:50:27 2001
-+++ Python/thread_cthread.h    Sat Nov  3 09:23:29 2001
-@@ -1,6 +1,11 @@
- 
-+#ifdef MACH_C_THREADS
- #include <mach/cthreads.h>
-+#endif
- 
-+#ifdef HURD_C_THREADS
-+#include <cthreads.h>
-+#endif
- 
- /*
-  * Initialization.
-@@ -8,7 +13,14 @@
- static void
- PyThread__init_thread(void)
- {
--      cthread_init();
-+#ifndef HURD_C_THREADS
-+      /* Roland McGrath said this should not be used since this is
-+      done while linking to threads */
-+      cthread_init(); 
-+#else
-+/* do nothing */
-+      ;
-+#endif
- }
- 
- /*
-@@ -127,10 +139,10 @@
- 
-       dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
-       if (waitflag) {         /* blocking */
--              mutex_lock(lock);
-+              mutex_lock((mutex_t)lock);
-               success = TRUE;
-       } else {                /* non blocking */
--              success = mutex_try_lock(lock);
-+              success = mutex_try_lock((mutex_t)lock);
-       }
-       dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, 
success));
-       return success;
diff -Naur debian.orig/rules debian/rules
--- debian.orig/rules   2005-05-05 21:43:23.000000000 +0200
+++ debian/rules        2005-05-05 21:44:12.000000000 +0200
@@ -524,7 +524,6 @@
        deb-build \
        build-blt \
        setup \
-       hurd \
        deb-locations \
        dlmodule \
        compile \
@@ -542,10 +541,6 @@
 #      blt+tix \
 #      dbm \
 
-ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),hurd-i386)
-    debian_patches += cthreads
-endif
-
 patch: patch-stamp
 apply-patches: patch-stamp
 

Reply via email to