Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 8b32d38f0094104a5fd847636983daa8 > files > 10

zope-doc-2.11.2-11mdv2010.0.i586.rpm

Steps to building python for use with Zope on FreeBSD to avoid
segmentation faults (by Andrew Sawyers for Pythons up to 2.3).

The default thread stack size for FreeBSD is too small; when building
Python for use with Zope it is often necessary to increase the thread
stack size to avoid segmentation faults. There are two ways which you
can increase the default python thread stack size.

Way #1: In your Python source directory:

    * >cd Python
    * >edit thread_pthreads.h

      at the top of the header file, add #define THREAD_STACK_SIZE 1000000
    * >save
    * >cd ..; ./configure

Way #2: In your Python source directory:

    * >./configure
    * >make OPT="-DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DTHREAD_STACK_SIZE=1000000"

Passing in the define or adding the define to your source solves all
experiences I have experienced with Zope segfaulting while running on
my FreeBSD platforms.