Problem building www/serf

I want to update Serf to the latest version, please help to solve the problem.

Code:
[CMD]$ uname -a[/CMD]
FreeBSD local.lan 8.4-RELEASE-p4 FreeBSD 8.4-RELEASE-p4 #0: Mon Sep  9 23:16:13 UTC 2013     [email]root@amd64-builder.daemonology.net[/email]:/usr/obj/usr/src/sys/GENERIC  amd64
$ make 
===>  License AL2 accepted by the user
===>  Found saved configuration for serf-1.3.2_1
===> Fetching all distfiles required by serf-1.3.2_1 for building
===>  Extracting for serf-1.3.2_1
=> SHA256 Checksum OK for serf-1.3.2.tar.bz2.
===>  Patching for serf-1.3.2_1
===>  Applying FreeBSD patches for serf-1.3.2_1
===>   serf-1.3.2_1 depends on file: /usr/local/lib/libcrypto.so.8 - found
===>   serf-1.3.2_1 depends on file: /usr/local/bin/scons - found
===>   serf-1.3.2_1 depends on shared library: apr-1 - found
===>  Configuring for serf-1.3.2_1
===>  Building for serf-1.3.2_1
scons: Reading SConscript files ...
scons: done reading SConscript files.
error: setting stack size not supported:
  File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 1344:
    _exec_main(parser, values)
  File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 1308:
    _main(parser)
  File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 1072:
    nodes = _build_targets(fs, options, targets, target_top)
  File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 1228:
    jobs = SCons.Job.Jobs(num_jobs, taskmaster)
  File "/usr/local/lib/scons-2.3.0/SCons/Job.py", line 92:
    self.job = Parallel(taskmaster, num, stack_size)
  File "/usr/local/lib/scons-2.3.0/SCons/Job.py", line 365:
    self.tp = ThreadPool(num, stack_size, self.interrupted)
  File "/usr/local/lib/scons-2.3.0/SCons/Job.py", line 280:
    prev_size = threading.stack_size(stack_size*1024)
*** Error code 2

Stop in /usr/ports/www/serf.
*** Error code 1

Stop in /usr/ports/www/serf.
 
First of all it's important to make sure that your ports collection is up to date and that you paid good attention to /usr/ports/UPDATING when doing so. I suspect that this is the main cause of your problems.

The problem above is obviously related to /usr/local/bin/scons, and when I check where this file comes from it turns out to be devel/scons. And here's the thing, that port heavily relies on Gettext and Python:

Code:
root@smtp2:/usr/ports/devel/scons # make all-depends-list
/usr/ports/lang/python27
/usr/ports/lang/python
/usr/ports/lang/python2
/usr/ports/devel/gettext
/usr/ports/converters/libiconv
Both of which have somewhat recently been updated and there were special instructions required to set all of it up.

Which Python packages are installed on your system? You can check that by using pkg_info -Ix python?

You should have a main Python package as well as some supporting meta packages.

But for now I'd focus my attention on devel/scons. I'd start by re-installing that port and all its dependencies, the easiest way to do that is by using ports-mgmt/portmaster as follows: # portmaster -f devel/scons.

Then try to install www/serf again (which is also best done using portmaster: # portmaster www/serf).
 
Code:
root@local:/usr/ports/devel/scons $ make all-depends-list
/usr/ports/lang/python27
/usr/ports/lang/python
/usr/ports/lang/python2
/usr/ports/devel/gettext
/usr/ports/devel/pth
/usr/ports/devel/libffi
/usr/ports/converters/libiconv
/usr/ports/devel/pkgconf
root@local:/usr/ports/devel/scons $ pkg_info -Ix python
python-2.7_1,2      The "meta-port" for the default version of Python interpret
python2-2_1         The "meta-port" for version 2 of the Python interpreter
python27-2.7.5_4    Interpreted object-oriented programming language
root@local:/usr/ports $ portmaster -f devel/scons

Try reinstalling scons. Then try again to install www/serf, the problem is not solved:
Code:
$ portmaster www/serf

===>>> Currently installed version: serf-1.2.1_1
===>>> Port directory: /usr/ports/www/serf

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for www/serf in background
===>>> Gathering dependency list for www/serf from ports
===>>> Initial dependency check complete for www/serf


===>>> Starting build for www/serf <<<===

===>>> All dependencies are up to date

===>  Cleaning for serf-1.3.2_1
===>  License AL2 accepted by the user
===>  Found saved configuration for serf-1.3.2_1
===> Fetching all distfiles required by serf-1.3.2_1 for building
===>  Extracting for serf-1.3.2_1
=> SHA256 Checksum OK for serf-1.3.2.tar.bz2.
===>  Patching for serf-1.3.2_1
===>  Applying FreeBSD patches for serf-1.3.2_1
===>   serf-1.3.2_1 depends on file: /usr/local/lib/libcrypto.so.8 - found
===>   serf-1.3.2_1 depends on file: /usr/local/bin/scons - found
===>   serf-1.3.2_1 depends on shared library: apr-1 - found
===>  Configuring for serf-1.3.2_1
===>  Building for serf-1.3.2_1
scons: Reading SConscript files ...
scons: done reading SConscript files.
error: setting stack size not supported:
  File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 1344:
    _exec_main(parser, values)
  File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 1308:
    _main(parser)
  File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 1072:
    nodes = _build_targets(fs, options, targets, target_top)
  File "/usr/local/lib/scons-2.3.0/SCons/Script/Main.py", line 1228:
    jobs = SCons.Job.Jobs(num_jobs, taskmaster)
  File "/usr/local/lib/scons-2.3.0/SCons/Job.py", line 92:
    self.job = Parallel(taskmaster, num, stack_size)
  File "/usr/local/lib/scons-2.3.0/SCons/Job.py", line 365:
    self.tp = ThreadPool(num, stack_size, self.interrupted)
  File "/usr/local/lib/scons-2.3.0/SCons/Job.py", line 280:
    prev_size = threading.stack_size(stack_size*1024)
*** Error code 2

Stop in /usr/ports/www/serf.
*** Error code 1

Stop in /usr/ports/www/serf.

===>>> make failed for www/serf
===>>> Aborting update

===>>> Killing background jobs
Terminated
Terminated

===>>> You can restart from the point of failure with this command line:
       portmaster <flags> www/serf 

===>>> Exiting
 
That error does not happen here. Please show the output of make -C /usr/ports/lang/python27 showconfig.
 
Thank you for your attention!
Code:
$ make -C /usr/ports/lang/python27 showconfig
===> The following configuration options are available for python27-2.7.5_4:
     EXAMPLES=off: Build and/or install examples
     FPECTL=on: Floating point exception handling
     IPV6=on: IPv6 protocol support
     NLS=on: Enable Gettext support for the locale module
     PTH=on: Threading/multiprocessing via GNU Pth
     PYMALLOC=on: Use Python's internal malloc
     SEM=on: POSIX semaphores support
     THREADS=on: Threading support
====> Options available for the single UCS: you have to select exactly one of them
     UCS2=off: Unicode UCS-2 encoding support
     UCS4=on: Unicode UCS-4 encoding support
===> Use 'make config' to modify these settings
 
My settings are different from yours:
Code:
===> The following configuration options are available for python27-2.7.5_4:
     EXAMPLES=on: Build and/or install examples
     FPECTL=[color="Red"]off[/color]: Floating point exception handling
     IPV6=on: IPv6 protocol support
     NLS=off: Enable Gettext support for the locale module
     PTH=[color="Red"]off[/color]: Threading/multiprocessing via GNU Pth
     PYMALLOC=on: Use Python's internal malloc
     SEM=[color="Red"]off[/color]: POSIX semaphores support
     THREADS=on: Threading support
====> Options available for the single UCS: you have to select exactly one of them
     UCS2=off: Unicode UCS-2 encoding support
     UCS4=on: Unicode UCS-4 encoding support
 
Solved! I rebuilt python27 with the PTH option turned OFF.
Code:
===> The following configuration options are available for python27-2.7.6:
     EXAMPLES=off: Build and/or install examples
     FPECTL=off: Floating point exception handling
     IPV6=on: IPv6 protocol support
     NLS=on: Enable Gettext support for the locale module
     PTH=off: Threading/multiprocessing via GNU Pth
     PYMALLOC=on: Use Python's internal malloc
     SEM=on: POSIX semaphores support
     THREADS=on: Threading support
====> Options available for the single UCS: you have to select exactly one of them
     UCS2=off: Unicode UCS-2 encoding support
     UCS4=on: Unicode UCS-4 encoding support
===> Use 'make config' to modify these settings
 
Back
Top