<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Dual architecture amd64+arm64 builds are attempted by default
(see
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/tree/master/docker#multi-arch-images">https://github.com/OSGeo/gdal/tree/master/docker#multi-arch-images</a>),
which requires docker buildx to be setup<code>, or perhaps just </code><code
class="dt rn ro rp rq b">binfmt to support arm64 through qemu</code><code></code></p>
<div class="moz-cite-prefix">If you just need amd64 builds, add
"--platform linux/amd64" after ./build.sh<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 14/02/2023 à 19:00, Dirk Stenger a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:debb10fa-a080-61bf-a974-45062b0b08d8@lat-lon.de">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>All,</p>
<p>Unfortunately, when trying to build the GDAL Docker Image on a
local machine (Ubuntu 22.04), the build fails with an error:</p>
<p>Executed commands and logging:<br>
</p>
<pre class="code-java">~/git/gdal/docker/ubuntu-small$ ./build.sh
...
debconf: delaying <span class="code-keyword">package</span> configuration, since apt-utils is not installed
Fetched 70.5 MB in 39s (1795 kB/s)
Selecting previously unselected <span class="code-keyword">package</span> libpython3.10-minimal:arm64.
(Reading database ... 19054 files and directories currently installed.)
Preparing to unpack .../libpython3.10-minimal_3.10.6-1~22.04.2_arm64.deb ...
Unpacking libpython3.10-minimal:arm64 (3.10.6-1~22.04.2) ...
Selecting previously unselected <span class="code-keyword">package</span> libexpat1:arm64.
Preparing to unpack .../libexpat1_2.4.7-1ubuntu0.2_arm64.deb ...
Unpacking libexpat1:arm64 (2.4.7-1ubuntu0.2) ...
Selecting previously unselected <span class="code-keyword">package</span> python3.10-minimal:arm64.
Preparing to unpack .../python3.10-minimal_3.10.6-1~22.04.2_arm64.deb ...
Unpacking python3.10-minimal:arm64 (3.10.6-1~22.04.2) ...
Setting up libpython3.10-minimal:arm64 (3.10.6-1~22.04.2) ...
Setting up libexpat1:arm64 (2.4.7-1ubuntu0.2) ...
Setting up python3.10-minimal:arm64 (3.10.6-1~22.04.2) ...
/<span class="code-keyword">var</span>/lib/dpkg/info/python3.10-minimal.postinst: 51: /usr/bin/python3.10: Exec format error
dpkg: error processing <span class="code-keyword">package</span> python3.10-minimal:arm64 (--configure):
installed python3.10-minimal:arm64 <span class="code-keyword">package</span> post-installation script subprocess returned error exit status 126
Errors were encountered <span class="code-keyword">while</span> processing:
python3.10-minimal:arm64
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command <span class="code-quote">'/bin/sh -c . /buildscripts/bh-set-envvars.sh && apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends python3-dev${APT_ARCH_SUFFIX} python3-numpy${APT_ARCH_SUFFIX} python3-setuptools${APT_ARCH_SUFFIX} libjpeg-dev${APT_ARCH_SUFFIX} libgeos-dev${APT_ARCH_SUFFIX} libexpat-dev${APT_ARCH_SUFFIX} libxerces-c-dev${APT_ARCH_SUFFIX} libwebp-dev${APT_ARCH_SUFFIX} libpng-dev${APT_ARCH_SUFFIX} libzstd-dev${APT_ARCH_SUFFIX} bash zip curl libpq-dev${APT_ARCH_SUFFIX} libssl-dev${APT_ARCH_SUFFIX} libopenjp2-7-dev${APT_ARCH_SUFFIX} libspatialite-dev${APT_ARCH_SUFFIX} autoconf automake sqlite3 bash-completion'</span> returned a non-zero code: 100
</pre>
<p>The same behavior occurs with ubuntu-full: </p>
<pre class="code-java">~/git/gdal/docker/ubuntu-full$ ./build.sh
...
debconf: delaying <span class="code-keyword">package</span> configuration, since apt-utils is not installed
Fetched 466 MB in 3min 39s (2128 kB/s)
Selecting previously unselected <span class="code-keyword">package</span> libcap2:arm64.
(Reading database ... 19051 files and directories currently installed.)
Preparing to unpack .../libcap2_1%3a2.44-1build3_arm64.deb ...
Unpacking libcap2:arm64 (1:2.44-1build3) ...
Selecting previously unselected <span class="code-keyword">package</span> libgpg-error0:arm64.
Preparing to unpack .../libgpg-error0_1.43-3_arm64.deb ...
Unpacking libgpg-error0:arm64 (1.43-3) ...
Selecting previously unselected <span class="code-keyword">package</span> libgcrypt20:arm64.
Preparing to unpack .../libgcrypt20_1.9.4-3ubuntu3_arm64.deb ...
Unpacking libgcrypt20:arm64 (1.9.4-3ubuntu3) ...
Selecting previously unselected <span class="code-keyword">package</span> liblz4-1:arm64.
Preparing to unpack .../liblz4-1_1.9.3-2build2_arm64.deb ...
Unpacking liblz4-1:arm64 (1.9.3-2build2) ...
Setting up libcap2:arm64 (1:2.44-1build3) ...
Setting up libgpg-error0:arm64 (1.43-3) ...
Setting up libgcrypt20:arm64 (1.9.4-3ubuntu3) ...
Setting up liblz4-1:arm64 (1.9.3-2build2) ...
Selecting previously unselected <span class="code-keyword">package</span> libsystemd0:arm64.
(Reading database ... 19059 files and directories currently installed.)
Preparing to unpack .../libsystemd0_249.11-0ubuntu3.6_arm64.deb ...
Unpacking libsystemd0:arm64 (249.11-0ubuntu3.6) ...
Selecting previously unselected <span class="code-keyword">package</span> libpython3.10-minimal:arm64.
Preparing to unpack .../libpython3.10-minimal_3.10.6-1~22.04.2_arm64.deb ...
Unpacking libpython3.10-minimal:arm64 (3.10.6-1~22.04.2) ...
Selecting previously unselected <span class="code-keyword">package</span> libexpat1:arm64.
Preparing to unpack .../libexpat1_2.4.7-1ubuntu0.2_arm64.deb ...
Unpacking libexpat1:arm64 (2.4.7-1ubuntu0.2) ...
Selecting previously unselected <span class="code-keyword">package</span> python3.10-minimal:arm64.
Preparing to unpack .../python3.10-minimal_3.10.6-1~22.04.2_arm64.deb ...
Unpacking python3.10-minimal:arm64 (3.10.6-1~22.04.2) ...
Setting up libpython3.10-minimal:arm64 (3.10.6-1~22.04.2) ...
Setting up libexpat1:arm64 (2.4.7-1ubuntu0.2) ...
Setting up python3.10-minimal:arm64 (3.10.6-1~22.04.2) ...
/<span class="code-keyword">var</span>/lib/dpkg/info/python3.10-minimal.postinst: 51: /usr/bin/python3.10: Exec format error
dpkg: error processing <span class="code-keyword">package</span> python3.10-minimal:arm64 (--configure):
installed python3.10-minimal:arm64 <span class="code-keyword">package</span> post-installation script subprocess returned error exit status 126
Errors were encountered <span class="code-keyword">while</span> processing:
python3.10-minimal:arm64
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command <span class="code-quote">'/bin/sh -c . /buildscripts/bh-set-envvars.sh && apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends libopenjp2-7-dev${APT_ARCH_SUFFIX} libcairo2-dev${APT_ARCH_SUFFIX} python3-dev${APT_ARCH_SUFFIX} python3-numpy${APT_ARCH_SUFFIX} python3-setuptools${APT_ARCH_SUFFIX} libpng-dev${APT_ARCH_SUFFIX} libjpeg-dev${APT_ARCH_SUFFIX} libgif-dev${APT_ARCH_SUFFIX} liblzma-dev${APT_ARCH_SUFFIX} libgeos-dev${APT_ARCH_SUFFIX} curl libxml2-dev${APT_ARCH_SUFFIX} libexpat-dev${APT_ARCH_SUFFIX} libxerces-c-dev${APT_ARCH_SUFFIX} libnetcdf-dev${APT_ARCH_SUFFIX} libpoppler-dev${APT_ARCH_SUFFIX} libpoppler-<span class="code-keyword">private</span>-dev${APT_ARCH_SUFFIX} libspatialite-dev${APT_ARCH_SUFFIX} librasterlite2-dev${APT_ARCH_SUFFIX} swig ant libhdf4-alt-dev${APT_ARCH_SUFFIX} libhdf5-serial-dev${APT_ARCH_SUFFIX} libfreexl-dev${APT_ARCH_SUFFIX} unixodbc-dev${APT_ARCH_SUFFIX} mdbtools-dev${APT_ARCH_SUFFIX} libwebp-dev${APT_ARCH_SUFFIX} liblcms2-2 libpcre3-dev${APT_ARCH_SUFFIX} libcrypto++-dev${APT_ARCH_SUFFIX} libfyba-dev${APT_ARCH_SUFFIX} libkml-dev${APT_ARCH_SUFFIX} libmysqlclient-dev${APT_ARCH_SUFFIX} libogdi-dev${APT_ARCH_SUFFIX} libcfitsio-dev${APT_ARCH_SUFFIX} openjdk-<span class="code-quote">"$JAVA_VERSION"</span>-jdk${APT_ARCH_SUFFIX} libzstd-dev${APT_ARCH_SUFFIX} libpq-dev${APT_ARCH_SUFFIX} libssl-dev${APT_ARCH_SUFFIX} libboost-dev${APT_ARCH_SUFFIX} autoconf automake bash-completion libarmadillo-dev${APT_ARCH_SUFFIX} libopenexr-dev${APT_ARCH_SUFFIX} libheif-dev${APT_ARCH_SUFFIX} libdeflate-dev${APT_ARCH_SUFFIX} libblosc-dev${APT_ARCH_SUFFIX} liblz4-dev${APT_ARCH_SUFFIX} libbz2-dev${APT_ARCH_SUFFIX} libbrotli-dev${APT_ARCH_SUFFIX} libarchive-dev${APT_ARCH_SUFFIX} && rm -rf /<span class="code-keyword">var</span>/lib/apt/lists/*'</span> returned a non-zero code: 100
</pre>
<p>This is the used Docker version:</p>
<pre class="code-java">docker --version
Docker version 20.10.17, build 100c701
</pre>
<p>I tried to build the <i>master</i> branch and <em>release/3.5</em>
branch.</p>
<p>Can anyone help why the build is failing?</p>
<p>Kind regards,</p>
Dirk Stenger <br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-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>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>