emqx / qmqtt

MQTT client for Qt
https://www.emqx.com
Other
698 stars 337 forks source link

Build fails on linux and MacOS with Qt6.2.3 #238

Closed dan8551 closed 2 years ago

dan8551 commented 2 years ago

When building on Linux (Ubuntu) and macOS the build fails.

Linux compiling with "Desktop Qt 6.2.3 GCC 64bit" macOS compiling with "Qt 6.2.3 for macOS"

The build compiles correctly on:

Compiler output from Linux: `13:51:58: Running steps for project qmqtt... 13:51:58: Starting: "/home/dan/Qt/6.2.3/gcc_64/bin/qmake" /home/dan/Documents/qmqtt/qmqtt.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug Info: creating stash file /home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/.qmake.stash Info: creating cache file /home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/.qmake.cache 13:51:58: The process "/home/dan/Qt/6.2.3/gcc_64/bin/qmake" exited normally. 13:51:58: Starting: "/usr/bin/make" -f /home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/Makefile qmake_all cd src/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/src/src.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd src/ && /usr/bin/make -f Makefile qmake_all make[1]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src' cd mqtt/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile.qmqtt /home/dan/Documents/qmqtt/src/mqtt/qmqtt.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug Project MESSAGE: perl -w /home/dan/Qt/6.2.3/gcc_64/libexec/syncqt.pl -module QtQmqtt -version 1.0.0 -outdir /home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug -builddir /home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug /home/dan/Documents/qmqtt

= /home/dan/Documents/qmqtt = /home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug = /home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug cd mqtt/ && /usr/bin/make -f Makefile.qmqtt qmake_all make[2]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src/mqtt' make[2]: Nothing to be done for 'qmake_all'. make[2]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src/mqtt' make[1]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src' cd examples/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/examples/examples.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd examples/ && /usr/bin/make -f Makefile qmake_all make[1]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/examples' cd qmqtt/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/examples/qmqtt/qmqtt.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd qmqtt/ && /usr/bin/make -f Makefile qmake_all make[2]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/examples/qmqtt' cd client/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/examples/qmqtt/client/client.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd client/ && /usr/bin/make -f Makefile qmake_all make[3]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/examples/qmqtt/client' make[3]: Nothing to be done for 'qmake_all'. make[3]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/examples/qmqtt/client' make[2]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/examples/qmqtt' make[1]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/examples' cd tests/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/tests/tests.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd tests/ && /usr/bin/make -f Makefile qmake_all make[1]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests' cd auto/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/tests/auto/auto.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd auto/ && /usr/bin/make -f Makefile qmake_all make[2]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/auto' cd cmake/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/tests/auto/cmake/cmake.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd cmake/ && /usr/bin/make -f Makefile qmake_all make[3]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/auto/cmake' make[3]: Nothing to be done for 'qmake_all'. make[3]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/auto/cmake' make[2]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/auto' cd gtest/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/tests/gtest/gtest.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd gtest/ && /usr/bin/make -f Makefile qmake_all make[2]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/gtest' cd gtest/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/tests/gtest/gtest/gtest.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd gtest/ && /usr/bin/make -f Makefile qmake_all make[3]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/gtest/gtest' make[3]: Nothing to be done for 'qmake_all'. make[3]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/gtest/gtest' cd tests/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/tests/gtest/tests/tests.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd tests/ && /usr/bin/make -f Makefile qmake_all make[3]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/gtest/tests' make[3]: Nothing to be done for 'qmake_all'. make[3]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/gtest/tests' make[2]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/gtest' cd benchmarks/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/tests/benchmarks/benchmarks.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd benchmarks/ && /usr/bin/make -f Makefile qmake_all make[2]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/benchmarks' cd message/ && /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/tests/benchmarks/message/message.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug cd message/ && /usr/bin/make -f Makefile qmake_all make[3]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/benchmarks/message' make[3]: Nothing to be done for 'qmake_all'. make[3]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/benchmarks/message' make[2]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests/benchmarks' make[1]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/tests' 13:52:01: The process "/usr/bin/make" exited normally. 13:52:01: Starting: "/usr/bin/make" -j4 cd src/ && ( test -e Makefile || /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile /home/dan/Documents/qmqtt/src/src.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile make[1]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src' cd mqtt/ && ( test -e Makefile.qmqtt || /home/dan/Qt/6.2.3/gcc_64/bin/qmake -o Makefile.qmqtt /home/dan/Documents/qmqtt/src/mqtt/qmqtt.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug ) && /usr/bin/make -f Makefile.qmqtt make[2]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src/mqtt' g++ -c -pipe -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -Wsuggest-override -D_REENTRANT -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_QMQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_QML_DEBUG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NETWORK_LIB -DQT_CORE_LIB -Wall -Wextra -Werror -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal -Wnon-virtual-dtor -Wpointer-arith -Wformat-security -Wno-long-long -Wno-variadic-macros -pedantic-errors -Wchar-subscripts -Wold-style-cast -Wcast-align -Wdouble-promotion -Wfloat-conversion -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -Wzero-as-null-pointer-constant -I/home/dan/Documents/qmqtt/src/mqtt -I. -I/home/dan/Documents/qmqtt/src/mqtt -I../../include -I../../include/QtQmqtt -I../../include/QtQmqtt/1.0.0 -I../../include/QtQmqtt/1.0.0/QtQmqtt -I/home/dan/Qt/6.2.3/gcc_64/include -I/home/dan/Qt/6.2.3/gcc_64/include/QtNetwork -I/home/dan/Qt/6.2.3/gcc_64/include/QtCore -I.moc -I/home/dan/Qt/6.2.3/gcc_64/mkspecs/linux-g++ -DQT_NO_CAST_TO_ASCII=1 -DQT_NO_CAST_FROM_ASCII=1 -UQT_RESTRICTED_CAST_FROM_ASCII -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ /home/dan/Documents/qmqtt/src/mqtt/qmqtt.h -o .obj/header_qmqtt.o g++ -c -pipe -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -Wsuggest-override -D_REENTRANT -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_QMQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_QML_DEBUG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NETWORK_LIB -DQT_CORE_LIB -Wall -Wextra -Werror -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal -Wnon-virtual-dtor -Wpointer-arith -Wformat-security -Wno-long-long -Wno-variadic-macros -pedantic-errors -Wchar-subscripts -Wold-style-cast -Wcast-align -Wdouble-promotion -Wfloat-conversion -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -Wzero-as-null-pointer-constant -I/home/dan/Documents/qmqtt/src/mqtt -I. -I/home/dan/Documents/qmqtt/src/mqtt -I../../include -I../../include/QtQmqtt -I../../include/QtQmqtt/1.0.0 -I../../include/QtQmqtt/1.0.0/QtQmqtt -I/home/dan/Qt/6.2.3/gcc_64/include -I/home/dan/Qt/6.2.3/gcc_64/include/QtNetwork -I/home/dan/Qt/6.2.3/gcc_64/include/QtCore -I.moc -I/home/dan/Qt/6.2.3/gcc_64/mkspecs/linux-g++ -DQT_NO_CAST_TO_ASCII=1 -DQT_NO_CAST_FROM_ASCII=1 -UQT_RESTRICTED_CAST_FROM_ASCII -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h -o .obj/header_qmqtt_client.o g++ -c -pipe -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -Wsuggest-override -D_REENTRANT -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_QMQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_QML_DEBUG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NETWORK_LIB -DQT_CORE_LIB -Wall -Wextra -Werror -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal -Wnon-virtual-dtor -Wpointer-arith -Wformat-security -Wno-long-long -Wno-variadic-macros -pedantic-errors -Wchar-subscripts -Wold-style-cast -Wcast-align -Wdouble-promotion -Wfloat-conversion -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -Wzero-as-null-pointer-constant -I/home/dan/Documents/qmqtt/src/mqtt -I. -I/home/dan/Documents/qmqtt/src/mqtt -I../../include -I../../include/QtQmqtt -I../../include/QtQmqtt/1.0.0 -I../../include/QtQmqtt/1.0.0/QtQmqtt -I/home/dan/Qt/6.2.3/gcc_64/include -I/home/dan/Qt/6.2.3/gcc_64/include/QtNetwork -I/home/dan/Qt/6.2.3/gcc_64/include/QtCore -I.moc -I/home/dan/Qt/6.2.3/gcc_64/mkspecs/linux-g++ -DQT_NO_CAST_TO_ASCII=1 -DQT_NO_CAST_FROM_ASCII=1 -UQT_RESTRICTED_CAST_FROM_ASCII -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_frame.h -o .obj/header_qmqtt_frame.o g++ -c -pipe -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -Wsuggest-override -D_REENTRANT -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_QMQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_QML_DEBUG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NETWORK_LIB -DQT_CORE_LIB -Wall -Wextra -Werror -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal -Wnon-virtual-dtor -Wpointer-arith -Wformat-security -Wno-long-long -Wno-variadic-macros -pedantic-errors -Wchar-subscripts -Wold-style-cast -Wcast-align -Wdouble-promotion -Wfloat-conversion -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -Wzero-as-null-pointer-constant -I/home/dan/Documents/qmqtt/src/mqtt -I. -I/home/dan/Documents/qmqtt/src/mqtt -I../../include -I../../include/QtQmqtt -I../../include/QtQmqtt/1.0.0 -I../../include/QtQmqtt/1.0.0/QtQmqtt -I/home/dan/Qt/6.2.3/gcc_64/include -I/home/dan/Qt/6.2.3/gcc_64/include/QtNetwork -I/home/dan/Qt/6.2.3/gcc_64/include/QtCore -I.moc -I/home/dan/Qt/6.2.3/gcc_64/mkspecs/linux-g++ -DQT_NO_CAST_TO_ASCII=1 -DQT_NO_CAST_FROM_ASCII=1 -UQT_RESTRICTED_CAST_FROM_ASCII -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_global.h -o .obj/header_qmqtt_global.o g++ -c -pipe -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -Wsuggest-override -D_REENTRANT -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_QMQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_QML_DEBUG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NETWORK_LIB -DQT_CORE_LIB -Wall -Wextra -Werror -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal -Wnon-virtual-dtor -Wpointer-arith -Wformat-security -Wno-long-long -Wno-variadic-macros -pedantic-errors -Wchar-subscripts -Wold-style-cast -Wcast-align -Wdouble-promotion -Wfloat-conversion -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -Wzero-as-null-pointer-constant -I/home/dan/Documents/qmqtt/src/mqtt -I. -I/home/dan/Documents/qmqtt/src/mqtt -I../../include -I../../include/QtQmqtt -I../../include/QtQmqtt/1.0.0 -I../../include/QtQmqtt/1.0.0/QtQmqtt -I/home/dan/Qt/6.2.3/gcc_64/include -I/home/dan/Qt/6.2.3/gcc_64/include/QtNetwork -I/home/dan/Qt/6.2.3/gcc_64/include/QtCore -I.moc -I/home/dan/Qt/6.2.3/gcc_64/mkspecs/linux-g++ -DQT_NO_CAST_TO_ASCII=1 -DQT_NO_CAST_FROM_ASCII=1 -UQT_RESTRICTED_CAST_FROM_ASCII -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_message.h -o .obj/header_qmqtt_message.o g++ -c -pipe -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -Wsuggest-override -D_REENTRANT -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_QMQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_QML_DEBUG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NETWORK_LIB -DQT_CORE_LIB -Wall -Wextra -Werror -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal -Wnon-virtual-dtor -Wpointer-arith -Wformat-security -Wno-long-long -Wno-variadic-macros -pedantic-errors -Wchar-subscripts -Wold-style-cast -Wcast-align -Wdouble-promotion -Wfloat-conversion -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -Wzero-as-null-pointer-constant -I/home/dan/Documents/qmqtt/src/mqtt -I. -I/home/dan/Documents/qmqtt/src/mqtt -I../../include -I../../include/QtQmqtt -I../../include/QtQmqtt/1.0.0 -I../../include/QtQmqtt/1.0.0/QtQmqtt -I/home/dan/Qt/6.2.3/gcc_64/include -I/home/dan/Qt/6.2.3/gcc_64/include/QtNetwork -I/home/dan/Qt/6.2.3/gcc_64/include/QtCore -I.moc -I/home/dan/Qt/6.2.3/gcc_64/mkspecs/linux-g++ -DQT_NO_CAST_TO_ASCII=1 -DQT_NO_CAST_FROM_ASCII=1 -UQT_RESTRICTED_CAST_FROM_ASCII -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_networkinterface.h -o .obj/header_qmqtt_networkinterface.o /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:219:7: error: expected ?:? before ?int? 219 | public slots: | ^ | : /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:220:5: error: expected primary-expression before ?void? 220 | void setHost(const QHostAddress& host); | ^~~~ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:219:13: error: expected ?;? at end of member declaration 219 | public slots: | ^ | ; /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:250:5: error: expected primary-expression before ?void? 250 | void connected(); | ^~~~ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:249:8: error: expected ?;? at end of member declaration 249 | signals: | ^ | ; /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:263:10: error: expected ?:? before ?int? 263 | protected slots: | ^ | : /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:264:5: error: expected primary-expression before ?void? 264 | void onNetworkConnected(); | ^~~~ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:263:16: error: expected ?;? at end of member declaration 263 | protected slots: | ^ | ; In file included from /home/dan/Documents/qmqtt/src/mqtt/qmqtt.h:36: /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:219:7: error: expected ?:? before ?int? 219 | public slots: | ^ | : /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:220:5: error: expected primary-expression before ?void? 220 | void setHost(const QHostAddress& host); | ^~~~ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:219:13: error: expected ?;? at end of member declaration 219 | public slots: | ^ | ; /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:250:5: error: expected primary-expression before ?void? 250 | void connected(); | ^~~~ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:249:8: error: expected ?;? at end of member declaration 249 | signals: | ^ | ; /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:263:10: error: expected ?:? before ?int? 263 | protected slots: | ^ | : /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:264:5: error: expected primary-expression before ?void? 264 | void onNetworkConnected(); | ^~~~ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_client.h:263:16: error: expected ?;? at end of member declaration 263 | protected slots: | ^ | ; make[2]: *** [Makefile.qmqtt:1564: .obj/header_qmqtt_client.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [Makefile.qmqtt:1458: .obj/header_qmqtt.o] Error 1 /home/dan/Documents/qmqtt/src/mqtt/qmqtt_networkinterface.h:72:7: error: expected ?:? before ?int? 72 | public slots: | ^ | : /home/dan/Documents/qmqtt/src/mqtt/qmqtt_networkinterface.h:73:5: error: expected primary-expression before ?virtual? 73 | virtual void connectToHost(const QHostAddress& host, const quint16 port) = 0; | ^~~~~~~ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_networkinterface.h:72:13: error: expected ?;? at end of member declaration 72 | public slots: | ^ | ; /home/dan/Documents/qmqtt/src/mqtt/qmqtt_networkinterface.h:81:5: error: expected primary-expression before ?void? 81 | void connected(); | ^~~~ /home/dan/Documents/qmqtt/src/mqtt/qmqtt_networkinterface.h:80:8: error: expected ?;? at end of member declaration 80 | signals: | ^ | ; make[2]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src/mqtt' make[2]: *** [Makefile.qmqtt:1822: .obj/header_qmqtt_networkinterface.o] Error 1 make[1]: Leaving directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src' make[1]: *** [Makefile:47: sub-mqtt-qmqtt-pro-make_first] Error 2 make: *** [Makefile:49: sub-src-make_first] Error 2 13:52:07: The process "/usr/bin/make" exited with code 2. Error while building/deploying project qmqtt (kit: Desktop Qt 6.2.3 GCC 64bit) When executing step "Make" 13:52:07: Elapsed time: 00:09. `
mwallnoefer commented 2 years ago

