On Wed, May 6, 2015 at 9:02 AM, Fabrice Popineau
<[email protected]> wrote:
> Thanks for the quick answer and the hint about using makepkg-build.
> However, it didn't fix my problem with PKG_CONFIG_PATH.

makepkg-mingw, not makepkg-build. I think you're also trying to build
from PKGBUILDs from mingw64_shell.bat, generally we don't recommend
that, always use msys2_shell.bat. If you aren't using the makepkg
stuff but your own build scripts then you should use mingw??_shell.bat
as appropriate though.

>
> I managed to get over the pkg-config problem by replacing the call to
> python3
> in PKGBUILD by '/usr/bin/winpty python3' . I'm not sure why this is working
> however.
>
> Fabrice
>
> 2015-05-06 9:49 GMT+02:00 Ray Donnelly <[email protected]>:
>>
>> On Wed, May 6, 2015 at 8:10 AM, Fabrice Popineau
>> <[email protected]> wrote:
>> > Hi,
>> >
>> > I think I need some help here. When I try to import cairo into python3 :
>> >
>> >>>> import cairo
>> > #
>> >
>> > C:/Local/MSys64/mingw64/lib/python3.4/site-packages\cairo\__pycache__\__init__.cpython-34.pyc
>> > matches
>> > C:/Local/MSys64/mingw64/lib/python3.4/site-packages\cairo\__init__.py
>> > # code object from
>> >
>> > 'C:/Local/MSys64/mingw64/lib/python3.4/site-packages\\cairo\\__pycache__\\__init__.cpython-34.pyc'
>> > Traceback (most recent call last):
>> >   File "<stdin>", line 1, in <module>
>> >   File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
>> >   File "<frozen importlib._bootstrap>", line 2226, in
>> > _find_and_load_unlocked
>> >   File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
>> >   File "<frozen importlib._bootstrap>", line 1129, in _exec
>> >   File "<frozen importlib._bootstrap>", line 1471, in exec_module
>> >   File "<frozen importlib._bootstrap>", line 321, in
>> > _call_with_frames_removed
>> >   File
>> > "C:/Local/MSys64/mingw64/lib/python3.4/site-packages\cairo\__init__.py",
>> > line 18, in <module>
>> >     from ._cairo import *
>> >   File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
>> >   File "<frozen importlib._bootstrap>", line 2226, in
>> > _find_and_load_unlocked
>> >   File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
>> >   File "<frozen importlib._bootstrap>", line 1161, in
>> > _load_backward_compatible
>> >   File "<frozen importlib._bootstrap>", line 539, in _check_name_wrapper
>> >   File "<frozen importlib._bootstrap>", line 1715, in load_module
>> >   File "<frozen importlib._bootstrap>", line 321, in
>> > _call_with_frames_removed
>> > UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 3:
>> > invalid start byte
>> >>>>
>> >
>> >
>> > There is this that looks like a small mistake :
>> >
>> > $ pacman -Ss python3.*cairo
>> > mingw32/mingw-w64-i686-python3-cairo 1.10.0-3
>> >     Python2 bindings for the cairo graphics library (mingw-w64)
>> > mingw64/mingw-w64-x86_64-python3-cairo 1.10.0-3 [installed]
>> >     Python2 bindings for the cairo graphics library (mingw-w64)
>> >
>> > I hope that both are actually python3 bindings.
>> >
>> > I tried to rebuild the package but I hit another strange problem :
>> >
>> > Fabrice@Lobsang MINGW64
>> > /c/Source/Gnu/MINGW-packages/mingw-w64-python3-cairo-git
>> > $ makepkg -sLf
>> > ==> Making package: mingw-w64-x86_64-python3-cairo-git
>> > 1.10.1.34.5a45b0b-1
>> > (Wed May  6 09:08:32     2015)
>> > ==> Checking runtime dependencies...
>> > ==> Checking buildtime dependencies...
>> > ==> Retrieving sources...
>> >   -> Updating pycairo git repo...
>> > Fetching origin
>> >   -> Found 0001-msys2-port-to-subprocess.check_output.patch
>> >   -> Found 0003-fix-PyVarObject_HEAD_INIT-problem.patch
>> > ==> Validating source files with md5sums...
>> >     pycairo ... Skipped
>> >     0001-msys2-port-to-subprocess.check_output.patch ... Passed
>> >     0003-fix-PyVarObject_HEAD_INIT-problem.patch ... Passed
>> > ==> Extracting sources...
>> >   -> Creating working copy of pycairo git repo...
>> > Reset branch 'makepkg'
>> > ==> Starting pkgver()...
>> > ==> Starting prepare()...
>> > Application : msys2: port to subprocess.check_output.
>> > Application : fix PyVarObject_HEAD_INIT problem
>> > ==> Starting build()...
>> > Package cairo was not found in the pkg-config search path.
>> > Perhaps you should add the directory containing `cairo.pc'
>> > to the PKG_CONFIG_PATH environment variable
>> > No package 'cairo' found
>> > ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.10.2']  Failed
>> >
>> > ==> ERROR: A failure occurred in build().
>> >     Aborting...
>> >
>> > Fabrice@Lobsang MINGW64
>> > /c/Source/Gnu/MINGW-packages/mingw-w64-python3-cairo-git
>> > $ echo $PKG_CONFIG_PATH
>> > /mingw64/lib/pkgconfig:/usr/lib/pkgconfig
>> >
>> > Fabrice@Lobsang MINGW64
>> > /c/Source/Gnu/MINGW-packages/mingw-w64-python3-cairo-git
>> > $ pkg-config --libs cairo
>> > -L/mingw64/lib -LC:/building/msys64/mingw64/lib/../lib -L/mingw64/lib
>> > -LC:/msys64/mingw64/lib -L/mingw64/lib -lcairo -lz -lgobject-2.0 -lffi
>> > -lglib-2.0 -lintl -pthread -lws2_32 -lole32 -lwinmm -lshlwapi -lintl
>> > -lpixman-1 -lfontconfig -lexpat -lfreetype -lexpat -lfreetype -lz -lbz2
>> > -lharfbuzz -lpng16 -lz
>> >
>> > How can makepkg not see my PKG_CONFIG_PATH ?
>>
>> You need to use makepkg-mingw to build MinGW-w64 software.
>>
>> >
>> > Thanks for any help with this.
>> >
>> > Fabrice
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > One dashboard for servers and applications across Physical-Virtual-Cloud
>> > Widest out-of-the-box monitoring support with 50+ applications
>> > Performance metrics, stats and reports that give you Actionable Insights
>> > Deep dive visibility with transaction tracing using APM Insight.
>> > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> > _______________________________________________
>> > Msys2-users mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/msys2-users
>> >
>
>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to