[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] fatal error configuring PyQt5.11.2: Cannot open include file: 'QDataStream': No such file
From:       "Timothy W. Grove" <tim_grove () sil ! org>
Date:       2018-09-17 22:42:22
Message-ID: 502da7e3-beb4-1c1d-9088-4352fd9082b9 () sil ! org
[Download RAW message or body]

On 17/09/2018 21:59, Phil Thompson wrote:
> On 17 Sep 2018, at 7:23 pm, Timothy W. Grove <tim_grove@sil.org> wrote:
> > 
> > 
> > On 13/09/2018 08:58, Phil Thompson wrote:
> > > On 12 Sep 2018, at 10:36 pm, Timothy W. Grove <tim_grove@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@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@VQNdefRecord@@@@QAE@ABV0@@Z) already defined in \
> > > > sipQtNfcQList0100QNdefRecord.obj Qt5Nfc.lib(Qt5Nfc.dll) : error LNK2005: "
> > > > public: __thiscall QList<class QNdefRecord>::~QList<class QNdefRecord>(void)
> > > > " (??1?$QList@VQNdefRecord@@@@QAE@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
> > > 
> > Qt, SIP and PyQt5 all seem to configure, build and install okay, but nothing will import. \
> > Any hints to a solution in the comments below? Thanks again. 
> > Best regards,
> > Tim
> > 
> > Environment
> > **********************************************************************
> > ** Visual Studio 2017 Developer Command Prompt v15.8.3
> > ** Copyright (c) 2017 Microsoft Corporation
> > **********************************************************************
> > [vcvarsall.bat] Environment initialized for: 'x86'
> > Qt 5.11.2
> > > git clone git://code.qt.io/qt/qt5.git
> > > cd qt
> > qt>git checkout 5.11
> > qt>perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine
> > qt>configure -mediaplayer-backend wmf -opensource -confirm-license -nomake examples -nomake \
> > tests -mp -opengl dynamic qt>namke
> > qt>nmake install
> > 
> > SIP (sip-4.19.13.dev1809111822)
> > > python configure.py --sip-module PyQt5.sip
> > > nmake
> > > nmake install
> > PyQt5 (PyQt5_gpl-5.11.3.dev1809141810)
> > > python configure.py --qmake C:/Qt/Qt-5.11.2/bin/qmake.exe --confirm-license --disable \
> > > QtNfc
> > Some of the output from configure...
> > 
> > Qt v5.11.2 is being used.
> > The qmake executable is C:\Qt\Qt-5.11.2\bin\qmake.exe.
> > Qt is built as a shared library.
> > SIP 4.19.13.dev1809111822 is being used.
> > The sip executable is C:\Python36\sip.exe.
> > These PyQt5 modules will be built: QtCore, QtGui, QtHelp, QtMultimedia,
> > QtMultimediaWidgets, QtNetwork, QtOpenGL, QtPrintSupport, QtQml, QtQuick,
> > QtSql, QtSvg, QtTest, QtWidgets, QtXml, QtXmlPatterns, QtDesigner,
> > QAxContainer, QtDBus, _QOpenGLFunctions_2_0, _QOpenGLFunctions_2_1,
> > _QOpenGLFunctions_4_1_Core, QtSensors, QtSerialPort, QtBluetooth,
> > QtPositioning, QtWinExtras, QtQuickWidgets, QtWebSockets, QtWebChannel,
> > QtLocation, QtNetworkAuth.
> > The PyQt5 Python package will be installed in C:\Python36\Lib\site-packages.
> > PyQt5 is being built with generated docstrings.
> > The Designer plugin will be installed in C:/Qt/Qt-5.11.2/plugins/designer.
> > The qmlscene plugin will be installed in C:/Qt/Qt-5.11.2/plugins/PyQt5.
> > The PyQt5 PEP 484 stub files will be installed in
> > C:\Python36\Lib\site-packages\PyQt5.
> > The PyQt5 .sip files will be installed in C:\Python36\sip\PyQt5.
> > pyuic5, pyrcc5 and pylupdate5 will be installed in C:\Python36.
> > The interpreter used by pyuic5 is C:\Python36\python.exe.
> > Generating the C++ source for the QtCore module...
> > Embedding sip flags...
> > 
> > > nmake
> > > nmake install
> > 
> > All seems well, so attempt to import some module...
> > > python
> > Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] on \
> > win32 Type "help", "copyright", "credits" or "license" for more information.
> > > > > from PyQt.QtCore import QTimer
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > ModuleNotFoundError: No module named 'PyQt'
> Is your Qt bin directory on PATH?
> 
> Phil
> 
Thanks Phil. It wasn't on PATH (I assumed that passing "--qmake 
C:/Qt/Qt-5.11.2/bin/qmake.exe" to configure was enough), but now that it 
is, everything is working great; success at last! Kyle spotted that I 
had written PyQt.Core instead of PyQt5.Core, but this was only a typing 
error in my email and correct import statements were not working either. 
Now they are and thanks again for your help.

Best regards,
Tim


_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic