[PySide] PySide 1.1.1 - Problems building pyside with Qt 4.8.0 both debug and release version on windows

Bjørn Helge Kjøsnes bjelge at nefines.com
Thu Apr 26 09:11:55 CEST 2012


Hi,

I did look into it last night and the problem seems to be include of 
some new types when generating the wrappers. The first one was fixed by 
adding some extra include in the object type for QFSFileEngine, but then 
a new error appears in QFile type. This one is not fixed by a simple 
include. If this works in the Linux and Mac version with Qt 4.8.0, it 
has to be a Windows specific problem in Shiboken. If anyone can point me 
to where to look in the Shiboken source and how to best debug this, I 
can have another go at it in my spare time. Is there any documentation 
on how it works. It seams like the things I find in the apiextractor 
documentation not match what I find in the xml typesystem files. At 
least not the enum type that I can see uses the flags attribute in 
another way in the source than in the 
documentation(http://www.pyside.org/docs/apiextractor/typesystem_specifying_types.html). 
What should I do to be sure my changes do not affect the earlier 
versions of Qt. I see some tags for version in the type system. Do this 
work on all elements?

This change to the typesystem_core_common.xml fixes the first error for 
Qt 4.8.0 on windows, but I do not know what happens in Qt 4.7.4 if I use 
this:

Original:
<object-type name="QFSFileEngine">
<extra-includes>
<include file-name="QDateTime" location="global"/>
</extra-includes>
</object-type>

New with extra include for Qt 4.8.0:
<object-type name="QFSFileEngine">
<extra-includes>
<include file-name="QDateTime" location="global"/>
<include file-name="QFile" location="global"/>
<include file-name="QIODevice" location="global"/>
</extra-includes>
</object-type>

Next is the procedures to get the code into the Source control. I looked 
at Gerrit, and have to admit that it did not make much sense to me. Are 
there any good descriptions on how to make the patches and how to add them?

Regards,
Bjorn Helge Kjosnes

On 25.04.2012 10:51, Roman Lacko wrote:
> Hi,
>
> It was reported some time ago and it is the last bug that stops me to
> create windows packages compiled with Qt 4.8. Would be great if
> someone (maybe You ?) with C++ knowlege on windows finally gets this
> bug fixed.
>
>
> Regards
> Roman
>
> 2012/4/25 Bjørn Helge Kjøsnes<bjelge at nefines.com>:
>> Hi all,
>>
>> I have not been able to make the PySide 1.1.1 compile with QT 4.8.0 and
>> Python 2.7.3  on Windows with Visual Studio 2008 and CMake 2.8.8.
>> Replacing QT 4.8.0 with QT 4.7.4 all compiles and installs.
>>
>> This is what I have done so far:
>> On my disk, all code is in a Project folder on the E: drive where I have
>> a folder for Python, for QT and for PySide. In pyside I have the
>> depending libraries  that I explicitly adds to my cmake command.
>>
>> I am able to compile shiboken from "Visual Studio 2008 Command prompt",
>> but when I try to build PySide  I get this error:
>>
>> [  6%] Building CXX object
>> PySide/QtCore/CMakeFiles/QtCore.dir/PySide/QtCore/qfile_wrapper.cpp.obj
>> qfile_wrapper.cpp
>> E:\Projects\PySide\pyside-qt4.8+1.1.1\buildrelease\PySide\QtCore\PySide\QtCore\qfile_wrapper.cpp(1752)
>> : error C2661: 'QFileWrapper::open' : no overloaded function takes 3
>> arguments
>> NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe' :
>> return code
>> '0x2'
>> Stop.
>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
>> Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
>> Stop.
>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
>> Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
>> Stop.
>>
>>
>> If anyone can point me in the right direction, I can give it a try to
>> make a fix. I do code in both C++ and Python in other projects and
>> PySide have become an important library for me on the Windows platform.
>>
>> Kind regards
>> Bjorn Helge Kjosnes
>>
>> My buildpyside.bat file that I run from e:\Project\pyside in Visual
>> Studio 2008 command prompt:
>> @echo set all folders
>> SET PYTHONDIR=\Projects\Python\Python-2.7.3\PCbuild\
>> SET PYTHONVER=27
>> SET QTDIR=E:\Projects\QT\QT480
>> SET PYSIDESOURCEDIR=\Projects\PySide\
>> SET PYSIDEINSTALLDIR=\Projects\PySide\PySideInstall\
>> SET PSINSTALLD=%PYSIDEINSTALLDIR%Debug
>> SET PSINSTALLR=%PYSIDEINSTALLDIR%Release
>> SET SHIBOKENDIR=\Projects\PySide\shiboken-1.1.1
>> SET PYSIDEDIR=\Projects\PySide\pyside-qt4.8+1.1.1
>> SET PYSIDETOOLSDIR=\Projects\PySide\pyside-tools-0.2.13
>> SET LIBXML=E:\Projects\PySide\libxml2-2.7.8.win32\
>> SET LIBXSLT=E:\Projects\PySide\libxslt-1.1.26.win32\
>> SET LIBICONV=E:\Projects\PySide\iconv-1.9.2.win32\
>> SET LIBZLIB=E:\Projects\PySide\zlib-1.2.5\
>>
>> SET
>> PATH=%QTDIR%\bin;%LIBXML%bin;%LIBXSLT%bin;%LIBICONV%bin;%LIBZLIB%bin;%PATH%
>>
>> @echo make install dir
>> mkdir %PYSIDEINSTALLDIR%
>>
>> @echo go to pyside source dir
>> cd %PYSIDESOURCEDIR%
>>
>> @echo PySide build release
>> @echo make shiboken
>> mkdir %PSINSTALLR%
>> cd %SHIBOKENDIR%
>> mkdir buildrelease
>> cd buildrelease
>> cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE
>> -DPYTHON_EXECUTABLE="%PYTHONDIR%python.exe"
>> -DLIBXML2_LIBRARIES=%LIBXML%lib\libxml2.lib
>> -DLIBXML2_INCLUDE_DIR=%LIBXML%include
>> -DLIBXSLT_LIBRARIES=%LIBXSLT%lib\libxslt.lib
>> -DLIBXSLT_INCLUDE_DIR=%LIBXSLT%include
>> -DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
>> nmake install
>> @echo make pyside
>> cd %PYSIDEDIR%
>> mkdir buildrelease
>> cd buildrelease
>> cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE
>> -DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
>> nmake install
>> @echo make pyside tools
>> cd %PYSIDETOOLSDIR%
>> mkdir buildrelease
>> cd buildrelease
>> cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=FALSE
>> -DCMAKE_INSTALL_PREFIX="%PSINSTALLR%" ..
>> nmake install
>>
>>
>> @echo PySide build debug
>> @echo make shiboken debug
>> mkdir %PSINSTALLD%
>> cd %SHIBOKENDIR%
>> mkdir builddebug
>> cd builddebug
>> cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE
>> -DPYTHON_EXECUTABLE="%PYTHONDIR%python_d.exe"
>> -DPYTHON_DEBUG_LIBRARY="%PYTHONDIR%python%PYTHONVER%_d.lib"
>> -DPYTHON_LIBRARIES="%PYTHONDIR%python%PYTHONVER%_d.lib"
>> -DLIBXML2_LIBRARIES=%LIBXML%lib\libxml2.lib
>> -DLIBXML2_INCLUDE_DIR=%LIBXML%include
>> -DLIBXSLT_LIBRARIES=%LIBXSLT%lib\libxslt.lib
>> -DLIBXSLT_INCLUDE_DIR=%LIBXSLT%include
>> -DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
>> nmake install
>> @echo make pyside debug
>> cd %PYSIDEDIR%
>> mkdir builddebug
>> cd builddebug
>> cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE
>> -DPYTHON_EXECUTABLE="%PYTHONDIR%python_d.exe"
>> -DPYTHON_DEBUG_LIBRARY="%PYTHONDIR%python%PYTHONVER%_d.lib"
>> -DPYTHON_LIBRARIES="%PYTHONDIR%python%PYTHONVER%_d.lib"
>> -DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
>> nmake install
>> @echo make pyside tools debug
>> cd %PYSIDETOOLSDIR%
>> mkdir builddebug
>> cd builddebug
>> cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=FALSE
>> -DCMAKE_INSTALL_PREFIX="%PSINSTALLD%" ..
>> nmake install
>>
>> cd %PYSIDEINSTALLDIR%
>> @echo Done building PySide Debug and Release version
>>
>> _______________________________________________
>> PySide mailing list
>> PySide at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/pyside




More information about the PySide mailing list