QDeltaSoft / qradiopredict

Radio propagation prediction and simulation tool for VHF-UHF
48 stars 11 forks source link

Build Problem on Arch Linux #7

Open pointhi opened 8 years ago

pointhi commented 8 years ago
../../MapGraphics/guts/Conversions.cpp: In static member function 'static Position Conversions::xyz2lla(qreal, qreal, qreal)':
../../MapGraphics/guts/Conversions.cpp:71:24: error: call of overloaded 'abs(qreal&)' is ambiguous
     while (abs(rhoerror) > 0.000001 || abs(zerror) > 0.000001)

I'm on an x86 Antergos(Arch) Linux, with gcc version 6.1.1 20160602 (GCC)

kantooon commented 8 years ago

Thanks for the report. I will see if upstream has this resolved, looks like it's time for an upgrade. Setting this to low priority for now.

kantooon commented 8 years ago

Can you please report which version of Qt are you using? I have not been able to reproduce this. Thanks.

pointhi commented 8 years ago

I'm using the current upstream version, so it should be qt 4.8.7-9.

The following patch fixed this compilation issue for me:

diff --git a/MapGraphics/guts/Conversions.cpp b/MapGraphics/guts/Conversions.cpp
index 59090e1..995a336 100644
--- a/MapGraphics/guts/Conversions.cpp
+++ b/MapGraphics/guts/Conversions.cpp
@@ -68,7 +68,7 @@ Position Conversions::xyz2lla(qreal x, qreal y, qreal z)
     qreal rhoerror = 1000.0;
     qreal zerror = 1000.0;

-    while (abs(rhoerror) > 0.000001 || abs(zerror) > 0.000001)
+    while (qAbs(rhoerror) > 0.000001 || qAbs(zerror) > 0.000001)
     {
         qreal slat = sin(templat);
         qreal clat = cos(templat);

but I also needed to add this patch:

diff --git a/QRadioPredict/shpreader.h b/QRadioPredict/shpreader.h
index a77f3b4..9e123e8 100644
--- a/QRadioPredict/shpreader.h
+++ b/QRadioPredict/shpreader.h
@@ -21,8 +21,8 @@
 #include <QMap>
 #include <QString>
 #include <QDebug>
-#include <gdal/ogrsf_frmts.h>
-#include <gdal/gdal_priv.h>
+#include <ogrsf_frmts.h>
+#include <gdal_priv.h>
 #include "databaseapi.h"
 #include "flightgearprefs.h"

and there is the next compilation error which needs to be fixed:

../../QRadioPredict/shpreader.cpp:215:12: error: 'Open' is not a member of 'OGRSFDriverRegistrar'
     poDS = OGRSFDriverRegistrar::Open( file.toStdString().c_str(), FALSE );
kantooon commented 8 years ago

Thanks, I'll look into the first issue, but the second one looks like non standard include paths, if Gdal and OGR were delivered as a package by your distro maybe raise it with them, or if you compiled them yourself maybe look at the install paths of the headers.