Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Nov 2016 14:48:35 +1100
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        tech-lists <tech-lists@zyxst.net>, freebsd-ports@freebsd.org
Subject:   Re: graphics/py3-cairo cannot find Python.h, but Python.h is present
Message-ID:  <0c801f97-bb8f-3219-4923-5ae6c721d8af@FreeBSD.org>
In-Reply-To: <30b728cd-4f5b-fb00-be41-c2f21e54eded@zyxst.net>
References:  <30b728cd-4f5b-fb00-be41-c2f21e54eded@zyxst.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26/11/2016 11:19 AM, tech-lists wrote:
> Hello ports@,
> 
> py3-cairo fails to build saying it can't find Python.h - however this
> file is present.
> 
> /storage/usr/local/include/python2.7/Python.h
> /storage/usr/local/include/python3.5m/Python.h
> 
> root@pumpkin:/root# file /storage/usr/local/include/python2.7/Python.h
> /storage/usr/local/include/python2.7/Python.h: C source, ASCII text
> 
> root@pumpkin:/root# file /storage/usr/local/include/python3.5m/Python.h
> /storage/usr/local/include/python3.5m/Python.h: C source, ASCII text
> 
> FreeBSD 11.0-STABLE #0 r308922 / ports is r427130
> 
> The build gives the following error:
> 
> # make MAKE_JOBS_UNSAFE=yes
> ===>  Building for py35-cairo-1.10.0_3
>   ./options()
> Waf: Entering directory
> `/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory'
>   ./build()
>   src/build()
> parsing
> /storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/src/cairomodule.c
> failed
> Traceback (most recent call last):
>   File
> "/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
> "/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
> "/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.5/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
> 00:06:50 runner ['cc', '-I/usr/local/include', '-O2', '-pipe',
> '-fstack-protector', '-fno-strict-aliasing', '-fPIC',
> '-fstack-protector', '-fstack-protector', '-fstack-protector',
> '-fno-strict-aliasing', '-fno-strict-aliasing',
> '-I/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory/src',
> '-I/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/libdrm', '-I/usr/local/include/libpng16',
> '-I/storage/storage/usr/local/include/python3.5m', '-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
> `/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory'
> Build failed
>  -> task failed (exit status 1):
>     {task 34457710776: c cairomodule.c -> cairomodule.c.1.o}
> ['cc', '-I/usr/local/include', '-O2', '-pipe', '-fstack-protector',
> '-fno-strict-aliasing', '-fPIC', '-fstack-protector',
> '-fstack-protector', '-fstack-protector', '-fno-strict-aliasing',
> '-fno-strict-aliasing',
> '-I/storage/usr/ports/graphics/py3-cairo/work/pycairo-1.10.0/build_directory/src',
> '-I/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/libdrm', '-I/usr/local/include/libpng16',
> '-I/storage/storage/usr/local/include/python3.5m', '-D_THREAD_SAFE',

Include path  ^^ has a double '/storage/storage/' prefix:

 '-I/storage/storage/usr/local/include/python3.5m'

What's causing it is the question. It could be that something is not
PREFIX-safe.


./koobs



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0c801f97-bb8f-3219-4923-5ae6c721d8af>