Re: r41166 broke the android build by using std::to_string

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: r41166 broke the android build by using std::to_string

Kurt Schwehr-2
+gdal-dev (oops!)

On Tue, Jan 2, 2018 at 11:34 AM, Kurt Schwehr <[hidden email]> wrote:
Alan,

https://trac.osgeo.org/gdal/changeset/41166 broke the android build.  e.g.


I tried upgrading the android build to r16b and fixed up the includes, but no luck.  Either the android build needs to switch from gcc to clang (which may fix the build) or you need to replace std::to_string with something else.  I'd vote for switching to clang, but I'm not up for doing that right now.

My attempts to fix:


-kurt



--

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: r41166 broke the android build by using std::to_string

Alan Thomas
Sorry about this! I knew it was only a matter of time before I would
break the build.

In r41170 I have got rid of std::to_string for now. It's easy enough
to replace it with CPLString().Printf(...).

Alan

On 3 January 2018 at 06:34, Kurt Schwehr <[hidden email]> wrote:

> +gdal-dev (oops!)
>
> On Tue, Jan 2, 2018 at 11:34 AM, Kurt Schwehr <[hidden email]> wrote:
>>
>> Alan,
>>
>> https://trac.osgeo.org/gdal/changeset/41166 broke the android build.  e.g.
>>
>> https://travis-ci.org/OSGeo/gdal/jobs/324249526
>>
>> I tried upgrading the android build to r16b and fixed up the includes, but
>> no luck.  Either the android build needs to switch from gcc to clang (which
>> may fix the build) or you need to replace std::to_string with something
>> else.  I'd vote for switching to clang, but I'm not up for doing that right
>> now.
>>
>> My attempts to fix:
>>
>> https://trac.osgeo.org/gdal/changeset/41168
>> https://trac.osgeo.org/gdal/changeset/41169
>>
>> -kurt
>
>
>
>
> --
> --
> http://schwehr.org



--
Alan Thomas
Software Developer
ThinkSpatial
http://www.thinkspatial.com.au
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: r41166 broke the android build by using std::to_string

Even Rouault-2

On mercredi 3 janvier 2018 14:07:46 CET Alan Thomas wrote:

> Sorry about this! I knew it was only a matter of time before I would

> break the build.

>

> In r41170 I have got rid of std::to_string for now. It's easy enough

> to replace it with CPLString().Printf(...).

 

I had already encountered this issue with the CAD driver. Switching to clang itself alone doesn't fix the issue, as libstdc++ was still used. It appears from https://stackoverflow.com/questions/17950814/how-to-use-stdstoul-and-stdstoull-in-android/18124627#18124627 that std::to_string() cannot be used with gnu libstdc++. I've thus changed the toolchain to use --stl=libc++, and that worked:

https://trac.osgeo.org/gdal/changeset/41173

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev