[gdal-dev] Error when trying to build Docker Images
Dirk Stenger
stenger at lat-lon.de
Tue Feb 14 14:45:15 PST 2023
Thank you for the help.
Your proposed solution works for ubuntu-small.
However, when I am trying to build ubuntu-full, I get a new error:
~/git/gdal/docker$ ubuntu-full/build.sh --platform linux/amd64
...
/gdal/frmts/pdf/pdfdataset.cpp: In function'int LoadPdfiumDocumentPage(const char*, const char*, int,
TPdfiumDocumentStruct**, TPdfiumPageStruct**, int*)':
/gdal/frmts/pdf/pdfdataset.cpp:1263:68: error: requestfor member'Get' in'pDict', which is of pointer type'CPDF_Dictionary*' (maybe you meant to use'->' ?)
1263 | pdfium::WrapRetain(const_cast<CPDF_Dictionary *>(pDict.Get())));
| ^~~
/gdal/frmts/pdf/pdfdataset.cpp: At global scope:
/gdal/frmts/pdf/pdfdataset.cpp:1453:5: error:'virtual bool GDALPDFiumOCContext::CheckOCGDictVisible(const
CPDF_Dictionary*) const' marked'override', but does not override
1453 | CheckOCGDictVisible(const CPDF_Dictionary *pOCGDict)const override
| ^~~~~~~~~~~~~~~~~~~
/gdal/frmts/pdf/pdfdataset.cpp: In member function'virtual bool GDALPDFiumOCContext::CheckOCGDictVisible(const
CPDF_Dictionary*) const':
/gdal/frmts/pdf/pdfdataset.cpp:1464:36: error:'class CPDF_OCContext' has no member named'CheckOCGDictVisible'; did you mean'CheckOCGVisible'?
1464 |return m_DefaultOCContext->CheckOCGDictVisible(pOCGDict);
| ^~~~~~~~~~~~~~~~~~~
| CheckOCGVisible
/gdal/frmts/pdf/pdfdataset.cpp: At global scope:
/gdal/frmts/pdf/pdfdataset.cpp:1638:18: error:'virtual bool GDALPDFiumRenderDeviceDriver::DrawDeviceText(const
pdfium::span<const TextCharPos>&, CFX_Font*, const CFX_Matrix&, float,
uint32_t, const CFX_TextRenderOptions&)' marked'override', but does not override
1638 | virtual bool DrawDeviceText(const pdfium::span<const TextCharPos> &pCharPos,
| ^~~~~~~~~~~~~~
/gdal/frmts/pdf/pdfdataset.cpp:1638:18: warning: by'virtual bool GDALPDFiumRenderDeviceDriver::DrawDeviceText(const
pdfium::span<const TextCharPos>&, CFX_Font*, const CFX_Matrix&, float,
uint32_t, const CFX_TextRenderOptions&)' [-Woverloaded-virtual]
/gdal/frmts/pdf/pdfdataset.cpp: In function'void myRenderPageImpl(PDFDataset*, CPDF_PageRenderContext*, CPDF_Page*,
const CFX_Matrix&, const FX_RECT&, int, const FPDF_COLORSCHEME*, bool,
CPDFSDK_PauseAdapter*)':
/gdal/frmts/pdf/pdfdataset.cpp:1776:38: error:'class CPDF_Page' has no member named'GetMutablePageResources'; did you mean'GetPageResources'?
1776 | pPage->GetDocument(), pPage->GetMutablePageResources(),
| ^~~~~~~~~~~~~~~~~~~~~~~
| GetPageResources
/gdal/frmts/pdf/pdfdataset.cpp:1777:16: error:'class CPDF_Page' has no member named'GetPageImageCache'
1777 | pPage->GetPageImageCache());
| ^~~~~~~~~~~~~~~~~
/gdal/frmts/pdf/pdfdataset.cpp: Instatic member function'static PDFDataset* PDFDataset::Open(GDALOpenInfo*)':
/gdal/frmts/pdf/pdfdataset.cpp:4831:48: error: cannot convert'CPDF_Dictionary* const' to'fxcrt::RetainPtr<const CPDF_Object>'
4831 | poPageObj = GDALPDFObjectPdfium::Build(pageObj);
| ^~~~~~~
| |
| CPDF_Dictionary*const
In file included from /gdal/frmts/pdf/gdal_pdf.h:60,
from /gdal/frmts/pdf/pdfdataset.cpp:36:
/gdal/frmts/pdf/pdfobject.h:442:68: note: initializing argument 1 of'static GDALPDFObjectPdfium*
GDALPDFObjectPdfium::Build(fxcrt::RetainPtr<const CPDF_Object>)'
442 |static GDALPDFObjectPdfium *Build(RetainPtr<const CPDF_Object> obj);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/gdal/frmts/pdf/pdfdataset.cpp:5424:65: error: cannot convert'CPDF_Dictionary*' to'fxcrt::RetainPtr<const CPDF_Object>'
5424 | GDALPDFObjectPdfium::Build(poDocPdfium->doc->GetInfo());
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~
| |
| CPDF_Dictionary*
In file included from /gdal/frmts/pdf/gdal_pdf.h:60,
from /gdal/frmts/pdf/pdfdataset.cpp:36:
/gdal/frmts/pdf/pdfobject.h:442:68: note: initializing argument 1 of'static GDALPDFObjectPdfium*
GDALPDFObjectPdfium::Build(fxcrt::RetainPtr<const CPDF_Object>)'
442 |static GDALPDFObjectPdfium *Build(RetainPtr<const CPDF_Object> obj);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/pdfium/core/fxcrt/bytestring.h:21,
from /usr/include/pdfium/core/fxcrt/fx_string.h:14,
from /usr/include/pdfium/core/fpdfapi/parser/cpdf_object.h:15,
from /usr/include/pdfium/core/fpdfapi/parser/cpdf_dictionary.h:15,
from /usr/include/pdfium/core/fpdfapi/page/cpdf_pageobjectholder.h:20,
from /usr/include/pdfium/core/fpdfapi/page/cpdf_page.h:13,
from /gdal/frmts/pdf/pdfsdk_headers.h:131,
from /gdal/frmts/pdf/gdal_pdf.h:54,
from /gdal/frmts/pdf/pdfdataset.cpp:36:
/usr/include/pdfium/core/fxcrt/retain_ptr.h: In instantiation of'fxcrt::RetainPtr<T> pdfium::MakeRetain(Args&& ...) [with T =
GDALPDFiumOCContext; Args = {PDFDataset*&, CPDF_Document*, const
CPDF_OCContext::UsageType&}]':
/gdal/frmts/pdf/pdfdataset.cpp:1770:42: required from here
/usr/include/pdfium/core/fxcrt/retain_ptr.h:164:23: error: invalidnew-expression ofabstract class type'GDALPDFiumOCContext'
164 |return RetainPtr<T>(new T(std::forward<Args>(args)...));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/gdal/frmts/pdf/pdfdataset.cpp:1439:7: note: because the following virtual functions are pure within'GDALPDFiumOCContext':
1439 |class GDALPDFiumOCContext :public CPDF_OCContextInterface
| ^~~~~~~~~~~~~~~~~~~
In file included from /gdal/frmts/pdf/pdfsdk_headers.h:132,
from /gdal/frmts/pdf/gdal_pdf.h:54,
from /gdal/frmts/pdf/pdfdataset.cpp:36:
/usr/include/pdfium/core/fpdfapi/page/cpdf_occontext.h:24:16: note:'virtual bool CPDF_OCContextInterface::CheckOCGVisible(const
CPDF_Dictionary*) const'
24 | virtual bool CheckOCGVisible(const CPDF_Dictionary* pOCGDict)const = 0;
| ^~~~~~~~~~~~~~~
make[2]: *** [frmts/pdf/CMakeFiles/gdal_PDF.dir/build.make:89: frmts/pdf/CMakeFiles/gdal_PDF.dir/pdfdataset.cpp.o] Error 1
make[2]: *** Waitingfor unfinished jobs....
...
make[1]: *** [CMakeFiles/Makefile2:8549: frmts/pdf/CMakeFiles/gdal_PDF.dir/all] Error 2
make[1]: *** Waitingfor unfinished jobs....
...
make: *** [Makefile:141: all] Error 2
The command'/bin/sh -c . /buildscripts/bh-set-envvars.sh &&
/buildscripts/bh-gdal.sh' returned a non-zero code: 2
Am 14.02.23 um 19:15 schrieb Even Rouault:
>
> Dual architecture amd64+arm64 builds are attempted by default (see
> https://github.com/OSGeo/gdal/tree/master/docker#multi-arch-images),
> which requires docker buildx to be setup|, or perhaps just ||binfmt to
> support arm64 through qemu|||
>
> If you just need amd64 builds, add "--platform linux/amd64" after
> ./build.sh
>
> Le 14/02/2023 à 19:00, Dirk Stenger a écrit :
>>
>> All,
>>
>> Unfortunately, when trying to build the GDAL Docker Image on a local
>> machine (Ubuntu 22.04), the build fails with an error:
>>
>> Executed commands and logging:
>>
>> ~/git/gdal/docker/ubuntu-small$ ./build.sh
>> ...
>> debconf: delayingpackage configuration, since apt-utils is not installed
>> Fetched 70.5 MB in 39s (1795 kB/s)
>> Selecting previously unselectedpackage 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 unselectedpackage libexpat1:arm64.
>> Preparing to unpack .../libexpat1_2.4.7-1ubuntu0.2_arm64.deb ...
>> Unpacking libexpat1:arm64 (2.4.7-1ubuntu0.2) ...
>> Selecting previously unselectedpackage 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) ...
>> /var/lib/dpkg/info/python3.10-minimal.postinst: 51: /usr/bin/python3.10: Exec format error
>> dpkg: error processingpackage python3.10-minimal:arm64 (--configure):
>> installed python3.10-minimal:arm64package post-installation script subprocess returned error exit status 126
>> Errors were encounteredwhile processing:
>> python3.10-minimal:arm64
>> E: Sub-process /usr/bin/dpkg returned an error code (1)
>> The command'/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' returned a non-zero code: 100
>>
>> The same behavior occurs with ubuntu-full:
>>
>> ~/git/gdal/docker/ubuntu-full$ ./build.sh
>> ...
>> debconf: delayingpackage configuration, since apt-utils is not installed
>> Fetched 466 MB in 3min 39s (2128 kB/s)
>> Selecting previously unselectedpackage 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 unselectedpackage libgpg-error0:arm64.
>> Preparing to unpack .../libgpg-error0_1.43-3_arm64.deb ...
>> Unpacking libgpg-error0:arm64 (1.43-3) ...
>> Selecting previously unselectedpackage libgcrypt20:arm64.
>> Preparing to unpack .../libgcrypt20_1.9.4-3ubuntu3_arm64.deb ...
>> Unpacking libgcrypt20:arm64 (1.9.4-3ubuntu3) ...
>> Selecting previously unselectedpackage 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 unselectedpackage 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 unselectedpackage 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 unselectedpackage libexpat1:arm64.
>> Preparing to unpack .../libexpat1_2.4.7-1ubuntu0.2_arm64.deb ...
>> Unpacking libexpat1:arm64 (2.4.7-1ubuntu0.2) ...
>> Selecting previously unselectedpackage 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) ...
>> /var/lib/dpkg/info/python3.10-minimal.postinst: 51: /usr/bin/python3.10: Exec format error
>> dpkg: error processingpackage python3.10-minimal:arm64 (--configure):
>> installed python3.10-minimal:arm64package post-installation script subprocess returned error exit status 126
>> Errors were encounteredwhile processing:
>> python3.10-minimal:arm64
>> E: Sub-process /usr/bin/dpkg returned an error code (1)
>> The command'/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-private-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-"$JAVA_VERSION"-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 /var/lib/apt/lists/*' returned a non-zero code: 100
>>
>> This is the used Docker version:
>>
>> docker --version
>> Docker version 20.10.17, build 100c701
>>
>> I tried to build the /master/ branch and /release/3.5/ branch.
>>
>> Can anyone help why the build is failing?
>>
>> Kind regards,
>>
>> Dirk Stenger
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
--
l a t / l o n GmbH
Im Ellig 1 53343 Wachtberg, Germany
phone ++49 +228 24 333 784
http://www.lat-lon.de http://www.deegree.org
lat/lon gesellschaft für raumbezogene informationssysteme mbH
Registergericht: Amtsgericht Bonn, HRB 13042
Geschäftsführer: Jens Fitzke und Torsten Friebe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230214/9da227ca/attachment-0001.htm>
More information about the gdal-dev
mailing list