Closed MiguelAlonsoLazcano closed 5 years ago
I am 99% sure this is caused by using -fdirectives-only, i.e. you need to set ICECC_REMOTE_CPP=0. You can see in your pasted log that -fdirectives-only is used. So make sure you disable it and verify in the log that it's not used.
Unless you can provide that this is really something else than -fdirectives-only problem (which is a GCC bug), then closing. If you provide more info, please reopen.
In qbytearray.h and qstring.h, you can replace the #pragma push_macro("Q_REQUIRED_RESULT") section with #define Q_REQUIRED_RESULT_NONE and make the appropriate code changes to use that #define. That should allow you to build with icecc without needing ICECC_CARET_WORKAROUND=0 and ICECC_REMOTE_CPP=0. This should improve build times significantly in certain use cases.
When compiling a large project based on QT with icecream we are experincing an error: 'Q_REQUIRED_RESULT' does not name a type causing that our distributed compilation crash in the remote nodes. Looks like we are missing the Q_REQUIRED_RESULT definition in multiple QT headers when we compile in the nodes, we tried to use ICECC_CARET_WORKAROUND=0 and ICECC_REMOTE_CPP=0 to bypass the bug with no success, also tried to remove -fdirectives-only flag and add -fno-diagnostics-show-caret to compile args in the deamon/workit.cpp to disable the gcc pre-processing but the result is pretty much the same. I already check a lot of multiple bugs related (#336 , #419 , #421 ) Our compiler nodes are 6 cores, 8 G ram, running in a vm.
Part of the log in one remote node:
[30379] 2019-04-18 17:52:35: accepted 10 172.25.143.73 [30379] 2019-04-18 17:52:35: request for job 7604 [30379] 2019-04-18 17:52:35: handle connection returned 30422 [30422] 2019-04-18 22:52:35: remote compile for file <path../../>file.cpp [30422] 2019-04-18 22:52:35: remote compile arguments: -c -fdirectives-only --sysroot=/home/our_requesting_node/buildbox -std=c++14 -fno-omit-frame-pointer -Werror -Wall -Wextra -Warray-bounds -Winit-self -Wcast-align -Wpointer-arith -fstrict-aliasing -fmessage-length=0 -Wcast-qual -Woverflow -Woverlength-strings -Wpragmas -Wunused -Woverloaded-virtual -fPIC -fPIC -std=c++14 -g -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -DBOOST_MPL_LIMIT_LIST_SIZE=40 -DFieldsApp_EXPORTS -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_STRICT_ITERATORS -DQT_WIDGETS_LIB -DWR8_BAYTRAIL_64 -DUNICODE -D_UNICODE -DGSIX -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -DBOOST_MPL_LIMIT_LIST_SIZE=40 -DHAVE_INT64_T_64 -gsplit-dwarf [30423] 2019-04-18 22:52:35: Compile job memory limit set to 2653 megabytes [30423] 2019-04-18 22:52:35: final arguments: -x c++ -c -fdirectives-only --sysroot=/home/our_requesting_node/buildbox -std=c++14 -fno-omit-frame-pointer -Werror -Wall -Wextra -Warray-bounds -Winit-self -Wcast-align -Wpointer-arith -fstrict-aliasing -fmessage-length=0 -Wcast-qual -Woverflow -Woverlength-strings -Wpragmas -Wunused -Woverloaded-virtual -fPIC -fPIC -std=c++14 -g -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -DBOOST_MPL_LIMIT_LIST_SIZE=40 -DFieldsApp_EXPORTS -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_STRICT_ITERATORS -DQT_WIDGETS_LIB -DWR8_BAYTRAIL_64 -DUNICODE -D_UNICODE -DGSIX -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -DBOOST_MPL_LIMIT_LIST_SIZE=40 -DHAVE_INT64_T_64 -gsplit-dwarf -fpreprocessed - -o <path../../>file.cpp.o --param ggc-min-expand=100 --param ggc-min-heapsize=131072 -fdebug-prefix-map=/tmp/icecc-6j8HlA/=/ [30422] 2019-04-18 22:52:35: <parent, waiting> [30422] 2019-04-18 22:52:38: rmsg.err= In file included from ../buildbox/usr/local/Trolltech/Qt-5/include/QtCore/qstring.h:49:0, from ../buildbox/usr/local/Trolltech/Qt-5/include/QtCore/qobject.h:47, from ../buildbox/usr/local/Trolltech/Qt-5/include/QtWidgets/qgraphicsitem.h:44, from ../buildbox/usr/local/Trolltech/Qt-5/include/QtWidgets/QGraphicsPixmapItem:1, from ../../../<path../../>file_handler_factory.h:10, from ../../../<path../../>file_handler.h:9, from ../../../<path../../>file.h:10, from ../../../<path../../>file.cpp:8: ../buildbox/usr/local/Trolltech/Qt-5/include/QtCore/qbytearray.h:279:5: error: 'Q_REQUIRED_RESULT' does not name a type
Does any one have an idea how to resolve this issue? , the problem appears only when cross-compiling a project with C++ and Qt, I already succesfully compile different C/C++ projects. The cross-compiled toolchain and enviroment tarball located in /var/cache/icecc in the origin node and remote nodes is the same but I am still not sure if the issue is with a wrong configuration in the toolchain or the enviroment.
Remote node:
root@remote-virtual-machine:/var/cache/icecc/target=x86_64# ls
icecc-<removed>_64-1.0.200-1-1.default.183.db4088f6d558.sisko
Origin node:
(docker)user@96f3e88ba162:~/<removed>$ echo $ICECC_VERSION
x86_64:/opt/../../icecc-<removed>_64-1.0.200-1-1.default.183.db4088f6d558.sisko.tar.gz
I would appreciated any help, thanks in advance!