py-cairo fails to build

tech-lists tech-lists at zyxst.net
Thu Sep 21 12:48:55 UTC 2017


Hello ports@

system: 11.1-STABLE FreeBSD 11.1-STABLE #0 r323771
ports: r450254

I get the following error trying to compile py-cairo. It complains it
can't find Python.h even though configure appears to have told it
where it is.  

Checking for 'gcc' (c compiler)          : ok 
Checking for program python              : /usr/local/bin/python3.6 
Checking for python version              : (3, 6, 2, 'final', 0) 
Checking for library python3.6 in LIBPATH_PYEMBED : not found 
Checking for library python3.6 in LIBDIR          : not found 
Checking for library python3.6 in python_LIBPL    : not found 
Checking for library python3.6 in $prefix/libs    : not found 
Checking for library python3.6m in LIBPATH_PYEMBED : yes 
Checking for program python3.6-config              :
/usr/local/bin/python3.6-config 
Checking for header Python.h                       : yes 
Checking for program pkg-config                    :
/usr/local/bin/pkg-config 
Checking for 'cairo' >= 1.10.0                     : yes 
Configuration:
PREFIX                                   : /usr/local
LIBDIR                                   : /usr/local/lib
'configure' finished successfully (0.199s)
===>  Building for py36-cairo-1.10.0_3
  ./options()
  Waf: Entering directory
/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory'
  ./build()
    src/build()
    parsing
/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/src/cairomodule.c
failed
Traceback (most recent call last):
  File
"/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Tools/c_preproc.py",
line 496, in addlines
    lines=filter_comments(filepath)
      File
"/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Tools/c_preproc.py",
line 47, in filter_comments
    code=Utils.readf(filename)
      File
"/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/waflib/Utils.py",
line 83, in readf
    txt=f.read()
      File "/usr/local/lib/python3.6/encodings/ascii.py", line 26, in
decode
    return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in
position 54: ordinal not in range(128)
[1/9] c: src/cairomodule.c -> build_directory/src/cairomodule.c.1.o
13:38:22 runner ['cc', '-I/usr/local/include', '-O2', '-pipe',
'-fstack-protector', '-fno-strict-aliasing', '-fPIC', '-pthread',
'-fstack-protector', '-fstack-protector', '-fstack-protector',
'-fno-strict-aliasing', '-fno-strict-aliasing',
'-I/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory/src',
'-I/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/src',
'-I/usr/local/include/cairo', '-I/usr/local/include/glib-2.0',
'-I/usr/local/lib/glib-2.0/include', '-I/usr/local/include',
'-I/usr/local/include/pixman-1', '-I/usr/local/include/freetype2',
'-I/usr/local/include/libpng16', '-I/usr/local/include/libdrm',
'-I/storage/storage/usr/local/include/python3.6m', '-D_THREAD_SAFE',
'-DNDEBUG', '../src/cairomodule.c', '-c', '-o', 'src/cairomodule.c.1.o']
../src/cairomodule.c:21:10: fatal error: 'Python.h' file not found
#include <Python.h>
         ^~~~~~~~~~
	 1 error generated.
	 Waf: Leaving directory
/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory'
Build failed
 -> task failed (exit status 1): 
 {task 34464980944: c cairomodule.c -> cairomodule.c.1.o}
 ['cc', '-I/usr/local/include', '-O2', '-pipe', '-fstack-protector',
'-fno-strict-aliasing', '-fPIC', '-pthread', '-fstack-protector',
'-fstack-protector', '-fstack-protector', '-fno-strict-aliasing',
'-fno-strict-aliasing',
'-I/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory/src',
'-I/ports-build/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/src',
'-I/usr/local/include/cairo', '-I/usr/local/include/glib-2.0',
'-I/usr/local/lib/glib-2.0/include', '-I/usr/local/include',
'-I/usr/local/include/pixman-1', '-I/usr/local/include/freetype2',
'-I/usr/local/include/libpng16', '-I/usr/local/include/libdrm',
'-I/storage/storage/usr/local/include/python3.6m', '-D_THREAD_SAFE',
'-DNDEBUG', '../src/cairomodule.c', '-c', '-o', 'src/cairomodule.c.1.o']
*** Error code 1

Stop.
make: stopped in /storage/usr/ports/graphics/py3-cairo

thanks,
-- 
J.


More information about the freebsd-ports mailing list