Can't compile the code because of GPS

Asked by Antonio Alonzi on 2017-04-04

Hi guys,

I'm compiling latest version of the source code with the following command (as it seems I can't install qt5positioning-dev):

 cmake -DENABLE_GPS=0 -DENABLE_LIBGPS=0 ../..

And after that I get compilation error on StelLocationMgr::locationFromGPS

I fixed it locally with the following diff underneath.
I was wondering if it is something that should go on the trunk.

If yes what is the process to push it?
Do I have to create a branch and then asked to be reviewed and merged?

Kind regards
Antonio

----------------------------------------------------------------------------------

=== modified file 'src/core/StelLocationMgr.cpp'
--- src/core/StelLocationMgr.cpp 2017-04-04 04:08:40 +0000
+++ src/core/StelLocationMgr.cpp 2017-04-04 20:18:02 +0000
@@ -704,9 +704,9 @@
  connect(networkReply, SIGNAL(finished()), this, SLOT(changeLocationFromNetworkLookup()));
 }

+#ifdef ENABLE_LIBGPS
 bool StelLocationMgr::locationFromGPS()
 {
-#ifdef ENABLE_LIBGPS
  if(!libGpsHelper)
  {
   libGpsHelper = new LibGPSLookupHelper(this);
@@ -731,7 +731,7 @@
   nmeaHelper->query();
   return true;
  }
-#endif
+
  emit gpsQueryFinished(false);
  return false;
 }
@@ -747,6 +747,7 @@
  qWarning()<<err;
  emit gpsQueryFinished(false);
 }
+#endif

 // slot that receives IP-based location data from the network.
 void StelLocationMgr::changeLocationFromNetworkLookup()

Question information

Language:
English Edit question
Status:
Solved
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Wolf
Solved:
2017-04-05
Last query:
2017-04-05
Last reply:
2017-04-05
gzotti (georg-zotti) said : #1

Thank you for the patch, sorry about problems. I will try it in the next few days.

The missing package may be named qtpositioning5-dev instead.

Alexander Wolf (alexwolf) said : #2

Please try build trunk again (without GPS support)

Best Alexander Wolf (alexwolf) said : #3

Please try build trunk again (without GPS support)

Thanks Alexander Wolf, that solved my question.

It works, Thanks.