Closed dimich-dmb closed 1 month ago
What if you apply the following patch?
diff --git a/src/core/modules/SolarSystem.cpp b/src/core/modules/SolarSystem.cpp
index 0e8a6f104b..83ccdd8178 100644
--- a/src/core/modules/SolarSystem.cpp
+++ b/src/core/modules/SolarSystem.cpp
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/
+#include <execution> // must be included before Qt because some versions of libtbb use "emit" identifier for their needs
+
#include "SolarSystem.hpp"
#include "StelTexture.hpp"
#include "EphemWrapper.hpp"
@@ -48,7 +50,6 @@
#include "StelObserver.hpp"
#include <algorithm>
-#include <execution>
#include <QTextStream>
#include <QSettings>
What if you apply the following patch?
The same error but now "In file included from ... src/core/modules/SolarSystem.cpp:22"
Probably that's because of gcc command line option
-include /home/dimich/work/src/stellarium/BUILD/src/CMakeFiles/stelMain.dir/cmake_pch.hxx
which includes src/stelMain_pch.hpp
which also includes Qt headers.
CC @krachyon
@dimich-dmb please try configure building Stellarium without PCH - -DENABLE_PCH=0
OK, and what if we alter the patch to also include the header into the PCH?
diff --git a/src/core/modules/SolarSystem.cpp b/src/core/modules/SolarSystem.cpp
index 0e8a6f104b..83ccdd8178 100644
--- a/src/core/modules/SolarSystem.cpp
+++ b/src/core/modules/SolarSystem.cpp
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/
+#include <execution> // must be included before Qt because some versions of libtbb use "emit" identifier for their needs
+
#include "SolarSystem.hpp"
#include "StelTexture.hpp"
#include "EphemWrapper.hpp"
@@ -48,7 +50,6 @@
#include "StelObserver.hpp"
#include <algorithm>
-#include <execution>
#include <QTextStream>
#include <QSettings>
diff --git a/src/stelMain_pch.hpp b/src/stelMain_pch.hpp
index 9c35362285..c7677fd19c 100644
--- a/src/stelMain_pch.hpp
+++ b/src/stelMain_pch.hpp
@@ -28,6 +28,7 @@
// It seems that inclusion of some headers is actually bad for build time, these are commented away again. More teting or other compiler combinations may have slightly other results.
// Base time was 284s from first test without PCH
+#include <execution> // must be included before Qt because some versions of libtbb use "emit" identifier for their needs
#include "StelApp.hpp"
#include<QDebug>
#include "StelUtils.hpp"
@dimich-dmb please try configure building Stellarium without PCH -
-DENABLE_PCH=0
That does not change the error for me when building with https://aur.archlinux.org/packages/stellarium and TBB installed.
I think it's just the conflict between QT's emit
macro and TBB defining a function called emit
as @10110111 noted in his patch.
Not sure what the cleanest way to solve this would be in this context, but seems sensible to just include <execution>
before any QT-header.
Another user reported the same error with onetbb, confirming above comment, looks like onetbb is an optional makedepedency for stellarium.
Could someone test the build with TBB having applied my second patch? If the patch works, I'll just push it so that the next release will not have the problem at all.
Probably this issue will be happen in macOS too - I'll check it tomorrow.
Could someone test the build with TBB having applied my second patch? If the patch works, I'll just push it so that the next release will not have the problem at all.
With your patch, compilation works (on my machine ;) )
Btw, enabling PCH does not seem to make much of a difference wrt. to build time for me on a Ryzen 7 5700U if that's an interesting datapoint relating to the comment in stelMain_pch.hpp
@dimich-dmb please try configure building Stellarium without PCH -
-DENABLE_PCH=0
With -DENABLE_PCH=0
AND with the patch above compilation succeeds.
With -DENABLE_PCH=0
but without the patch compilation fails.
Hello @dimich-dmb!
Please check the fresh version (development snapshot) of Stellarium: https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot
v24.3 compilation fails with error:
Steps to reproduce
System
Cmake configuration output:
Sources tagged v24.2 in the same environment are compiled successfully without errors.