<span style=" font-size:10pt;font-family:sans-serif">Hello Robert,</span><br><br><span style=" font-size:10pt;font-family:sans-serif">at the moment
it's only about the Linux platform. And yes, it should be a static compilation
with all the necessary dependencies (including libtiff and all the others).</span><br><br><span style=" font-size:10pt;font-family:sans-serif">I currently use
an Ubuntu VM and use an Alpine-Linux Docker container for compiling. First
a static Geos library is created via cmake, then a static Proj library
(without Curl, because this currently leads to errors) and then Gdal as
a static library. </span><br><span style=" font-size:10pt;font-family:sans-serif">The basis of the
script comes from this source: </span><a href=https://github.com/OSGeo/gdal/issues/4815><span style=" font-size:10pt;color:blue;font-family:sans-serif">https://github.com/OSGeo/gdal/issues/4815</span></a><span style=" font-size:10pt;font-family:sans-serif">.</span><br><span style=" font-size:10pt;font-family:sans-serif">I have updated
the version used to the current version and replaced the existing './configure'
and 'make' commands with cmake.</span><br><br><span style=" font-size:10pt;font-family:sans-serif">This is what it
looks like:</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Start docker:
docker run -it --rm -v $(pwd):/tmp golang:1.17.3-alpine3.13 /bin/sh
/tmp/mo_gdalbuild.sh</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">mo_gdalbuild.sh</span><br><span style=" font-size:9pt;font-family:Lucida Console">---------------</span><br><br><span style=" font-size:9pt;color:#00c1c2;font-family:Lucida Console">#!/bin/sh</span><br><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">rm</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-r</span><span style=" font-size:9pt;font-family:Lucida Console"> /tmp/gdal-3.8.3</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">rm</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-r</span><span style=" font-size:9pt;font-family:Lucida Console"> /tmp/gdal-3.8.3.tar.gz</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">rm</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-r</span><span style=" font-size:9pt;font-family:Lucida Console"> /tmp/geos-3.12.1</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">rm</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-r</span><span style=" font-size:9pt;font-family:Lucida Console"> /tmp/geos-3.12.1.tar.bz2</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">rm</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-r</span><span style=" font-size:9pt;font-family:Lucida Console"> /tmp/proj-9.3.0</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">rm</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-r</span><span style=" font-size:9pt;font-family:Lucida Console"> /tmp/proj-9.3.0.tar.gz</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">rm</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-r</span><span style=" font-size:9pt;font-family:Lucida Console"> /tmp/mo_gdal_install</span><br><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">set</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-e</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">proxy</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;color:#ffff35;font-family:Lucida Console">"</span><a href=http://172.16.7.13:8080/><span style=" font-size:9pt;color:blue;font-family:Lucida Console">http://172.16.7.13:8080</span></a><span style=" font-size:9pt;color:#ffff35;font-family:Lucida Console">"</span><br><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">export</span><span style=" font-size:9pt;font-family:Lucida Console">HTTP_PROXY</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;color:#ffff35;font-family:Lucida Console">"$proxy"</span><br><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">export</span><span style=" font-size:9pt;font-family:Lucida Console">HTTPS_PROXY</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;color:#ffff35;font-family:Lucida Console">"$proxy"</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">GDAL_VERSION</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">3.8.3</span><br><span style=" font-size:9pt;font-family:Lucida Console">PROJ_VERSION</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">9.3.0</span><br><span style=" font-size:9pt;font-family:Lucida Console">GEOS_VERSION</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">3.12.1</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">apk add</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--no-cache</span><span style=" font-size:9pt;font-family:Lucida Console"></span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
wget </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
coreutils </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
build-base </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
unzip </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
cmake</span><br><br><span style=" font-size:9pt;color:#00c1c2;font-family:Lucida Console">#
statically linked version of PROJ.</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">apk add</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--no-cache</span><span style=" font-size:9pt;font-family:Lucida Console"></span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
sqlite </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
sqlite-dev </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
sqlite-static </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
tiff </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
tiff-dev</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp</span><br><span style=" font-size:9pt;font-family:Lucida Console">wget</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--no-verbose -e</span><span style=" font-size:9pt;font-family:Lucida Console">use_proxy</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">yes</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-e</span><span style=" font-size:9pt;font-family:Lucida Console"> https_proxy</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">$proxy</span><span style=" font-size:9pt;font-family:Lucida Console">https</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">:</span><span style=" font-size:9pt;font-family:Lucida Console">//download.osgeo.org/proj/proj-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${PROJ_VERSION}</span><span style=" font-size:9pt;font-family:Lucida Console">.tar.gz</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">tar</span><span style=" font-size:9pt;font-family:Lucida Console">-xzf proj-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${PROJ_VERSION}</span><span style=" font-size:9pt;font-family:Lucida Console">.tar.gz</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">proj-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${PROJ_VERSION}</span><br><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">mkdir</span><span style=" font-size:9pt;font-family:Lucida Console">build</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">build</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">cmake </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DBUILD_SHARED_LIBS</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">OFF
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DBUILD_TESTING</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">OFF
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DBUILD_PROJSYNC</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">OFF
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DCMAKE_BUILD_TYPE</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">Release
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DCMAKE_INSTALL_PREFIX</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/proj/dist
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DENABLE_CURL</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">OFF
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">..</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">cmake</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--build</span><span style=" font-size:9pt;font-family:Lucida Console">.</span><br><span style=" font-size:9pt;font-family:Lucida Console">cmake</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--build</span><span style=" font-size:9pt;font-family:Lucida Console">.</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--target</span><span style=" font-size:9pt;font-family:Lucida Console"></span><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">install</span><br><br><br><span style=" font-size:9pt;color:#00c1c2;font-family:Lucida Console">#
statically linked version of GEOS.</span><br><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp</span><br><span style=" font-size:9pt;font-family:Lucida Console">wget</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--no-verbose -e</span><span style=" font-size:9pt;font-family:Lucida Console">use_proxy</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">yes</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-e</span><span style=" font-size:9pt;font-family:Lucida Console"> https_proxy</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">$proxy</span><span style=" font-size:9pt;font-family:Lucida Console">https</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">:</span><span style=" font-size:9pt;font-family:Lucida Console">//download.osgeo.org/geos/geos-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${GEOS_VERSION}</span><span style=" font-size:9pt;font-family:Lucida Console">.tar.bz2</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">tar</span><span style=" font-size:9pt;font-family:Lucida Console">-xjf geos-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${GEOS_VERSION}</span><span style=" font-size:9pt;font-family:Lucida Console">.tar.bz2</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">geos-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${GEOS_VERSION}</span><br><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">mkdir</span><span style=" font-size:9pt;font-family:Lucida Console">build</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">build</span><br><span style=" font-size:9pt;font-family:Lucida Console">cmake </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
-DCMAKE_BUILD_TYPE</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">Release
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
-DBUILD_SHARED_LIBS</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">OFF
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
-DBUILD_TESTING</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">OFF
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
-DCMAKE_INSTALL_PREFIX</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/geos/dist
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
..</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">cmake</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--build</span><span style=" font-size:9pt;font-family:Lucida Console">.</span><br><span style=" font-size:9pt;font-family:Lucida Console">cmake</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--build</span><span style=" font-size:9pt;font-family:Lucida Console">.</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--target</span><span style=" font-size:9pt;font-family:Lucida Console"></span><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">install</span><br><br><span style=" font-size:9pt;color:#00c1c2;font-family:Lucida Console">#
statically linked version of GDAL</span><br><span style=" font-size:9pt;color:#00c1c2;font-family:Lucida Console">#
(a minimal version still needs to be configured !)</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">apk add</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--no-cache</span><span style=" font-size:9pt;font-family:Lucida Console"></span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
jpeg-dev </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
libjpeg-turbo-static </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
openssl-libs-static </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">
linux-headers</span><br><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp</span><br><span style=" font-size:9pt;font-family:Lucida Console">wget</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--no-verbose -e</span><span style=" font-size:9pt;font-family:Lucida Console">use_proxy</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">yes</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">-e</span><span style=" font-size:9pt;font-family:Lucida Console"> http_proxy</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">$proxy</span><span style=" font-size:9pt;font-family:Lucida Console">http</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">:</span><span style=" font-size:9pt;font-family:Lucida Console">//download.osgeo.org/gdal/</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${GDAL_VERSION}</span><span style=" font-size:9pt;font-family:Lucida Console">/gdal-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${GDAL_VERSION}</span><span style=" font-size:9pt;font-family:Lucida Console">.tar.gz</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">tar</span><span style=" font-size:9pt;font-family:Lucida Console">-xzf gdal-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${GDAL_VERSION}</span><span style=" font-size:9pt;font-family:Lucida Console">.tar.gz</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">gdal-</span><span style=" font-size:9pt;color:#ff4040;font-family:Lucida Console">${GDAL_VERSION}</span><br><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">mkdir</span><span style=" font-size:9pt;font-family:Lucida Console">build</span><br><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">cd</span><span style=" font-size:9pt;font-family:Lucida Console">build</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">cmake </span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DCMAKE_BUILD_TYPE</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">Release
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DBUILD_APPS</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">ON
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DBUILD_SHARED_LIBS</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">OFF
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DBUILD_TESTING</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">OFF
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DCMAKE_PREFIX_PATH</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/gdal
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DCMAKE_INSTALL_PREFIX</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/gdal
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DGEOS_INCLUDE_DIR</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/geos/dist/include
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DGEOS_LIBRARY</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/geos/dist/lib64/libgeos_c.a
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DPROJ_INCLUDE_DIR</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/proj/dist/include
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DPROJ_LIBRARY_RELEASE</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/proj/dist/lib64/libproj.a
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DBUILD_JAVA_BINDINGS</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">ON
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DGDAL_JAVA_INSTALL_DIR</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/java
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">-DGDAL_JAVA_JNI_INSTALL_DIR</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">=</span><span style=" font-size:9pt;font-family:Lucida Console">/tmp/mo_gdal_install/java/jni
</span><span style=" font-size:9pt;color:#00c200;font-family:Lucida Console">\</span><br><span style=" font-size:9pt;font-family:Lucida Console">..</span><br><br><span style=" font-size:9pt;font-family:Lucida Console">cmake</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--build</span><span style=" font-size:9pt;font-family:Lucida Console">.</span><br><span style=" font-size:9pt;font-family:Lucida Console">cmake</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--build</span><span style=" font-size:9pt;font-family:Lucida Console">.</span><span style=" font-size:9pt;color:#ff42f9;font-family:Lucida Console">--target</span><span style=" font-size:9pt;font-family:Lucida Console"></span><span style=" font-size:9pt;color:#6181ff;font-family:Lucida Console">install</span><br><br><br><br><span style=" font-size:10pt;font-family:sans-serif">If I check the
individual libraries created using 'ldd', I can see that they are statically
linked.</span><br><br><span style=" font-size:10pt;font-family:sans-serif">If I run 'ldd'
on the resulting apps, it looks different. Everything is still linked dynamically.
This should be changed ;o).</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Best regards</span><br><span style=" font-size:10pt;font-family:sans-serif">Michael<br></span><br><br><br><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Von:
</span><span style=" font-size:9pt;font-family:sans-serif">"Robert
Coup" <robert.coup@koordinates.com></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">An:
</span><span style=" font-size:9pt;font-family:sans-serif">"Michael
Otto" <michael.otto@data-experts.de></span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Kopie:
</span><span style=" font-size:9pt;font-family:sans-serif">gdal-dev@lists.osgeo.org</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Datum:
</span><span style=" font-size:9pt;font-family:sans-serif">12.02.2024
15:43</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Betreff:
</span><span style=" font-size:9pt;font-family:sans-serif">Re:
[gdal-dev] Build static GDAL-Lib and static GDAL-Apps</span><br><hr noshade><br><br><br><span style=" font-size:12pt">Hi Michael,</span><br><br><span style=" font-size:12pt">On Mon, 12 Feb 2024 at 12:02, Michael
Otto via gdal-dev <</span><a href="mailto:gdal-dev@lists.osgeo.org"><span style=" font-size:12pt;color:blue"><u>gdal-dev@lists.osgeo.org</u></span></a><span style=" font-size:12pt">>
wrote:</span><br><span style=" font-size:10pt;font-family:sans-serif"><br>The goal is to cast GDAL and all its dependencies (PROJ / GEOS / all dependencies
to system libraries / ...) into a static library and to create the GDAL
apps as static executable programs. </span><br><br><span style=" font-size:12pt">Which platform are you working on?
If you need a fully static compilation of everything <i>all</i> the way
down including openssl + zlib + zstd + libtiff + all the other libraries,
using vcpkg[1] might be a reasonable approach. By default it does static
compilation on macOS & Linux, and it has a static compilation
option on Windows (the default on Windows is dynamic). It doesn't support
every compile option though, but it's customisable and if you're after
a reasonably vanilla GDAL it should work ok.</span><br><span style=" font-size:12pt"> </span><br><span style=" font-size:10pt;font-family:sans-serif"><br>There should be no dynamic dependencies.</span><br><br><span style=" font-size:12pt">Note that GDAL + Proj (maybe others),
have data files they rely on, so while you may be able to get a single
executable, you'll still need to distribute these files. I can imagine
ways around that, but they're getting fairly complex.</span><br><span style=" font-size:12pt"> </span><br><span style=" font-size:10pt;font-family:sans-serif">Unfortunately,
I have not had any success so far. The library is created statically but
the apps are not yet.<br>Does anyone have experience with this topic or possibly a procedure that
leads to success?</span><br><br><span style=" font-size:12pt">Can you share the process you've currently
got to?</span><br><br><span style=" font-size:12pt">Rob :) </span><br><br><span style=" font-size:12pt">[1] </span><a href=https://github.com/microsoft/vcpkg><span style=" font-size:12pt;color:blue"><u>https://github.com/microsoft/vcpkg</u></span></a><br><br><br><font face="sans-serif"></font>