Changes in /usr/include/PDFDoc.h cause compile failure for inkscape
Hello, inkscape (v1.1.1 and v1.1.2 both) compiles against poppler-22.02.0 but errors out against poppler-22.03.0 as follows ((in 310/918):
var/tmp/portage/media-gfx/inkscape-1.1.2/work/inkscape-1.1.2/src/extension/internal/pdfinput/pdf-input.cpp:672:39: required from here /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11.2.0/ext/new_allocator.h:162:11: error: no matching function for call to 'PDFDoc::PDFDoc(GooString*&, std::nullptr_t, std::nullptr_t, std::nullptr_t)' 162 | { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /var/tmp/portage/media-gfx/inkscape-1.1.2/work/inkscape-1.1.2/src/extension/internal/pdfinput/pdf-input.cpp:25: /usr/include/poppler/PDFDoc.h:371:5: note: candidate: 'PDFDoc::PDFDoc()' 371 | PDFDoc(); | ^~~~~~ /usr/include/poppler/PDFDoc.h:371:5: note: candidate expects 0 arguments, 4 provided /usr/include/poppler/PDFDoc.h:139:14: note: candidate: 'PDFDoc::PDFDoc(BaseStream*, const std::optional<GooString>&, const std::optional<GooString>&, void*, const std::function<void()>&)' 139 | 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:139:33: note: no known conversion for argument 1 from 'GooString*' to 'BaseStream*' 139 | explicit PDFDoc(BaseStream *strA, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {}); | ~~~~~~~~~~~~^~~~ In file included from /var/tmp/portage/media-gfx/inkscape-1.1.2/work/inkscape-1.1.2/src/extension/internal/pdfinput/pdf-input.cpp:25: /usr/include/poppler/PDFDoc.h:132:14: note: candidate: 'PDFDoc::PDFDoc(std::unique_ptr<GooString>&&, const std::optional<GooString>&, const std::optional<GooString>&, void*, const std::function<void()>&)' 132 | 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:132:50: note: no known conversion for argument 1 from 'GooString*' to 'std::unique_ptr<GooString>&&' 132 | explicit PDFDoc(std::unique_ptr<GooString> &&fileNameA, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
seems the changes in the PDFDoc.h header file are as follows:
`
- explicit PDFDoc(const GooString *fileNameA, const GooString *ownerPassword = nullptr, const GooString *userPassword = nullptr, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {});
- explicit PDFDoc(std::unique_ptr &&fileNameA, const std::optional &ownerPassword = {}, const std::optional &userPassword = {}, void *guiDataA = nullptr,
-
const std::function<void()> &xrefReconstructedCallback = {});
#ifdef _WIN32
- PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword = nullptr, GooString *userPassword = nullptr, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {});
- PDFDoc(wchar_t *fileNameA, int fileNameLen, const std::optional &ownerPassword = {}, const std::optional &userPassword = {}, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {}); #endif
- explicit PDFDoc(BaseStream *strA, const GooString *ownerPassword = nullptr, const GooString *userPassword = nullptr, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {});
- explicit PDFDoc(BaseStream *strA, const std::optional &ownerPassword = {}, const std::optional &userPassword = {}, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {});`