Debian Bug report logs - #247211
[patch] Building python on hurd-i386

version graph

Package: python2.3; Maintainer for python2.3 is (unknown);

Reported by: Michael Banck <mbanck@debian.org>

Date: Mon, 3 May 2004 20:33:03 UTC

Severity: normal

Tags: patch

Found in version 2.3.3-7

Fixed in version python2.3/2.3.4-1

Done: Matthias Klose <doko@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-hurd@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#247211; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to Michael Banck <mbanck@debian.org>:
New Bug report received and forwarded. Copy sent to debian-hurd@lists.debian.org, Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Michael Banck <mbanck@debian.org>
To: submit@bugs.debian.org
Subject: [patch] Building python on hurd-i386
Date: Mon, 3 May 2004 22:24:24 +0200
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



Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#247211; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to "Neal H. Walfield" <neal@cs.uml.edu>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #10 received at submit@bugs.debian.org (full text, mbox):

From: "Neal H. Walfield" <neal@cs.uml.edu>
To: Michael Banck <mbanck@debian.org>, 247211@bugs.debian.org
Cc: submit@bugs.debian.org
Subject: Re: Bug#247211: [patch] Building python on hurd-i386
Date: Mon, 03 May 2004 18:29:25 -0400
> 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.

If you are suggesting (and I am not sure if you are) that both
libpthread and libcthread were being linked to the same binary, then
that was indeed the problem: libcthread and libpthread both override
stub routines in libc.  Linking both in the same binary is equivalent
to, say, linking to both libgtk1.2 and libgtk2.0 in the same binary: a
few routines with come from each but nothing is going to work.



Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#247211; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to "Neal H. Walfield" <neal@cs.uml.edu>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#247211; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to Michael Banck <mbanck@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #20 received at 247211@bugs.debian.org (full text, mbox):

From: Michael Banck <mbanck@debian.org>
To: 247211@bugs.debian.org
Cc: "Neal H. Walfield" <neal@cs.uml.edu>
Subject: Re: Bug#247211: [patch] Building python on hurd-i386
Date: Tue, 4 May 2004 01:36:14 +0200
On Mon, May 03, 2004 at 06:29:25PM -0400, Neal H. Walfield wrote:
> > 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.
> 
> If you are suggesting (and I am not sure if you are) that both
> libpthread and libcthread were being linked to the same binary, then
> that was indeed the problem: libcthread and libpthread both override
> stub routines in libc.  

Yeah, I guess that was the problem. Seems somebody (Jeff I think) got
cthreads in there and then it got mangled with libpthread. Not sure
whether that was before or after libpthread got merged though, the
current python package is really old.


Michael

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



Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#247211; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #25 received at 247211@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@cs.tu-berlin.de>
To: Michael Banck <mbanck@debian.org>, 247211@bugs.debian.org
Cc: martin@v.loewis.de
Subject: Re: Bug#247211: [patch] Building python on hurd-i386
Date: Wed, 5 May 2004 08:41:29 +0200
Michael Banck writes:
> Python guys, is the patch alright, or should I rather prepare a .dpatch,
> including a patches configure and pyconfig.h.in?

yes, please prepare a diff which can be sent upstream. It would be
good to know, to which version of the Hurd this patch applies. Or, if
there a no released versions, if the current support in python for the
Hurd should be overwritten with this patch.


> 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



Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#247211; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #30 received at submit@bugs.debian.org (full text, mbox):

From: Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
To: Michael Banck <mbanck@debian.org>, 247211@bugs.debian.org
Cc: submit@bugs.debian.org
Subject: Re: Bug#247211: [patch] Building python on hurd-i386
Date: Wed, 05 May 2004 15:30:54 +0200
At Mon, 3 May 2004 22:24:24 +0200,
Michael Banck wrote:
> 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)

python probably wants to keep cthread support for native mach targets,
I wouldn't know.  So this could be a problem.

Apart from this, it is probably ok to require pthread on the Hurd,
although I still consider the pthread support in the Hurd to be very
quite experimental.

Thanks,
Marcus



Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#247211; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#247211; Package python2.3. Full text and rfc822 format available.

Acknowledgement sent to Michael Banck <mbanck@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. Full text and rfc822 format available.

Message #40 received at 247211@bugs.debian.org (full text, mbox):

From: Michael Banck <mbanck@debian.org>
Cc: 247211@bugs.debian.org, debian-hurd@lists.debian.org
Subject: Re: Bug#247211: [patch] Building python on hurd-i386
Date: Wed, 5 May 2004 15:47:37 +0200
(putting debian-hurd back on the CC list, which I somehow messed up on
submitting the bug)

On Wed, May 05, 2004 at 03:30:54PM +0200, Marcus Brinkmann wrote:
> At Mon, 3 May 2004 22:24:24 +0200,
> Michael Banck wrote:
> > 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)
> 
> python probably wants to keep cthread support for native mach targets,
> I wouldn't know.  So this could be a problem.

Ah, I did not think about this. In that case, there should probably be a
configure option like --disable-cthreads, to avoid mangling them with
pthreads.

> Apart from this, it is probably ok to require pthread on the Hurd,
> although I still consider the pthread support in the Hurd to be very
> quite experimental.

So perhaps we should keep this in the Debian package for now and see how
people get along with python2.3/pthreads? I can only say it does not
seem worse than cthreads. I've ran the test-suite manually yesterday,
and there was only one spurious segfault left, as opposed to three with
cthreads. I will try to post a further analysis soon.

If things works well enough, we can submit it upstream.


Michael

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



Reply sent to Matthias Klose <doko@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Michael Banck <mbanck@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #45 received at 247211-close@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@debian.org>
To: 247211-close@bugs.debian.org
Subject: Bug#247211: fixed in python2.3 2.3.4-1
Date: Fri, 28 May 2004 23:02:14 -0400
Source: python2.3
Source-Version: 2.3.4-1

We believe that the bug you reported is fixed in the latest version of
python2.3, which is due to be installed in the Debian FTP archive:

idle-python2.3_2.3.4-1_all.deb
  to pool/main/p/python2.3/idle-python2.3_2.3.4-1_all.deb
python2.3-dev_2.3.4-1_hppa.deb
  to pool/main/p/python2.3/python2.3-dev_2.3.4-1_hppa.deb
python2.3-doc_2.3.4-1_all.deb
  to pool/main/p/python2.3/python2.3-doc_2.3.4-1_all.deb
python2.3-examples_2.3.4-1_all.deb
  to pool/main/p/python2.3/python2.3-examples_2.3.4-1_all.deb
python2.3-gdbm_2.3.4-1_hppa.deb
  to pool/main/p/python2.3/python2.3-gdbm_2.3.4-1_hppa.deb
python2.3-mpz_2.3.4-1_hppa.deb
  to pool/main/p/python2.3/python2.3-mpz_2.3.4-1_hppa.deb
python2.3-tk_2.3.4-1_hppa.deb
  to pool/main/p/python2.3/python2.3-tk_2.3.4-1_hppa.deb
python2.3_2.3.4-1.diff.gz
  to pool/main/p/python2.3/python2.3_2.3.4-1.diff.gz
python2.3_2.3.4-1.dsc
  to pool/main/p/python2.3/python2.3_2.3.4-1.dsc
python2.3_2.3.4-1_hppa.deb
  to pool/main/p/python2.3/python2.3_2.3.4-1_hppa.deb
python2.3_2.3.4.orig.tar.gz
  to pool/main/p/python2.3/python2.3_2.3.4.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 247211@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated python2.3 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----

Format: 1.7
Date: Fri, 28 May 2004 22:59:42 +0200
Source: python2.3
Binary: python2.3-doc idle-python2.3 python2.3-dev python2.3-examples python2.3-mpz python2.3 python2.3-gdbm python2.3-tk
Architecture: source all hppa
Version: 2.3.4-1
Distribution: unstable
Urgency: medium
Maintainer: Matthias Klose <doko@debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Description: 
 idle-python2.3 - An IDE for Python (v2.3) using Tkinter
 python2.3  - An interactive high-level object-oriented language (version 2.3)
 python2.3-dev - Header files and a static library for Python (v2.3)
 python2.3-doc - Documentation for the high-level object-oriented language Python 
 python2.3-examples - Examples for the Python language (v2.3)
 python2.3-gdbm - GNU dbm database support for Python (v2.3)
 python2.3-mpz - Multiple-precision arithmetic support for Python (v2.3)
 python2.3-tk - Tkinter - Writing Tk applications with Python (v2.3)
Closes: 246332 247211 249006 249816 250826
Changes: 
 python2.3 (2.3.4-1) unstable; urgency=medium
 .
   * Final Python 2.3.4 Release.
   * In the API docs, fix signature of PyModule_AddIntConstant (closes: #250826).
   * locale.getdefaultlocale: don't fail with empty environment variables.
     Closes: #249816.
   * Include distutils/command/wininst.exe in -dev package (closes: #249006).
   * Disable cthreads on the Hurd (Michael Banck). Closes: #247211.
   * Add a note to pygettext(1), that this program is deprecated in favour
     of xgettext, which now includes support for Python as well.
     Closes: #246332.
Files: 
 c15ed857ac6038e79d0feebf516ce504 1447 python optional python2.3_2.3.4-1.dsc
 d68a6a490c04b2c8f664ba4f2192e2fb 8502596 python optional python2.3_2.3.4.orig.tar.gz
 5a80fa08b1e9a54560703f781cde9068 2282775 python optional python2.3_2.3.4-1.diff.gz
 a9544b07b7787efe5e19d803661a7a3f 514060 python optional python2.3-examples_2.3.4-1_all.deb
 855231ebba815365953f8f4e9cce1b0c 228012 python optional idle-python2.3_2.3.4-1_all.deb
 762d79092b6b834d7de9d45f13aabb43 2816588 doc optional python2.3-doc_2.3.4-1_all.deb
 06465f94ab7130a797b09837b75178f8 3204682 python standard python2.3_2.3.4-1_hppa.deb
 b7f301b551eed182ed6af1fe07d7646e 108084 python optional python2.3-tk_2.3.4-1_hppa.deb
 91198b7dcd55c6632bcb0b4241d4c798 22932 python optional python2.3-gdbm_2.3.4-1_hppa.deb
 78959b5e66110716011b3d3fb07428f6 28248 python optional python2.3-mpz_2.3.4-1_hppa.deb
 d2cf9c8dfc2aec964fe8299f3242c341 1983538 python optional python2.3-dev_2.3.4-1_hppa.deb

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Requires PGP version 2.6 or later.

iQEVAwUBQLfyTAuDzMCIcnEhAQGiaQf7BzgvG/k9YEGT5MPZ1W6CGrZVGsaRXN1W
14abyfIJr4t1M9wLYpV614vIqwULlEmSPYd7bofljKV/FQEJMtyDdxODrXcKZZFw
leouDj6teWR2HTmiLgPuqKYO5FRbXmzMqtbDX3H6cuz2RL+zfecwr4UcnsxOKFyI
TEwhvNMl06CSCqXC7GRaD/w6PJHLO/B/iM7h+FNVMgMkG2jbKfinyTrzg1rjfzaO
XsVYHWwbDDtBhIBFNEVZIr1QDE6JiOtOwYsxzXJ9zP9PXqve5vV4R5Cxd/KANT6L
vEPaRSBYZjVRnp3Uec/484BfoXTNinslPGNdFwSSFxvxDT3l2LNqgg==
=YGFu
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 09:50:43 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.