[gdal-dev] Cannot build for iOS due to GUInt64 error
Even Rouault
even.rouault at spatialys.com
Sat Nov 11 04:44:13 PST 2017
On samedi 11 novembre 2017 11:09:48 CET Nik Sands wrote:
> Hi,
>
> I’m attempting to build GDAL for the first time in a while, and this is the
> first time for GDAL 2.2.2. I’ve getting the following error when building
> for iOS arm64 on Mac OS X:
>
> ------------------------
> geotiff.cpp:7653:13: error: unknown type name 'GUInt64'
> typedef GUInt64 WordType;
> ^
> 1 error generated.
> make[2]: *** [../o/geotiff.lo] Error 1
> make[1]: *** [gtiff-install-obj] Error 2
> make: *** [frmts-target] Error 2
> ------------------------
>
> The relevant part of geotiff.cpp is:
>
> ------------------------
> #if SIZEOF_VOIDP == 8 || defined(__x86_64__)
> // We test __x86_64__ for x32 arch where SIZEOF_VOIDP == 4
> typedef GUInt64 WordType;
> #else
> typedef unsigned int WordType;
> #endif
> ------------------------
>
> Should I be adding some exception condition into the ‘if’ part in order to
> get it to use unsigned int instead of GUInt64? Or is there some other way
> that this should be handled for iOS arm64 when building on Mac OS X?
Nik,
This is the sign of a serious configuration error. Patching it there will just hide many other
problems elsewhere where 64bit integer is needed.
This likely occurs because HAVE_LONG_LONG is not set for some reason when configure
runs.
If you run configure, I guess the "Checking for 64bit integer type" returns no.
Can you try the following (replace cc by the appropriate (cross)compiler binary) ?
echo 'int main() { long long off=0; }' > conftest.c
cc -o conftest conftest.c
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171111/d2b0e79f/attachment.html>
More information about the gdal-dev
mailing list