[gdal-dev] Cannot build for iOS due to GUInt64 error

Nik Sands nik at nixanz.com
Mon Nov 13 12:30:50 PST 2017


Hi Even,

If I include the -Wall option, then I do get just the one warning.  Here’s the command line I’m using, which is based on similar command lines from the make output…

------------------------------------
$ /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -o conftest -arch arm64 -pipe -Os -gdwarf-2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk -Wno-implicit-function-declaration -fembed-bitcode -mno-thumb -Wall  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk conftest.c -ldl
conftest.c:1:24: warning: unused variable 'off' [-Wunused-variable]
int main() { long long off=0; }
                       ^
1 warning generated.
$
——————————————————

I made the change you suggested to acinclude.m4 and then ran autoconf.  Then I attempted to build GDAL again, but got the same error:

--------------------------------------------------
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
--------------------------------------------------

I have to admit that I’m a very small-time developer and I’m somewhat out of my depth here, so forgive me if I sound like I don’t understand some of this stuff.

Cheers,
Nik.

> On 12 Nov 2017, at 11:22 pm, Even Rouault <even.rouault at spatialys.com> wrote:
> 
> On dimanche 12 novembre 2017 19:50:47 CET Nik Sands wrote:
> > Hi Even,
> > 
> > Thanks for your reply.  You are correct as usual.  Your ‘cc’ test produced
> > no errors, 
>  
> And no warnings as well ?
> Weird, since this is the test that is used to dected long long presence
> See m4/acinclude.m4
>  
> Do you run configure with CCFLAGS defined ? For example, if CCFLAGS="-Wall", then the test will throw a warning that will make it fail.
> I'm not sure why we use CCFLAGS in that file, whereas CFLAGS is used everywhere else.
>  
> What if you change in m4/acinclude.m4
>   echo 'int main() { long long off=0; }' >> conftest.c
> to
>   echo 'int main() { long long off=0; (void)off; return 0; }' > conftest.c
>  
> and run autoconf to regenerate configure ?
>  
> Even
>  
> -- 
> Spatialys - Geospatial professional services
> http://www.spatialys.com <http://www.spatialys.com/>

========================================================
NIK SANDS
Line Tamer | Time Traveller | Space Cadet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171114/da3c5af6/attachment.html>


More information about the gdal-dev mailing list