# py-cairo failed due to AttributeError



## EmeraldBot (Nov 4, 2013)

py-cairo fails to build due to an AttributeError. Here is what is prints out:

```
root@Alex-FreeBSD:/usr/ports/graphics/py-cairo # make install clean
===>   py27-cairo-1.10.0_1 depends on file: /usr/local/bin/python2.7 - found
===>   py27-cairo-1.10.0_1 depends on executable: python - found
===>   py27-cairo-1.10.0_1 depends on executable: python2 - found
===>   py27-cairo-1.10.0_1 depends on executable: pkgconf - found
===>   py27-cairo-1.10.0_1 depends on shared library: cairo - found
===>  Configuring for py27-cairo-1.10.0_1
  ./options()
Setting top to                           : /usr/ports/graphics/py-cairo/work/py2cairo-1.10.0
Setting out to                           : /usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/build_directory
  ./configure()
Checking for 'gcc' (c compiler)          : ok
Checking for program python              : /usr/local/bin/python2.7
python executable '/usr/local/bin/python2.7' different from sys.executable '/usr/local/bin/python2'
Checking for python version              : (2, 7, 5, 'final', 0)
Checking for library python2.7           : Traceback (most recent call last):
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Scripting.py", line 93, in waf_entry_point
    run_commands()
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Scripting.py", line 145, in run_commands
    run_command(cmd_name)
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Scripting.py", line 138, in run_command
    ctx.execute()
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Configure.py", line 124, in execute
    super(ConfigurationContext,self).execute()
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Context.py", line 87, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Context.py", line 127, in recurse
    user_function(self)
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/wscript", line 29, in configure
    ctx.check_python_headers()
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Configure.py", line 214, in fun
    return f(*k,**kw)
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools/python.py", line 133, in check_python_headers
    result=conf.check(lib=name,uselib='PYEMBED',libpath=path,mandatory=False)
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Configure.py", line 214, in fun
    return f(*k,**kw)
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools/c_config.py", line 357, in check
    ret=self.run_c_code(*k,**kw)
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Configure.py", line 214, in fun
    return f(*k,**kw)
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools/c_config.py", line 435, in run_c_code
    bld.compile()
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Build.py", line 184, in compile
    self.producer.start()
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Runner.py", line 188, in start
    self.add_task(tsk)
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Runner.py", line 119, in add_task
    pool=self.init_task_pool()
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Runner.py", line 122, in init_task_pool
    pool=self.pool=[get_pool()for i in range(self.numjobs)]
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Runner.py", line 35, in get_pool
    return TaskConsumer()
  File "/usr/ports/graphics/py-cairo/work/py2cairo-1.10.0/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Runner.py", line 16, in __init__
    self.setDaemon(1)
AttributeError: 'TaskConsumer' object has no attribute 'setDaemon'
*** [do-configure] Error code 2

Stop in /usr/ports/graphics/py-cairo.
```
Would anyone like to give me guidance on how to solve this?


----------



## trh411 (Nov 4, 2013)

Based on your post, I attempted an install of graphics/py-cairo on my FreeBSD-9.2-RELEASE system. It completed successfully:

```
Installing py27-cairo-1.10.0_1... done

===>>> Installation of graphics/py-cairo (py27-cairo-1.10.0_1) complete
```

I installed using portmaster, but that should not make any difference. Anything funky in your /etc/make.conf that might be causing an issue.


----------



## EmeraldBot (Nov 5, 2013)

I think it was the gnu pth option for threading. It seemed to complete successfully with that option disabled, so I guess this issue is closed. Thanks for your help!


----------

