[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#247211: [patch] Building python on hurd-i386



Package: python2.3
Version: 2.3.3-7
Tags: patch

Hi Python maintainers, hi debian-hurd,

I had a conversation with doko last week about building python on
hurd-i386. It turned out that it was a bit early to report success,
building the tkinter extension goes fine when done manually, but what I
failed to realize was that the error Santiago reported was actually
during a subsequent test-import of the built module which failed. When I
tried to link the whole python executable with libpthread, it
immediately segfaulted on startup. I then tried to get of rid of
libpthread entirely, but to no avail.

I finally took the other way and removed cthreads from the build
process. That seems to work fine now, python and python-tk build and
link without problems and seem to be functional (I installed reportbug
and it works fine except that I've got no MTA configured. I don't have X
running, so I can't test python-tk beyond trying to import it I guess)

This is the patch to remove cthreads from configure.in, one needs to run
autoconf and autoheader afterwards. No other patches were necessary.

diff -Naur python2.3-2.3.3/configure.in python2.3-2.3.3.foo/configure.in
--- python2.3-2.3.3/configure.in        2003-11-18 20:59:39.000000000 +0100
+++ python2.3-2.3.3.foo/configure.in    2004-05-03 15:27:22.000000000 +0200
@@ -1509,7 +1509,6 @@
 
 # Templates for things AC_DEFINEd more than once.
 # For a single AC_DEFINE, no template is needed.
-AH_TEMPLATE(C_THREADS,[Define if you have the Mach cthreads package])
 AH_TEMPLATE(_REENTRANT,
   [Define to force use of thread-safe errno, h_errno, and other functions])
 AH_TEMPLATE(WITH_THREAD,
@@ -1590,17 +1589,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, 1,
-    [Define if you are using Mach cthreads directly under /include])
-    LIBS="$LIBS -lthreads"
-    THREADOBJ="Python/thread.o"],[
-    AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
-    AC_DEFINE(C_THREADS)
-    AC_DEFINE(MACH_C_THREADS, 1,
-    [Define if you are using Mach cthreads under mach /])
-    THREADOBJ="Python/thread.o"],[
     AC_MSG_CHECKING(for --with-pth)
     AC_ARG_WITH([pth],
                 AC_HELP_STRING(--with-pth, use GNU pth threading libraries),
@@ -1662,7 +1650,7 @@
     LIBS="$LIBS -lcma"
     THREADOBJ="Python/thread.o"],[
     USE_THREAD_MODULE="#"])
-    ])])])])])])])])])])])
+    ])])])])])])])])])
 
     AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
     LIBS="$LIBS -lmpc"


Hurd porters, is this alright to apply?
Python guys, is the patch alright, or should I rather prepare a .dpatch,
including a patches configure and pyconfig.h.in?


cheers,

Michael

-- 
Michael Banck
Debian Developer
mbanck@debian.org
http://www.advogato.org/person/mbanck/diary.html



Reply to: