Python Coredump on FreeBSD

Andrew MacIntyre andymac at
Wed Jun 11 13:25:27 CEST 2003

On Tue, 10 Jun 2003, Harald Schneider wrote:

> Sorry for the huge delay ... if I compile with this option, my app fails
> with a missing 'import thread' in line 5 of ....

> "Andrew MacIntyre" <andymac at> schrieb im Newsbeitrag


> > ./configure --without-threads

Ok, so you're using threads...

I have verified that:
- FreeBSD's pthreads implementation (libc_r) has a hard coded 1MB stack
  for the "initial" thread (the one that starts all other threads), that
  cannot be changed without rebuilding the library;
- the Linuxthreads port doesn't have the same limitation, and appears to
  function sufficiently similarly to libc_r that the regression test
  doesn't fail.

You should be able to try the linuxthreads build out by:
- install the linuxthreads port
- configure Python as normal
- modify the Makefile as follows:
  + remove any "-pthread" from the CC variable;
  + remove any "-lc_r" from the LIBS variable;
  + add "-I/usr/local/include/pthread/linuxthreads" to the CPPFLAGS
  + add "-L/usr/local/lib -llthread" to the LIBC variable.
- make
- make test

I've just checked this recipe with a 2.2.3 build; it should also work with
a recent CVS sourcebase.

The sre recursion limits have been tweaked again in the current CVS tree
for FreeBSD, to reduce the risk of hitting the stack size limit.


Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at  (pref) | Snail: PO Box 370
        andymac at             (alt) |        Belconnen  ACT  2616
Web:               |        Australia

More information about the Python-list mailing list