Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with gpsd 3.15 #76

Closed
sebastic opened this issue Nov 1, 2015 · 3 comments
Closed

Fails to build with gpsd 3.15 #76

sebastic opened this issue Nov 1, 2015 · 3 comments

Comments

@sebastic
Copy link
Contributor

sebastic commented Nov 1, 2015

Merkaartor fails to build with gpsd 3.15 for which the transition in Debian started this weekend:

g++ -c -m64 -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -I/usr/include/gdal -O2 -Wall -W -Wno-reorder -D_REENTRANT -fPIC -DVERSION=0.18.2 -DREVISION=0.18.2 -DPRODUCT=Merkaartor -DUSE_LIBPROXY -DUSE_WEBKIT -D_TTY_POSIX_ -DUSE_GPS -DUSE_GPSD_LIB -DPLUGINS_DIR=/usr/lib/merkaartor/plugins -DSHARE_DIR=/usr/share/merkaartor -DTRANSDIR_MERKAARTOR=/usr/share/merkaartor/translations -DTRANSDIR_SYSTEM=/usr/share/qt5/translations/ -DGEOIMAGE -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WEBKITWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I../3rdparty/qtsingleapplication-2.6_1-opensource/src -I. -I../include -I../interfaces -Icommon -IBackend -IPaintStyle -IPaintStyle -IFeatures -ILayers -IPreferences -ISync -ICommands -IInteractions -IDocks -IQMapControl -IImportExport -IRender -Iqextserialport -IGPS -ITools -ITagTemplate -INameFinder -IUtils -IQToolBarDialog -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebKit -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Irelease -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o release/xmlstreamreader.o NameFinder/xmlstreamreader.cpp
GPS/qgpsdevice.cpp: In member function 'virtual void QGPSDDevice::onDataAvailable()':
GPS/qgpsdevice.cpp:1059:27: error: 'struct gps_data_t' has no member named 'PRN'
         int id = gpsdata->PRN[i];
                           ^
GPS/qgpsdevice.cpp:1060:36: error: 'struct gps_data_t' has no member named 'elevation'
         satArray[id][0] = gpsdata->elevation[i];
                                    ^
GPS/qgpsdevice.cpp:1061:36: error: 'struct gps_data_t' has no member named 'azimuth'
         satArray[id][1] = gpsdata->azimuth[i];
                                    ^
GPS/qgpsdevice.cpp:1062:36: error: 'struct gps_data_t' has no member named 'ss'
         satArray[id][2] = gpsdata->ss[i];
                                    ^
Makefile.Release:5149: recipe for target 'release/qgpsdevice.o' failed

Build logs: amd64, all

Merkaartor built successfully with gps 3.11 and earlier when configured with GPSDLIB=1.

@sebastic
Copy link
Contributor Author

sebastic commented Nov 1, 2015

It looks like struct gps_data_t has moved these members into struct satellite_t in libgps22.

From the gps.h changes between gpsd 3.11 and 3.15:

...
@@ -1803,6 +1786,14 @@ struct ais_t
     };
 };

+struct satellite_t {
+    double ss;         /* signal-to-noise ratio (dB) */
+    bool used;         /* PRNs of satellites used in solution */
+    short PRN;         /* PRNs of satellite */
+    short elevation;   /* elevation of satellite */
+    short azimuth;     /* azimuth */
+};
+
 struct attitude_t {
     double heading;
     double pitch;
...
@@ -1999,20 +2007,20 @@ struct gps_data_t {
     /* satellite status -- valid when satellites_visible > 0 */
     timestamp_t skyview_time;  /* skyview timestamp */
     int satellites_visible;    /* # of satellites in view */
-    int PRN[MAXCHANNELS];      /* PRNs of satellite */
-    int elevation[MAXCHANNELS];        /* elevation of satellite */
-    int azimuth[MAXCHANNELS];  /* azimuth */
-    double ss[MAXCHANNELS];    /* signal-to-noise ratio (dB) */
+    struct satellite_t skyview[MAXCHANNELS];

     struct devconfig_t dev;    /* device that shipped last update */

     struct policy_t policy;    /* our listening policy */

-    /* should be moved to privdata someday */
-    char tag[MAXTAGLEN+1];     /* tag of last sentence processed */
+    struct {
+       timestamp_t time;
+       int ndevices;
+       struct devconfig_t list[MAXUSERDEVS];
+    } devices;

     /* pack things never reported together to reduce structure size */
-#define UNION_SET      (RTCM2_SET|RTCM3_SET|SUBFRAME_SET|AIS_SET|ATTITUDE_SET|GST_SET|VERSION_SET|DEVICELIST_SET|LOGMESSAGE_SET|ERROR_SET|TIMEDRIFT_SET)
+#define UNION_SET      (RTCM2_SET|RTCM3_SET|SUBFRAME_SET|AIS_SET|ATTITUDE_SET|GST_SET|VERSION_SET|LOGMESSAGE_SET|ERROR_SET|TOFF_SET|PPS_SET)
     union {
        /* unusual forms of sensor data that might come up the pipe */
        struct rtcm2_t  rtcm2;
...

@sebastic
Copy link
Contributor Author

sebastic commented Nov 1, 2015

The patch from the merkaartor Debian package is forwarded in #77.

Krakonos added a commit that referenced this issue Nov 1, 2015
Fix gpsdata handling for gpsd >= 3.12 (libgps22 | GPSD_API_MAJOR_VERSION 6) #76
@Krakonos
Copy link
Member

Krakonos commented Nov 1, 2015

#77 merged, thanks!

@Krakonos Krakonos closed this as completed Nov 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants