[gdal-dev] Build GDAL 3.5 for iOS error: forward declaration of 'stat64'

Greg Troxel gdt at lexort.com
Tue Jul 5 06:04:07 PDT 2022


Even Rouault <even.rouault at spatialys.com> writes:

> That's what we do already what we do for a few functions (like fopen64
> vs fopen): cf
> https://github.com/OSGeo/gdal/blob/1e3cc18e298e81c1f42162b10ef7beb0dd94d3cf/cmake/helpers/configure.cmake#L230
>
> But for some reason, in that circumstance, it seems it detects symbols
> that are not available afterwards at build time. It might be related
> to the warning at bottom of
> https://cmake.org/cmake/help/latest/module/CheckFunctionExists.html
> about prefering check_symbol_exists() rather than
> check_function_exists(). I suspect that the xxx64 symbols are
> available in a system library but require special #define to be
> usable.

I see - so the compilation can throw an "implicit definition" warning
and succeed, and this means that if the symbol resolves at link time,
the test passes, even if the function signature is totally
non-matching.  That sounds like a buggy implementation of
Check_Function_Exists, but maybe that's what autoconf does.  Requiring
warning-clean compilation probably has its own issues.

Looking at CheckSymbolExists, it seems to check the right things, so
perhaps nik@ can try changing to that and see what happens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220705/48f468db/attachment.sig>


More information about the gdal-dev mailing list