Multiple errors:
/usr/bin/c++ -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/Source/Common -I/<<PKGBUILDDIR>>/Source/Common -I/<<PKGBUILDDIR>>/Source/DataStructureAndEncodingDefinition -I/<<PKGBUILDDIR>>/Source/MediaStorageAndFileFormat -I/<<PKGBUILDDIR>>/Source/InformationObjectDefinition -I/<<PKGBUILDDIR>>/Source/MessageExchangeDefinition -I/<<PKGBUILDDIR>>/Source/DataDictionary -I/<<PKGBUILDDIR>>/Utilities -I/usr/include/poppler -I/usr/include/libxml2 -I/usr/include/openjpeg-2.5 -I/usr/include/Papyrus3 -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/gdcm-3.0.24-2 -Wdate-time -D_FORTIFY_SOURCE=3 -DLIBPOPPLER_UNICODEMAP_HAS_CONSTMAPUNICODE -MD -MT Applications/Cxx/CMakeFiles/gdcminfo.dir/gdcminfo.cxx.o -MF Applications/Cxx/CMakeFiles/gdcminfo.dir/gdcminfo.cxx.o.d -o Applications/Cxx/CMakeFiles/gdcminfo.dir/gdcminfo.cxx.o -c /<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx
In file included from /usr/include/poppler/Object.h:44,
from /usr/include/poppler/XRef.h:44,
from /usr/include/poppler/PDFDoc.h:60,
from /<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:39:
/usr/include/poppler/goo/GooString.h:241:24: error: ‘starts_with’ has not been declared in ‘std::string’
241 | using std::string::starts_with;
| ^~~~~~~~~~~
/usr/include/poppler/goo/GooString.h:244:24: error: ‘ends_with’ has not been declared in ‘std::string’
244 | using std::string::ends_with;
| ^~~~~~~~~
In file included from /usr/include/poppler/Object.h:690:
/usr/include/poppler/Stream.h:300:26: error: ‘std::span’ has not been declared
300 | virtual size_t write(std::span<unsigned char> data) = 0;
| ^~~
/usr/include/poppler/Stream.h:300:35: error: expected ‘,’ or ‘...’ before ‘<’ token
300 | virtual size_t write(std::span<unsigned char> data) = 0;
| ^
/usr/include/poppler/Stream.h:321:18: error: ‘std::span’ has not been declared
321 | size_t write(std::span<unsigned char> data) override;
| ^~~
/usr/include/poppler/Stream.h:321:27: error: expected ‘,’ or ‘...’ before ‘<’ token
321 | size_t write(std::span<unsigned char> data) override;
| ^
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx: In function ‘std::string getInfoDate(Dict*, const char*)’:
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:201:36: error: invalid conversion from ‘Object*’ to ‘int’ [-fpermissive]
201 | if (infoDict->lookup((char*)key, &obj)->isString())
| ^~~~
| |
| Object*
In file included from /usr/include/poppler/Object.h:619:
/usr/include/poppler/Dict.h:81:40: note: initializing argument 2 of ‘Object Dict::lookup(const char*, int) const’
81 | Object lookup(const char *key, int recursion = 0) const;
| ~~~~^~~~~~~~~~~~~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:201:41: error: base operand of ‘->’ has non-pointer type ‘Object’
201 | if (infoDict->lookup((char*)key, &obj)->isString())
| ^~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:259:11: error: ‘void Object::free()’ is private within this context
259 | obj.free();
| ~~~~~~~~^~
/usr/include/poppler/Object.h:562:10: note: declared private here
562 | void free();
| ^~~~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx: In function ‘std::string getInfoString(Dict*, const char*, const UnicodeMap*)’:
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:285:36: error: invalid conversion from ‘Object*’ to ‘int’ [-fpermissive]
285 | if (infoDict->lookup((char*)key, &obj)->isString())
| ^~~~
| |
| Object*
/usr/include/poppler/Dict.h:81:40: note: initializing argument 2 of ‘Object Dict::lookup(const char*, int) const’
81 | Object lookup(const char *key, int recursion = 0) const;
| ~~~~^~~~~~~~~~~~~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:285:41: error: base operand of ‘->’ has non-pointer type ‘Object’
285 | if (infoDict->lookup((char*)key, &obj)->isString())
| ^~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:288:23: error: invalid conversion from ‘const GooString*’ to ‘GooString*’ [-fpermissive]
288 | s1 = obj.getString();
| ~~~~~~~~~~~~~^~
| |
| const GooString*
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:319:11: error: ‘void Object::free()’ is private within this context
319 | obj.free();
| ~~~~~~~~^~
/usr/include/poppler/Object.h:562:10: note: declared private here
562 | void free();
| ^~~~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx: In function ‘int ProcessOneFile(const std::string&, const gdcm::Defs&)’:
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:502:35: error: use of deleted function ‘Object::Object(T) [with T = Object*]’
502 | bv->GetLength(), &appearDict);
| ^
/usr/include/poppler/Object.h:283:5: note: declared here
283 | Object(T) = delete;
| ^~~~~~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:513:51: error: no matching function for call to ‘PDFDoc::PDFDoc(MemStream*&, GooString*&, GooString*&)’
513 | doc = new PDFDoc(appearStream, ownerPW, userPW);
| ^
/usr/include/poppler/PDFDoc.h:378:5: note: candidate: ‘PDFDoc::PDFDoc()’
378 | PDFDoc();
| ^~~~~~
/usr/include/poppler/PDFDoc.h:378:5: note: candidate expects 0 arguments, 3 provided
/usr/include/poppler/PDFDoc.h:141:14: note: candidate: ‘PDFDoc::PDFDoc(BaseStream*, const std::optional<GooString>&, const std::optional<GooString>&, void*, const std::function<void()>&)’
141 | explicit PDFDoc(BaseStream *strA, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {});
| ^~~~~~
/usr/include/poppler/PDFDoc.h:141:71: note: no known conversion for argument 2 from ‘GooString*’ to ‘const std::optional<GooString>&’
141 | explicit PDFDoc(BaseStream *strA, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/poppler/PDFDoc.h:134:14: note: candidate: ‘PDFDoc::PDFDoc(std::unique_ptr<GooString>&&, const std::optional<GooString>&, const std::optional<GooString>&, void*, const std::function<void()>&)’
134 | explicit PDFDoc(std::unique_ptr<GooString> &&fileNameA, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr,
| ^~~~~~
/usr/include/poppler/PDFDoc.h:134:50: note: no known conversion for argument 1 from ‘MemStream*’ to ‘std::unique_ptr<GooString>&&’
134 | explicit PDFDoc(std::unique_ptr<GooString> &&fileNameA, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:535:37: error: no match for ‘operator=’ (operand types are ‘std::unique_ptr<GlobalParams>’ and ‘GlobalParams*’)
535 | globalParams = new GlobalParams();
| ^
In file included from /usr/include/c++/13/memory:78,
from /usr/include/poppler/goo/GooString.h:45:
/usr/include/c++/13/bits/unique_ptr.h:430:9: note: candidate: ‘template<class _Up, class _Ep> typename std::enable_if<std::__and_<std::__and_<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::__uniq_ptr_impl<_Tp, _Dp>::pointer>, std::__not_<std::is_array<_Up> > >, std::is_assignable<_T2&, _U2&&> >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Ep = _Up; _Tp = GlobalParams; _Dp = std::default_delete<GlobalParams>]’
430 | operator=(unique_ptr<_Up, _Ep>&& __u) noexcept
| ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:430:9: note: template argument deduction/substitution failed:
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:535:37: note: mismatched types ‘std::unique_ptr<_Tp, _Dp>’ and ‘GlobalParams*’
535 | globalParams = new GlobalParams();
| ^
/usr/include/c++/13/bits/unique_ptr.h:414:19: note: candidate: ‘std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = GlobalParams; _Dp = std::default_delete<GlobalParams>]’
414 | unique_ptr& operator=(unique_ptr&&) = default;
| ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:414:29: note: no known conversion for argument 1 from ‘GlobalParams*’ to ‘std::unique_ptr<GlobalParams>&&’
414 | unique_ptr& operator=(unique_ptr&&) = default;
| ^~~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:440:7: note: candidate: ‘std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = GlobalParams; _Dp = std::default_delete<GlobalParams>; std::nullptr_t = std::nullptr_t]’
440 | operator=(nullptr_t) noexcept
| ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:440:17: note: no known conversion for argument 1 from ‘GlobalParams*’ to ‘std::nullptr_t’
440 | operator=(nullptr_t) noexcept
| ^~~~~~~~~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:546:22: error: no matching function for call to ‘PDFDoc::getDocInfo(Object*)’
546 | doc->getDocInfo(&info);
| ~~~~~~~~~~~~~~~^~~~~~~
/usr/include/poppler/PDFDoc.h:250:12: note: candidate: ‘Object PDFDoc::getDocInfo()’
250 | Object getDocInfo() { return xref->getDocInfo(); }
| ^~~~~~~~~~
/usr/include/poppler/PDFDoc.h:250:12: note: candidate expects 0 arguments, 1 provided
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:559:18: error: ‘void Object::free()’ is private within this context
559 | info.free();
| ~~~~~~~~~^~
/usr/include/poppler/Object.h:562:10: note: declared private here
562 | void free();
| ^~~~
/<<PKGBUILDDIR>>/Applications/Cxx/gdcminfo.cxx:565:52: error: invalid use of incomplete type ‘const class StructTreeRoot’
565 | const char *tagged = doc->getStructTreeRoot()->isDict() ? "yes" : "no";
| ^~
In file included from /usr/include/poppler/PDFDoc.h:61:
/usr/include/poppler/Catalog.h:64:7: note: forward declaration of ‘class StructTreeRoot’
64 | class StructTreeRoot;
| ^~~~~~~~~~~~~~
The std::string:starts_with one is identical to https://bugs.launchpad.net/ubuntu/+source/dia/+bug/2070284
Upstream bug: https:/ /sourceforge. net/p/gdcm/ bugs/561/
Setting c++ standard to 20 fixes it.