<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Nik,</p>
<p>You may try alternative build scenario using CMake.</p>
<p>1. Install XCode command line tools if already not done this
(<a class="moz-txt-link-freetext" href="https://www.embarcadero.com/starthere/xe5/mobdevsetup/ios/en/installing_the_commandline_tools.html">https://www.embarcadero.com/starthere/xe5/mobdevsetup/ios/en/installing_the_commandline_tools.html</a>)
and CMake (<a class="moz-txt-link-freetext" href="https://cmake.org/download/">https://cmake.org/download/</a>)</p>
<p><br>
</p>
<p>2. In terminal execute commands:<br>
<br>
> git clone --depth 1
<a class="moz-txt-link-freetext" href="https://github.com/nextgis-borsch/lib_gdal.git">https://github.com/nextgis-borsch/lib_gdal.git</a><br>
> cd lib_gdal<br>
> mkdir build<br>
> cd build<br>
> cmake -G"Unix Makefiles" -DBUILD_TARGET_PLATFORM=IOS
-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release
-DENABLE_BITCODE=OFF -DIOS_ARCH=arm64 -DIOS_PLATFORM=OS
-DENABLE_NEON=ON
-DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake
-DWITH_JSONC=ON -DWITH_JSONC_EXTERNAL=ON -DWITH_TIFF=ON
-DWITH_TIFF_EXTERNAL=ON -DWITH_GeoTIFF=ON
-DWITH_GeoTIFF_EXTERNAL=ON -DOSX_FRAMEWORK=ON -DENABLE_GIF=OFF
-DENABLE_CAD=OFF -DENABLE_PNG=OFF -DGDAL_BUILD_APPS=OFF
-DGDAL_BUILD_DOCS=OFF -DWITH_PYTHON=OFF ..<br>
</p>
<p>Some flags description:<br>
-DIOS_ARCH maybe armv7, armv7s, arm64, i386 or x86_64<br>
-DIOS_PLATFORM maybe IOS or SIMULATOR<br>
<br>
After configuring you will see summary about GDAL build or error
message. I expect everything will be fine.<br>
<br>
Run this command to build GDAL:<br>
<br>
> cmake --build . -- -j 4<br>
<br>
May be this need to rerun twice as dependency may not build on
first run.<br>
<br>
You may build GDAL for several architectures and create fat
library using lipo -create command (I rewrite OpenCV py script to
automate creating my own fat iOS library which use GDAL -
<a class="moz-txt-link-freetext" href="https://github.com/nextgis/nextgis_datastore/blob/master/opt/ios/build_framework.py">https://github.com/nextgis/nextgis_datastore/blob/master/opt/ios/build_framework.py</a>)</p>
<p><br>
</p>
<p>This is minimal build of GDAL. If you need some drivers which not
build by listed command let me know - I'll help to modify command
line options. <br>
</p>
<pre class="moz-signature" cols="72">Best regards,
Dmitry</pre>
<div class="moz-cite-prefix">13.11.2017 23:30, Nik Sands пишет:<br>
</div>
<blockquote type="cite"
cite="mid:A263E3B9-8FF2-44C8-99BD-375DFF0749E6@nixanz.com">
<pre wrap="">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.
</pre>
<blockquote type="cite">
<pre wrap="">On 12 Nov 2017, at 11:22 pm, Even Rouault <a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a> wrote:
On dimanche 12 novembre 2017 19:50:47 CET Nik Sands wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Even,
Thanks for your reply. You are correct as usual. Your ‘cc’ test produced
no errors,
</pre>
</blockquote>
<pre wrap="">
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
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a> <a class="moz-txt-link-rfc2396E" href="http://www.spatialys.com/"><http://www.spatialys.com/></a>
</pre>
</blockquote>
<pre wrap="">
========================================================
NIK SANDS
Line Tamer | Time Traveller | Space Cadet
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
<br>
</body>
</html>