Greetings,

it took me some time to sort this all out:

On Monday, 2017-03-06 14:20:29 +0100, I myself wrote:

> ...
> checking out changeset "5baf56b0e68b" and compiling it I run into sever-
> al problems.

Mind that this  is NOT the same changeset  as the one  tagged "V 1.7.2".
Whether or not changest  "V 1.7.2"  would cause the same problems, I did
not test.

>               The first error was:
> 
>    Building CXX object src/CMakeFiles/QMS.dir/GeoMath.cpp.o
>    /tmp/ccifUXrg.s: Assembler messages:
>    /tmp/ccifUXrg.s:5: Warning: unknown section attribute 'G'
>    /tmp/ccifUXrg.s:5: Error: junk at end of line, first unrecognized 
> character is `,'
>    /tmp/ccifUXrg.s:10: Error: unknown pseudo-op: `.previous'
> ...
> I then downgraded "Qt"  from version 5.6.2-1 to version 5.5.1-2,  recom-
> piled and and got past this point.

This turned out to be pretty reproducible.  Cygwin's "Qt" version 5.5.1-
2 works with changeset "5baf56b0e68b" of QMapShack, while version 5.6.2-
1 doesn't (the "-1" and "-2"  refer to Cygwin's sub-versions of the off-
icial "Qt" cersions).  I know Cygwin is not supported and I'm totally on
my own here.   I only record this for the odd poor soul out there trying
to compile QMapShack under Cygwin.

> ...
> But I still ran into problems:
> 
>    Building CXX object src/CMakeFiles/QMS.dir/dem/CDemVRT.cpp.o
>    In file included from /home/Rainer/include/gdal_priv.h:63:0,
>                     from /home/Rainer/repo/qmapshack/src/dem/CDemVRT.cpp:27:
>    /home/Rainer/include/cpl_conv.h:317:5: error: ‘locale_t’ does not name a 
> type
>         locale_t nNewLocale;

Neither Gdal's header files "gdal_priv.h" nor "cpl_conv.h" include "loc-
ale.h", and possibly this would be the correct place to patch this.  For
various reasons however, I preferred to instead patch the only two QMap-
Shack source  files  "src/CMakeFiles/QMS.dir/dem/CDemVRT.cpp"  and "src/
map/CMapVRT.cpp" which include "gdal_priv.h":

----------------------------- begin patch ------------------------------

diff --git a/src/dem/CDemVRT.cpp b/src/dem/CDemVRT.cpp
--- a/src/dem/CDemVRT.cpp
+++ b/src/dem/CDemVRT.cpp
@@ -16,6 +16,8 @@
 
 
**********************************************************************************************/
 
+#define _XOPEN_SOURCE 700
+#include <locale.h>
 #include "CMainWindow.h"
 #include "GeoMath.h"
 #include "dem/CDemDraw.h"
diff --git a/src/map/CMapVRT.cpp b/src/map/CMapVRT.cpp
--- a/src/map/CMapVRT.cpp
+++ b/src/map/CMapVRT.cpp
@@ -16,6 +16,8 @@
 
 
**********************************************************************************************/
 
+#define _XOPEN_SOURCE 700
+#include <locale.h>
 #include "CMainWindow.h"
 #include "helpers/CDraw.h"
 #include "map/CMapDraw.h"

------------------------------ end patch -------------------------------

Then the compilation of QMapShack succeeded with Gdal version 2.1.3, but
I'm fairly positive this patch  also works with older Gdal versions (the
"_XOPEN_SOURCE" bit  (which requests  Posix X/Open standard  of at least
version 7) I have blatantly stolen  from the code snippet used by Gdal's
"configure" script  to test  the presence  and usability  of header file
"locale.h").

Sincerely,
  Rainer

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to