bug-hurd
[Top][All Lists]
Advanced

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

python2.2 and pthreads


From: Michael Banck
Subject: python2.2 and pthreads
Date: Fri, 25 Apr 2003 12:53:50 +0200
User-agent: Mutt/1.5.3i

Hi,

I am trying to build python2.2 with pthreads. There are two problems:

1. configure does not find pthreads and selects cthreads:

/* Define if you have POSIX threads */
/* #undef _POSIX_THREADS */
[...]
/* Define if you have the Mach cthreads package */
#define C_THREADS 1

It seems the configure-test code is:

    # According to the POSIX spec, a pthreads implementation must
    # define _POSIX_THREADS in unistd.h. Some apparently don't (which
    # ones?)
    echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
echo "configure:3731: checking for _POSIX_THREADS in unistd.h" >&5
    cat > conftest.$ac_ext <<EOF
#line 3733 "configure"
#include "confdefs.h"
#include <unistd.h>
#ifdef _POSIX_THREADS
yes
#endif

Is this our problem or python's? This test succeeds on Linux. 

When I override pyconfig.h manually and add -lpthread to $LIBS, python
compiles fine, but:

2. There is an assertion failure when trying to run the python
executable:

hurd:~/build/python2.2-2.2.2/builddir.old$ ./python
python: ../../libpthread/pthread/pt-self.c:28: pthread_self: Assertion
        `__pthread_threads' failed.
Aborted
hurd:~/build/python2.2-2.2.2/builddir.old$

(gdb) r -E ../setup.py build
Starting program: /var/lib/buildd/build/mbanck/python2.2-2.2.2/builddir/ \
        /python -E ../setup.py build

Breakpoint 2, PyThread_get_thread_ident () at ../Python/thread_pthread.h:237
237             if (!initialized)
(gdb) n
240             threadid = pthread_self();
(gdb) n
python: ../../libpthread/pthread/pt-self.c:28: pthread_self: Assertion 
        `__pthread_threads' failed.

Program received signal SIGABRT, Aborted.
0x011288dc in evc_wait () from /lib/libc.so.0.3
(gdb) bt
#0  0x011288dc in evc_wait () from /lib/libc.so.0.3
#1  0x01128f39 in mach_msg () from /lib/libc.so.0.3
#2  0x01297501 in msg_sig_post () from /lib/libhurduser.so.0.3
#3  0x0115dbbc in sigprocmask () from /lib/libc.so.0.3
#4  0x0115dd22 in sigprocmask () from /lib/libc.so.0.3
#5  0x0115e020 in kill () from /lib/libc.so.0.3
#6  0x0115d4ce in raise () from /lib/libc.so.0.3
#7  0x0115f5f7 in abort () from /lib/libc.so.0.3
#8  0x01156dc4 in __assert_perror_fail () from /lib/libc.so.0.3
#9  0x010318ab in pthread_self () from /lib/libpthread.so.0.3
#10 0x0809f93b in PyThread_get_thread_ident () at 
        ../Python/thread_pthread.h:240
#11 0x08093119 in PyImport_Import (module_name=0x8112c68) at 
        ../Python/import.c:155
#12 0x08093666 in PyImport_ImportModule (name=0x80e24c0 "__builtin__") at 
        ../Python/import.c:1619
#13 0x08072289 in _PyExc_Init () at ../Python/exceptions.c:1096
#14 0x0809ae9f in Py_Initialize () at ../Python/pythonrun.c:163
#15 0x08053031 in Py_Main (argc=4, argv=0x12bff2c) at ../Modules/main.c:322
#16 0x08052ceb in main (argc=4, argv=0x12bff2c) at ../Modules/python.c:10
#17 0x0114b5bf in __libc_start_main () from /lib/libc.so.0.3


Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]