Hi Even,
Thanks for your reply. You are correct as usual. Your ‘cc’ test produced no
errors, and your mention of ‘HAVE_LONG_LONG’ reminded me that I had have issues
with that when compiling older versions of GDAL as well. So I went back to my
old build script and checked and found that I always used to do the following:
—————————————————————————
curl -O http://download.osgeo.org/gdal/$gdal_ver/gdal-$gdal_ver.tar.gz
tar -xzf gdal-$gdal_ver.tar.gz
sed 's/#undef HAVE_LONG_LONG/\/\* #undef HAVE_LONG_LONG \*\/\'$'\n#define
HAVE_LONG_LONG 1/' gdal-$gdal_ver/port/cpl_config.h.in >
gdal-$gdal_ver/port/cpl_config.h.in.NEW
mv gdal-$gdal_ver/port/cpl_config.h.in
gdal-$gdal_ver/port/cpl_config.h.in.ORIG
mv gdal-$gdal_ver/port/cpl_config.h.in.NEW
gdal-$gdal_ver/port/cpl_config.h.in
—————————————————————————
I’ve now done this again with GDAL 2.2.2 and this old work around gets it to
compile OK (the same way the work around always did for older versions - I had
just forgotten it).
Is there some way this could be changed in the config/source so that it has the
correct HAVE_LONG_LONG value for iOS/arm64 without requiring this work around?
Cheers,
Nik.
> On 11 Nov 2017, at 11:44 pm, Even Rouault <[email protected]> wrote:
>
> 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 <http://www.spatialys.com/>
========================================================
NIK SANDS
Line Tamer | Time Traveller | Space Cadet
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev