[PyQt] fatal error configuring PyQt5.11.2: Cannot open include file: 'QDataStream': No such file or directory

Phil Thompson phil at riverbankcomputing.com
Thu Sep 13 08:58:33 BST 2018


On 12 Sep 2018, at 10:36 pm, Timothy W. Grove <tim_grove at sil.org> wrote:
> 
> On 12/09/2018 15:54, Phil Thompson wrote:
>> On 12 Sep 2018, at 3:45 pm, Timothy W. Grove <tim_grove at sil.org>
>>  wrote:
>> 
>>> Trying to build the latest PyQt5.11.2 (or PyQt5.11.3dev snapshot) and it fails on configure for me with the error:
>>> 
>>> ..\qpy\QtCore\qpycore_pyqtpyobject.h(29): fatal error C1083: Cannot open include file: 'QDataStream': No such file or directory
>>> 
>>> More info below.
>>> 
>>> Best regards,
>>> Tim
>>> 
>>> 
>>> Microsoft (R) Program Maintenance Utility Version 14.15.26726.0
>>> Copyright (C) Microsoft Corporation.  All rights reserved.
>>> 
>>>         "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\nmake.exe" -f Makefile.Release
>>> 
>>> Microsoft (R) Program Maintenance Utility Version 14.15.26726.0
>>> Copyright (C) Microsoft Corporation.  All rights reserved.
>>> 
>>>         cl -BxC:\Qt\Qt-5.11.2\bin\qmake.exe -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E C:\Qt\Qt-5.11.2\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h
>>>         C:\Qt\Qt-5.11.2\bin\moc.exe -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DPy_LIMITED_API=0x03040000 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -DNDEBUG -D_WINDLL --compiler-flavor=msvc --include C:/Users/Samuel/Downloads/PyQt5_gpl-5.11.3.dev1808131157/QtCore/release/moc_predefs.h -IC:/Qt/Qt-5.11.2/mkspecs/win32-msvc -IC:/Users/Samuel/Downloads/PyQt5_gpl-5.11.3.dev1808131157/QtCore -IC:/Users/Samuel/Downloads/PyQt5_gpl-5.11.3.dev1808131157/QtCore -IC:/Python36/include -IC:/Users/Samuel/Downloads/PyQt5_gpl-5.11.3.dev1808131157/qpy/QtCore -IC:/Qt/Qt-5.11.2/include -IC:/Qt/Qt-5.11.2/include/QtCore -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" ..\qpy\QtCore\qpycore_event_handlers.h -o release\moc_qpycore_event_handlers.cpp
>>>         cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DPy_LIMITED_API=0x03040000 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -DNDEBUG -D_WINDLL -I. -I. -IC:\Python36\include -I..\qpy\QtCore -IC:\Qt\Qt-5.11.2\include -IC:\Qt\Qt-5.11.2\include\QtCore -Irelease -IC:\Qt\Qt-5.11.2\mkspecs\win32-msvc -Forelease\ @C:\Users\Samuel\AppData\Local\Temp\nm5C87.tmp
>>> qpycore_post_init.cpp
>>> 
>>> ..\qpy\QtCore\qpycore_pyqtpyobject.h(29): fatal error C1083: Cannot open include file: 'QDataStream': No such file or directory
>>> 
>> That's failing on build, not configure, and suggests a problem with your Qt installation.
>> 
>> Phil
>> 
> Sorry, wrong terminology, but you are correct; there does seem to be a problem with Qt and possibly a bug...
> 
> I dug around in my Qt installation and found C:\Qt\Qt-5.11.2\include\QtCore\qdatastream.h, but no corresponding C:\Qt\Qt-5.11.2\include\QtCore\QDataStream. I created a file by this name containing the single line: '#include "qdatastream.h"', although I don't know if this indicates that QDataStream didn't get built into QtCore.
> 
> Running nmake again got past this error and seemed to be doing okay until it ran into problems later on. For your interest and any advice, I include the output below.
> 
> Best regards,
> Tim
> 
> 
> Microsoft (R) Program Maintenance Utility Version 14.15.26726.0
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
>         "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\nmake.exe" -f Makefile.Release
> 
> Microsoft (R) Program Maintenance Utility Version 14.15.26726.0
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
>         cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_PLUGIN -DQT_NFC_LIB -DQT_CORE_LIB -DNDEBUG -D_WINDLL -I. -I. -IC:\Python36\include -IC:\Qt\Qt-5.11.2\include -IC:\Qt\Qt-5.11.2\include\QtNfc -IC:\Qt\Qt-5.11.2\include\QtCore -Irelease -IC:\Qt\Qt-5.11.2\mkspecs\win32-msvc -Forelease\ @C:\Users\Samuel\AppData\Local\Temp\nmB274.tmp
> sipQtNfcQList0100QNdefMessage.cpp
> sipQtNfcQList0100QNdefNfcIconRecord.cpp
> sipQtNfcQList0100QNdefNfcTextRecord.cpp
> sipQtNfcQList0100QNdefRecord.cpp
> sipQtNfcQNdefFilter.cpp
> sipQtNfcQNdefFilterRecord.cpp
> sipQtNfcQNdefMessage.cpp
> sipQtNfcQNdefNfcIconRecord.cpp
> sipQtNfcQNdefNfcSmartPosterRecord.cpp
> sipQtNfcQNdefNfcTextRecord.cpp
> sipQtNfcQNdefNfcUriRecord.cpp
> sipQtNfcQNdefRecord.cpp
> sipQtNfcQNearFieldManager.cpp
> sipQtNfcQNearFieldManagerTargetAccessModes.cpp
> sipQtNfcQNearFieldShareManager.cpp
> sipQtNfcQNearFieldShareManagerShareModes.cpp
> sipQtNfcQNearFieldShareTarget.cpp
> sipQtNfcQNearFieldTarget.cpp
> sipQtNfcQNearFieldTargetAccessMethods.cpp
> sipQtNfcQNearFieldTargetRequestId.cpp
> Generating Code...
> Compiling...
> sipQtNfcQQmlNdefRecord.cpp
> sipQtNfccmodule.cpp
> Generating Code...
>         link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /OUT:release\QtNfc.dll @C:\Users\Samuel\AppData\Local\Temp\nm12D5.tmp
> Qt5Nfc.lib(Qt5Nfc.dll) : error LNK2005: "public: __thiscall QList<class QNdefRecord>::QList<class QNdefRecord>(class QList<class QNdefRecord> const &)" (??0?$QList at VQNdefRecord@@@@QAE at ABV0@@Z) already defined in sipQtNfcQList0100QNdefRecord.obj
> Qt5Nfc.lib(Qt5Nfc.dll) : error LNK2005: "public: __thiscall QList<class QNdefRecord>::~QList<class QNdefRecord>(void)" (??1?$QList at VQNdefRecord@@@@QAE at XZ) already defined in sipQtNfcQList0100QNdefRecord.obj
>    Creating library release\QtNfc.lib and object release\QtNfc.exp
> release\QtNfc.dll : fatal error LNK1169: one or more multiply defined symbols found
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\link.EXE"' : return code '0x491'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\nmake.exe"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: 'cd' : return code '0x2'
> Stop

That's a known issue. Configure with --disable QtNfc.

Phil


More information about the PyQt mailing list