Please try the changes made my @alex-spataru raised in PR #231. Unfortunately we weren't able to include them successfully since they are breaking the Qt5-based build.

We remind you that qmqtt is basically out of development/support, so we are only accepting essential bug fixes but no new features.

@ejvr Do you have any other suggestion?

dan8551 commented 2 years ago

Please try the changes made my @alex-spataru raised in PR #231. Unfortunately we weren't able to include them successfully since they are breaking the Qt5-based build.

We remind you that qmqtt is basically out of development/support, so we are only accepting essential bug fixes but no new features.

@ejvr Do you have any other suggestion?

Tried PR #231 with the same issues as above.

ejvr commented 2 years ago

Tricky question, the error messages are quite hard to read. It seems that the 'slots' pseudo keyword some of the headers is not recognized. For now, I would advice to use cmake instead of qmake when using QT 6. This seems to be the default these days.

ejvr commented 2 years ago

I did some simple analysis: the QMQTT master branch compiles using QT6.2.3 and qmake. At least, on my setup.

@dan8551 your build log contains some weird errors, like this one:

make[2]: Entering directory '/home/dan/Documents/build-qmqtt-Desktop_Qt_6_2_3_GCC_64bit-Debug/src/mqtt'
g++ -c -pipe -g -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -Wsuggest-override -D_REENTRANT -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_QMQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_QML_DEBUG -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NETWORK_LIB -DQT_CORE_LIB -Wall -Wextra -Werror -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal -Wnon-virtual-dtor -Wpointer-arith -Wformat-security -Wno-long-long -Wno-variadic-macros -pedantic-errors -Wchar-subscripts -Wold-style-cast -Wcast-align -Wdouble-promotion -Wfloat-conversion -Wno-deprecated-copy -Wno-redundant-move -Wno-format-overflow -Wno-init-list-lifetime -Wzero-as-null-pointer-constant -I/home/dan/Documents/qmqtt/src/mqtt -I. -I/home/dan/Documents/qmqtt/src/mqtt -I../../include -I../../include/QtQmqtt -I../../include/QtQmqtt/1.0.0 -I../../include/QtQmqtt/1.0.0/QtQmqtt -I/home/dan/Qt/6.2.3/gcc_64/include -I/home/dan/Qt/6.2.3/gcc_64/include/QtNetwork -I/home/dan/Qt/6.2.3/gcc_64/include/QtCore -I.moc -I/home/dan/Qt/6.2.3/gcc_64/mkspecs/linux-g++ -DQT_NO_CAST_TO_ASCII=1 -DQT_NO_CAST_FROM_ASCII=1 -UQT_RESTRICTED_CAST_FROM_ASCII -DQT_NO_URL_CAST_FROM_STRING=1 -DQT_NO_CAST_FROM_BYTEARRAY=1 -DQT_NO_KEYWORDS=1 -DQT_USE_QSTRINGBUILDER -DQT_USE_FAST_OPERATOR_PLUS -Dsignals=int -Dslots=int -Demit=public: -Dforeach=public: -Dforever=public: -xc++ 
/home/dan/Documents/qmqtt/src/mqtt/qmqtt.h -o .obj/header_qmqtt.o

For some reason the compiler tries to compile a header file. I don't see why (maybe precompiled headers???). Also, there are a few strange defines passed to the compiler, especially -Dsignals=int -Dslots=int -Demit=public:. Those seem to cause the compiler errors. I don't know where those defines come from, but I suspect that in this case qmqtt is not being built using qmake.pro in the repo.

dan8551 commented 2 years ago

@ejvr the build is trying to compile completely from stock with no changes to your code or the compiler. Can I ask what your build environment is? The macOS environment is running on a M1 processor. No changes were made to either the compiler or the source.

ejvr commented 2 years ago

I compiled on debian linux (version 11) with QT 6.2.3 (64 bits), and gcc 10.2.1.

Right now, I don't have access to Apple hardware, so I have no clue on how the debug this. Could you try to run a build from a command prompt and use qmake + make without any command line options?

JuniorSuperTux commented 2 years ago

I compiled on debian linux (version 11) with QT 6.2.3 (64 bits), and gcc 10.2.1.

Right now, I don't have access to Apple hardware, so I have no clue on how the debug this. Could you try to run a build from a command prompt and use qmake + make without any command line options?

I have the same setup as yours, but the same problem like @dan8551

ejvr commented 2 years ago

@JuniorSuperTux Do you also see this in the build output: -Dsignals=int -Dslots=int -Demit=public:? If so, there's a serious problem with the setup. No QT application will compile with those settings.

Regarding my earlier comments in this issue: did you try to use cmake? Alternatively, did you try to run the build with just qmake and make (so no extra options)?

EDIT: yet another question: how did you install qt6 on your system? afaik, there's no qt6 support in debian yet, which leaves 2 options: binary download or manual build.

ejvr commented 2 years ago

The issue seems to be related to the makefile generated by qmake: it enables a feature where use of the signals and slots macros cause a compiler error. Instead those macros you should use QT_SIGNALS and QT_SLOTS. This is done to avoid problems with signal/slot patterns defined by other libraries such as boost.

I've create a pull request do fixes this. It also a warning about using 0 as null pointer (instead of nullptr). In this particular setup the warning is promoted to a compiler error.

mwallnoefer commented 2 years ago

Should be fixed now.