Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Can not compile qtopcua for mxe



  • Hello,

    i want to create a new package for mxe.cc.

    When i checkout the code with git, everything is ok:

    klaus@klaus-MS-7823:~/Downloads$ git clone https://code.qt.io/qt/qtopcua.git
    Klone nach 'qtopcua' ...
    remote: Counting objects: 8622, done.
    remote: Compressing objects: 100% (4649/4649), done.
    remote: Total 8622 (delta 5364), reused 6340 (delta 3892)
    Empfange Objekte: 100% (8622/8622), 2.55 MiB | 5.18 MiB/s, Fertig.
    Löse Unterschiede auf: 100% (5364/5364), Fertig.
    klaus@klaus-MS-7823:~/Downloads$ cd qtopcua
    klaus@klaus-MS-7823:~/Downloads/qtopcua$ git checkout 5.15
    Branch '5.15' folgt nun Remote-Branch '5.15' von 'origin'.
    Zu neuem Branch '5.15' gewechselt
    klaus@klaus-MS-7823:~/Downloads/qtopcua$ PATH=$PATH:/home/klaus/Downloads/mxe/usr/bin
    klaus@klaus-MS-7823:~/Downloads/qtopcua$ /home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/bin/qmake "CONFIG+=release"  "QMAKE_CXXFLAGS +=-fpermissive"
    Info: creating stash file /home/klaus/Downloads/qtopcua/.qmake.stash
    Info: creating cache file /home/klaus/Downloads/qtopcua/.qmake.cache
    
    Running configuration tests...
    Checking for mbedtls... no
    Checking for Open62541... no
    Checking for Unified Automation C++ SDK... no
    Done running configuration tests.
    
    Configure summary:
    
    Qt Opcua:
      Open62541 .............................. yes
      Unified Automation C++ SDK ............. no
      Support for namespace 0 NodeId names ... yes
      Namespace 0 NodeIds generator .......... no
      mbedtls ................................ no
      Support for global discovery server .... yes
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into '/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    klaus@klaus-MS-7823:~/Downloads/qtopcua$ make
    cd src/ && ( test -e Makefile || /home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/bin/qmake -o Makefile /home/klaus/Downloads/qtopcua/src/src.pro CONFIG+=release 'QMAKE_CXXFLAGS +=-fpermissive' ) && make -f Makefile 
    make[1]: Verzeichnis „/home/klaus/Downloads/qtopcua/src“ wird betreten
    cd opcua/ && ( test -e Makefile || /home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/bin/qmake -o Makefile /home/klaus/Downloads/qtopcua/src/opcua/opcua.pro CONFIG+=release 'QMAKE_CXXFLAGS +=-fpermissive' ) && make -f Makefile 
    Project MESSAGE: perl -w /home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/bin/syncqt.pl -module QtOpcUa -version 5.15.1 -outdir /home/klaus/Downloads/qtopcua -builddir /home/klaus/Downloads/qtopcua /home/klaus/Downloads/qtopcua
    <srcbase> = /home/klaus/Downloads/qtopcua 
    <bldbase> = /home/klaus/Downloads/qtopcua 
    <outbase> = /home/klaus/Downloads/qtopcua 
    QtOpcUa: created fwd-include header(s) for <srcbase>/src/opcua/ { qopcuaglobal.h (1) }
    QtOpcUa: created fwd-include header(s) for <srcbase>/src/opcua/client/ { qopcuaaddnodeitem.h (2), qopcuaaddreferenceitem.h (2), qopcuaapplicationdescription.h (2), qopcuaapplicationidentity.h (2), qopcuaapplicationrecorddatatype.h (2), qopcuaargument.h (2), qopcuaattributeoperand.h (2), qopcuaauthenticationinformation.h (2), qopcuaaxisinformation.h (2), qopcuabackend_p.h (1), qopcuabinarydataencoding.h (2), qopcuabrowsepathtarget.h (2), qopcuabrowserequest.h (2), qopcuaclient.h (2), qopcuaclient_p.h (1), qopcuaclientimpl_p.h (1), qopcuacomplexnumber.h (2), qopcuacontentfilterelement.h (2), qopcuacontentfilterelementresult.h (2), qopcuadeletereferenceitem.h (2), qopcuadoublecomplexnumber.h (2), qopcuaelementoperand.h (2), qopcuaendpointdescription.h (2), qopcuaerrorstate.h (2), qopcuaeuinformation.h (2), qopcuaeventfilterresult.h (2), qopcuaexpandednodeid.h (2), qopcuaextensionobject.h (2), qopcuagdsclient.h (2), qopcuagdsclient_p.h (1), qopcualiteraloperand.h (2), qopcualocalizedtext.h (2), qopcuamonitoringparameters.h (2), qopcuamonitoringparameters_p.h (1), qopcuamultidimensionalarray.h (2), qopcuanode.h (2), qopcuanode_p.h (1), qopcuanodecreationattributes.h (2), qopcuanodecreationattributes_p.h (1), qopcuanodeids.h (1), qopcuanodeimpl_p.h (1), qopcuapkiconfiguration.h (2), qopcuaqualifiedname.h (2), qopcuarange.h (2), qopcuareaditem.h (2), qopcuareadresult.h (2), qopcuareferencedescription.h (2), qopcuarelativepathelement.h (2), qopcuasimpleattributeoperand.h (2), qopcuatype.h (1), qopcuausertokenpolicy.h (2), qopcuawriteitem.h (2), qopcuawriteresult.h (2), qopcuaxvalue.h (2) }
    QtOpcUa: created fwd-include header(s) for <srcbase>/src/opcua/core/ { qopcuaplugin.h (2), qopcuaprovider.h (2) }
    QtOpcUa: created fwd-include header(s) for <srcbase>/src/opcua/x509/ { openssl_symbols_p.h (1), qopcuakeypair.h (2), qopcuakeypair_p.h (1), qopcuax509certificatesigningrequest.h (2), qopcuax509certificatesigningrequest_p.h (1), qopcuax509distinguishedname.h (2), qopcuax509extension.h (2), qopcuax509extension_p.h (1), qopcuax509extensionbasicconstraints.h (2), qopcuax509extensionextendedkeyusage.h (2), qopcuax509extensionkeyusage.h (2), qopcuax509extensionsubjectalternativename.h (2), qopcuax509utils_p.h (1), qsslsocket_openssl11_symbols_p.h (1), qsslsocket_opensslpre11_symbols_p.h (1) }
    QtOpcUa: created version header
    QtOpcUa: created master header
    QtOpcUa: created headers.pri file
    make[2]: Verzeichnis „/home/klaus/Downloads/qtopcua/src/opcua“ wird betreten
    make -f Makefile.Release
    make[3]: Verzeichnis „/home/klaus/Downloads/qtopcua/src/opcua“ wird betreten
    i686-w64-mingw32.shared-g++ -c -pipe -fno-keep-inline-dllexport -fpermissive -msse2 -mstackrealign -mfpmath=sse -O2 -std=c++1y -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_OPCUA_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_FOREACH -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQ_USE_SYBASE -I. -I../../include -I../../include/QtOpcUa -I../../include/QtOpcUa/5.15.1 -I../../include/QtOpcUa/5.15.1/QtOpcUa -Itmp -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork/5.15.0 -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork/5.15.0/QtNetwork -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore/5.15.0 -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore/5.15.0/QtCore -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore -I.moc/release -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/mkspecs/win32-g++  -o .obj/release/qopcuaprovider.o core/qopcuaprovider.cpp
    core/qopcuaprovider.cpp: In function 'QHash<QString, QJsonObject> loadPluginMetadata()':
    core/qopcuaprovider.cpp:110:82: warning: 'QHash<K, V>::iterator QHash<K, V>::insertMulti(const Key&, const T&) [with Key = QString; T = QJsonObject]' is deprecated: Use QMultiHash for hashes storing multiple values with the same key. [-Wdeprecated-declarations]
         plugins.insertMulti(obj.value(QStringLiteral("Provider")).toString(), obj);
                                                                                  ^
    In file included from core/qopcuaprovider.h:42:0,
                     from core/qopcuaprovider.cpp:38:
    /home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore/qhash.h:1225:55: note: declared here
     Q_OUTOFLINE_TEMPLATE typename QHash<Key, T>::iterator QHash<Key, T>::insertMult
                                                           ^
    i686-w64-mingw32.shared-g++ -c -pipe -fno-keep-inline-dllexport -fpermissive -msse2 -mstackrealign -mfpmath=sse -O2 -std=c++1y -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_OPCUA_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_FOREACH -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQ_USE_SYBASE -I. -I../../include -I../../include/QtOpcUa -I../../include/QtOpcUa/5.15.1 -I../../include/QtOpcUa/5.15.1/QtOpcUa -Itmp -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork/5.15.0 -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork/5.15.0/QtNetwork -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore/5.15.0 -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore/5.15.0/QtCore -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore -I.moc/release -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/mkspecs/win32-g++  -o .obj/release/qopcuaplugin.o core/qopcuaplugin.cpp
    .......
    

    When i use the zip file from https://github.com/qt/qtopcua/archive/5.15.zip, i can't compile it.

    klaus@klaus-MS-7823:~/Downloads/qtopcua-5.15$ PATH=$PATH:/home/klaus/Downloads/mxe/usr/bin
    klaus@klaus-MS-7823:~/Downloads/qtopcua-5.15$ /home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/bin/qmake "CONFIG+=release"  "QMAKE_CXXFLAGS +=-fpermissive"
    Info: creating stash file /home/klaus/Downloads/qtopcua-5.15/.qmake.stash
    Info: creating cache file /home/klaus/Downloads/qtopcua-5.15/.qmake.cache
    
    Running configuration tests...
    Checking for mbedtls... no
    Checking for Open62541... no
    Checking for Unified Automation C++ SDK... no
    Done running configuration tests.
    
    Configure summary:
    
    Qt Opcua:
      Open62541 .............................. yes
      Unified Automation C++ SDK ............. no
      Support for namespace 0 NodeId names ... yes
      Namespace 0 NodeIds generator .......... no
      mbedtls ................................ no
      Support for global discovery server .... yes
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into '/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5'.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    klaus@klaus-MS-7823:~/Downloads/qtopcua-5.15$ make
    cd src/ && ( test -e Makefile || /home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/bin/qmake -o Makefile /home/klaus/Downloads/qtopcua-5.15/src/src.pro CONFIG+=release 'QMAKE_CXXFLAGS +=-fpermissive' ) && make -f Makefile 
    make[1]: Verzeichnis „/home/klaus/Downloads/qtopcua-5.15/src“ wird betreten
    cd opcua/ && ( test -e Makefile || /home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/bin/qmake -o Makefile /home/klaus/Downloads/qtopcua-5.15/src/opcua/opcua.pro CONFIG+=release 'QMAKE_CXXFLAGS +=-fpermissive' ) && make -f Makefile 
    make[2]: Verzeichnis „/home/klaus/Downloads/qtopcua-5.15/src/opcua“ wird betreten
    make -f Makefile.Release
    make[3]: Verzeichnis „/home/klaus/Downloads/qtopcua-5.15/src/opcua“ wird betreten
    i686-w64-mingw32.shared-g++ -c -pipe -fno-keep-inline-dllexport -fpermissive -msse2 -mstackrealign -mfpmath=sse -O2 -std=c++1y -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_OPCUA_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_FOREACH -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQ_USE_SYBASE -I. -I../../include -I../../include/QtOpcUa -I../../include/QtOpcUa/5.15.1 -I../../include/QtOpcUa/5.15.1/QtOpcUa -Itmp -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork/5.15.0 -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork/5.15.0/QtNetwork -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore/5.15.0 -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore/5.15.0/QtCore -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtNetwork -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/include/QtCore -I.moc/release -I/home/klaus/Downloads/mxe/usr/i686-w64-mingw32.shared/qt5/mkspecs/win32-g++  -o .obj/release/qopcuaprovider.o core/qopcuaprovider.cpp
    In file included from core/qopcuaprovider.cpp:37:0:
    core/qopcuaplugin.h:40:34: fatal error: QtOpcUa/qopcuaglobal.h: No such file or directory
    compilation terminated.
    make[3]: *** [Makefile.Release:1569: .obj/release/qopcuaprovider.o] Fehler 1
    make[3]: Verzeichnis „/home/klaus/Downloads/qtopcua-5.15/src/opcua“ wird verlassen
    make[2]: *** [Makefile:45: release] Fehler 2
    make[2]: Verzeichnis „/home/klaus/Downloads/qtopcua-5.15/src/opcua“ wird verlassen
    make[1]: *** [Makefile:52: sub-opcua-make_first] Fehler 2
    make[1]: Verzeichnis „/home/klaus/Downloads/qtopcua-5.15/src“ wird verlassen
    make: *** [Makefile:53: sub-src-make_first] Fehler 2
    

    But if i copy the .git directory to the zip file directory, it compiles. I am confused!

    It runs a perl script, when there is this .git directory, why?

    Best regards,
    Klaus


Log in to reply