[PyQt] Problems building PyQt snapshot on Win32 with MinGW -- all details included

Andreas Pakulat apaku at gmx.de
Wed Jul 11 22:42:21 BST 2007


On 11.07.07 13:41:44, Martin Blais wrote:
> On 7/11/07, Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> >On Wednesday 11 July 2007 8:05 pm, Martin Blais wrote:
> >>
> >> 0. - I adjusted my PATH to include C:/MinGW/bin
> >>    - I'm running all of the code below in a Cygwin bash shell.
> >
> >Don't, use cmd.exe.
> 
> Hi Phil. Thanks for answering so quickly.
> 
> Here is my experience doing the same from a ``cmd.exe`` (still not working).
> 
>  First, note that my PATH does NOT contain Cygwin::
> 
>    C:\tmp\PyQt-win-gpl-4-snapshot-20070710>echo %PATH%
>    C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program
> Files\Microsoft SQL
> Server\90\Tools\binn\;c:\Python25\Lib\site-packages\mingw-3.4.5-win32.egg\bin;C:\blp\API

And it also doesn't contain Qt. And that mingw-path also looks pretty
weird.

>  I ran the simplest configure command::
> 
>    C:\tmp\PyQt-win-gpl-4-snapshot-20070710>C:/Python25/python.exe configure.py
>    Determining the layout of your Qt installation...
>    Error: Make sure you have a working Qt v4 qmake on your PATH or use the -q
>    argument to explicitly specify a working Qt v4 qmake.
> 
>  Oops, it seems I need to specify the location of qmake. Okie, so I
>  add it to the cmdline::

Right, and thats all I needed to do here. Worked completely fine.

>  Oh, oh; I need to set QMAKESPEC, okay::
> 
>    C:\tmp\PyQt-win-gpl-4-snapshot-20070710>set QMAKESPEC=win32-g++

QMAKESPEC should be set to the mkspecs directory in your Qt installation

>  Still does not work::
> 
>    C:\tmp\PyQt-win-gpl-4-snapshot-20070710>C:/Python25/python.exe
> configure.py -q C:/Qt/4.3.0/qmake/qmake.exe -w
>    Determining the layout of your Qt installation...
>    C:\Qt\4.3.0\qmake\qmake.exe -o qtdirs.mk qtdirs.pro
>    Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:
>            C:/iwmake/build_mingw_opensource\mkspecs
>    Error processing project file: qtdirs.pro
>    Error: C:\Qt\4.3.0\qmake\qmake.exe failed to create a makefile.
> Make sure you
>    have a working Qt v4 qmake on your PATH or use the -q argument to explicitly
>    specify a working Qt v4 qmake.
> 
> 
>  It's that problem with setting the difficult-to-find QMAKEPATH (see
>  ``C:/iwmake/build_mingw_opensource\mkspecs``); I've already been
>  through this, so I set it::

I have to admit I didn't use the Qt binary package, instead I used a
self-compiled version. It seems that the binary package is somewhat
broken, it may miss its qt.conf file (without which you can't move
around Qt4). But this has nothing to do with PyQt, its simply that your
QMake produces incorrect paths.

>    C:\tmp\PyQt-win-gpl-4-snapshot-20070710>set QMAKEPATH=C:/Qt/4.3.0
> 
>  But it still won't go through::
> 
>    C:\tmp\PyQt-win-gpl-4-snapshot-20070710>C:/Python25/python.exe
> configure.py -q C:/Qt/4.3.0/qmake/qmake.exe -w
>    Determining the layout of your Qt installation...
>    C:\Qt\4.3.0\qmake\qmake.exe -o qtdirs.mk qtdirs.pro
>    mingw32-make -f qtdirs.mk release
>    'mingw32-make' is not recognized as an internal or external command,
>    operable program or batch file.
>    Error: Failed to create release\qtdirs.exe. Make sure you have a
> working Qt v4
>    qmake on your PATH or use the -q argument to explicitly specify a
> working Qt v4
>    qmake.
> 
> 
>  I need to adjust my PATH to access MinGW's make::

Right, thats pretty natural, you need MinGW in your PATH to have
compiler and so forth working.

> Am I missing something, or it seems that this
> ``c:\iwmake\build_mingw_opensource`` path is still in effect. How do I
> fix that?

Fix the Qt package you fetched. Check wether you can run qmake (with
absolute path) in one of the Qt-shipping examples. If that fails as
well: Report to Trolltech.

Andreas

-- 
Your business will go through a period of considerable expansion.


More information about the PyQt mailing list