Your message dated Mon, 03 Aug 2026 15:55:17 +0000
with message-id <[email protected]>
and subject line Bug#1142648: fixed in gdcm 3.0.24-13
has caused the Debian Bug report #1142648,
regarding gdcm: will FTBFS with poppler >= 26.02 (PDFDoc stream constructor,
Object::getString() API changes)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1142648: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1142648
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: gdcm
Version: 3.0.24-11
Severity: normal
Tags: ftbfs patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Dear Maintainer,
gdcm fails to build against poppler >= 26.02 (26.07.0 should be available
in experimental soon). Two poppler API changes break the build:
* poppler 26.02 changed the PDFDoc stream constructor to take
std::unique_ptr<BaseStream>. This also breaks the
LIBPOPPLER_PDFDOC_HAS_OPTIONAL configure probe (it tested the removed
raw-pointer variant), so gdcminfo.cxx and gdcmpdf.cxx silently fall back
to even older, long-removed poppler APIs
* poppler 26.04 changed Object::getString() to return const std::string&
instead of const GooString*
```
Applications/Cxx/gdcminfo.cxx:207:34: error: cannot convert 'const std::string'
to 'const GooString*' in initialization
Applications/Cxx/gdcminfo.cxx:517:51: error: no matching function for call to
'PDFDoc::PDFDoc(MemStream*&, GooString*&, GooString*&)'
```
The attached patch re-tests the optional-passwords probe via
PDFDocFactory, adds compile probes for the two new APIs, and adds code
branches for them. Everything follows the existing compile-probe
convention, so the patch is a no-op with the current poppler (26.01) and
is safe to apply now, ahead of the transition.
Thanks,
Nadzeya
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEuVOE/FJ0HcdfWSw//lAdKwFeZPsFAmpiJaAACgkQ/lAdKwFe
ZPuPTg//QPojsqkd71zylZOCHowAbVBQmsoQ32Dd+z7YU6ImhBmf294EEkNuhj2B
Wx0zRGIBS+UI6gZ17wO+CJjVSuPfhkXhamiaYRsU5BFTUHQwzF7AzUF24ZkubmGh
Ms9ctesVkLFjHa4lrSb3UlcY9MeqQLaUSBV2K3p/63WWlUGMOaQGW9EV19DZx3sE
CU2Mo/c2nD4HcScsJSvhgkVnwkPKLOO97Wpdl+H3kHrZKkOg8R5/HcelwgyQMHn9
KfuPfNqi4bRdvn3OOyt1IN+DfL2N6slY5FsF2IoaHTVCcnRKIBugBUoGZXTVQ6P/
RucB6qme+ftgalhbbTbLcwhMXmBW1o3mYqa9Ok6P2JVeYg5GILUQZpNOyqxfWJEw
5JoriUsxFvCkFvYYekcx3ixp2NLek/A5xkOLXW7cHUWaVao8I4V+LcqAd+FfZmso
c3T6gsyWZcvBIF781NoMEwvy+Y4n6sWYvFwSJG8N6Nas/gI5PKwf1rg7hMPSXDLS
OpdQ9DSBXnriCuMlPxqP8O5zD5NRaDgITRIsPIt+/XMaXdQGYs/vVuZv01zkxKoF
iTgtfhc+jIUWV3GUyy5FU3vTpzoJCp6rh98zJ2C9kyBEvLB/fhYwtICVBk0Hq+ji
ZdmgN0J1VUifoS+2EB6BEQ99w49z5S8CT2H7yYXRKZkwF7lXZA8=
=r62O
-----END PGP SIGNATURE-----
Description: Fix FTBFS with poppler >= 26.02
Three poppler API changes break the build: 26.02 made the PDFDoc stream
constructor take std::unique_ptr<BaseStream>, which also breaks the
LIBPOPPLER_PDFDOC_HAS_OPTIONAL configure probe (it tested the removed raw
pointer variant), and 26.04 changed Object::getString() to return
const std::string& instead of const GooString*
.
Re-test the optional-passwords probe via PDFDocFactory, add probes for the
two new APIs, and add code branches for them. All checks are
compile-probe-based, so older poppler still builds
Author: Nadzeya Hutsko <[email protected]>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2161630
Forwarded: no
Last-Update: 2026-07-23
--- a/Applications/Cxx/CMakeLists.txt
+++ b/Applications/Cxx/CMakeLists.txt
@@ -117,12 +117,24 @@
list(APPEND libpoppler_flags -DLIBPOPPLER_UNICODEMAP_HAS_CONSTMAPUNICODE)
endif()
CHECK_CXX_SOURCE_COMPILES(
- "\#include <poppler/PDFDoc.h>\nint main() { std::optional<GooString>
ownerPW, userPW; PDFDoc d((BaseStream*)nullptr,ownerPW,userPW); return 0;}"
+ "\#include <poppler/PDFDocFactory.h>\nint main() {
std::optional<GooString> ownerPW, userPW; GooString fileName;
PDFDocFactory().createPDFDoc(fileName,ownerPW,userPW); return 0;}"
LIBPOPPLER_PDFDOC_HAS_OPTIONAL)
if(LIBPOPPLER_PDFDOC_HAS_OPTIONAL)
list(APPEND libpoppler_flags -DLIBPOPPLER_PDFDOC_HAS_OPTIONAL)
endif()
CHECK_CXX_SOURCE_COMPILES(
+ "\#include <poppler/PDFDoc.h>\nint main() { std::optional<GooString>
ownerPW, userPW; PDFDoc d(std::unique_ptr<BaseStream>{},ownerPW,userPW); return
0;}"
+ LIBPOPPLER_PDFDOC_HAS_UNIQUEPTR_STREAM)
+ if(LIBPOPPLER_PDFDOC_HAS_UNIQUEPTR_STREAM)
+ list(APPEND libpoppler_flags -DLIBPOPPLER_PDFDOC_HAS_UNIQUEPTR_STREAM)
+ endif()
+ CHECK_CXX_SOURCE_COMPILES(
+ "\#include <poppler/Object.h>\nint main() { Object o; const std::string &s
= o.getString(); (void)s; return 0; }"
+ LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING)
+ if(LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING)
+ list(APPEND libpoppler_flags -DLIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING)
+ endif()
+ CHECK_CXX_SOURCE_COMPILES(
"\#include <poppler/goo/GooString.h>\nint main() { GooString gs;
gs.size(); return 0; }"
LIBPOPPLER_GOOSTRING_HAS_SIZE)
if(LIBPOPPLER_GOOSTRING_HAS_SIZE)
--- a/Applications/Cxx/gdcminfo.cxx
+++ b/Applications/Cxx/gdcminfo.cxx
@@ -201,6 +201,9 @@
if (infoDict->lookup((char*)key, &obj)->isString())
#endif
{
+#ifdef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
+ s = obj.getString().c_str();
+#else
#ifndef LIBPOPPLER_GOOSTRING_HAS_GETCSTRING
const
#endif
@@ -210,6 +213,7 @@
#else
s = gs->c_str();
#endif
+#endif
if (s[0] == 'D' && s[1] == ':')
{
s += 2;
@@ -268,11 +272,13 @@
#endif
{
Object obj;
+#ifndef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
#ifdef LIBPOPPLER_GOOSTRING_HAS_CONSTGETCHAR
const GooString *s1;
#else
GooString *s1;
#endif
+#endif
bool isUnicode;
Unicode u;
char buf[8];
@@ -285,6 +291,37 @@
if (infoDict->lookup((char*)key, &obj)->isString())
#endif
{
+#ifdef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
+ const std::string &s1 = obj.getString();
+ if ((s1[0] & 0xff) == 0xfe &&
+ (s1[1] & 0xff) == 0xff)
+ {
+ isUnicode = true;
+ i = 2;
+ }
+ else
+ {
+ isUnicode = false;
+ i = 0;
+ }
+ while (i < (int)s1.size())
+ {
+ if (isUnicode)
+ {
+ u = ((s1[i] & 0xff) << 8) |
+ (s1[i+1] & 0xff);
+ i += 2;
+ }
+ else
+ {
+ u = pdfDocEncoding[s1[i] & 0xff];
+ ++i;
+ }
+ n = uMap->mapUnicode(u, buf, sizeof(buf));
+ //fwrite(buf,1,n,stdout);
+ out.append( std::string(buf, n) );
+ }
+#else
s1 = obj.getString();
if ((s1->getChar(0) & 0xff) == 0xfe &&
(s1->getChar(1) & 0xff) == 0xff)
@@ -318,6 +355,7 @@
//fwrite(buf,1,n,stdout);
out.append( std::string(buf, n) );
}
+#endif
}
#ifndef LIBPOPPLER_NEW_OBJECT_API
obj.free();
@@ -514,7 +552,11 @@
#endif
PDFDoc *doc;
+#ifdef LIBPOPPLER_PDFDOC_HAS_UNIQUEPTR_STREAM
+ doc = new PDFDoc(std::unique_ptr<BaseStream>(appearStream), ownerPW,
userPW);
+#else
doc = new PDFDoc(appearStream, ownerPW, userPW);
+#endif
std::string title;
std::string subject;
--- a/Applications/Cxx/gdcmpdf.cxx
+++ b/Applications/Cxx/gdcmpdf.cxx
@@ -52,6 +52,9 @@
if (infoDict->lookup((char*)key, &obj)->isString())
#endif
{
+#ifdef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
+ s = obj.getString().c_str();
+#else
#ifndef LIBPOPPLER_GOOSTRING_HAS_GETCSTRING
const
#endif
@@ -61,6 +64,7 @@
#else
s = gs->c_str();
#endif
+#endif
if (s[0] == 'D' && s[1] == ':')
{
s += 2;
@@ -119,11 +123,13 @@
#endif
{
Object obj;
+#ifndef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
#ifdef LIBPOPPLER_GOOSTRING_HAS_CONSTGETCHAR
const GooString *s1;
#else
GooString *s1;
#endif
+#endif
bool isUnicode = false;
Unicode u;
char buf[8];
@@ -136,6 +142,37 @@
if (infoDict->lookup((char*)key, &obj)->isString())
#endif
{
+#ifdef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
+ const std::string &s1 = obj.getString();
+ if ((s1[0] & 0xff) == 0xfe &&
+ (s1[1] & 0xff) == 0xff)
+ {
+ isUnicode = true;
+ i = 2;
+ }
+ else
+ {
+ isUnicode = false;
+ i = 0;
+ }
+ while (i < (int)s1.size())
+ {
+ if (isUnicode)
+ {
+ u = ((s1[i] & 0xff) << 8) |
+ (s1[i+1] & 0xff);
+ i += 2;
+ }
+ else
+ {
+ u = pdfDocEncoding[s1[i] & 0xff];
+ ++i;
+ }
+ n = uMap->mapUnicode(u, buf, sizeof(buf));
+ //fwrite(buf,1,n,stdout);
+ out.append( std::string(buf, n) );
+ }
+#else
s1 = obj.getString();
if ((s1->getChar(0) & 0xff) == 0xfe &&
(s1->getChar(1) & 0xff) == 0xff)
@@ -169,6 +206,7 @@
//fwrite(buf,1,n,stdout);
out.append( std::string(buf, n) );
}
+#endif
}
#ifndef LIBPOPPLER_NEW_OBJECT_API
obj.free();
--- End Message ---
--- Begin Message ---
Source: gdcm
Source-Version: 3.0.24-13
Done: Nadzeya Hutsko <[email protected]>
We believe that the bug you reported is fixed in the latest version of
gdcm, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Nadzeya Hutsko <[email protected]> (supplier of updated gdcm package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Thu, 23 Jul 2026 14:45:34 +0200
Source: gdcm
Built-For-Profiles: derivative.ubuntu noudeb
Architecture: source
Version: 3.0.24-13
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team
<[email protected]>
Changed-By: Nadzeya Hutsko <[email protected]>
Closes: 1142648
Launchpad-Bugs-Fixed: 2161630
Changes:
gdcm (3.0.24-13) unstable; urgency=medium
.
* Add patch to fix build with poppler 26.07 (LP: #2161630) (Closes: #1142648)
Checksums-Sha1:
20f8b7728d9292ca20ea26f7973b14ebe472c013 3133 gdcm_3.0.24-13.dsc
8145b1b1b84cb0b006694dba8953617e13c1bb0b 290512 gdcm_3.0.24-13.debian.tar.xz
0cea6a53e6d3209735cfd9acbd2b4221f2012fd7 6872 gdcm_3.0.24-13_source.buildinfo
Checksums-Sha256:
058d09f5a453a0d6454fcb9acb122a0700fde9119f1c17ffb688268022529ecc 3133
gdcm_3.0.24-13.dsc
c1fd3aa460cc32bd7afd22d0a86c382a0ee05050e465a90878b0545e5704800b 290512
gdcm_3.0.24-13.debian.tar.xz
87ed592834fe116ce40ef40f5f7d163ac344e6a445b5bb24befdc9c3fa665159 6872
gdcm_3.0.24-13_source.buildinfo
Files:
4a3e61d65e69c038ea785883b0ee9206 3133 libs optional gdcm_3.0.24-13.dsc
8ba669d36124cb11db0935ce9e37c5b6 290512 libs optional
gdcm_3.0.24-13.debian.tar.xz
9084d5dc7ef09676824e4122d36e26b5 6872 libs optional
gdcm_3.0.24-13_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEETQvhLw5HdtiqzpaW5mx3Wuv+bH0FAmpwtAUACgkQ5mx3Wuv+
bH2Ljg/+OkTUf195PZO7LAW77Ko/Cr3uZDbzM0ITLHplrbsmwfYPlkqI/bik8Lh0
RgZDt34nI86Uh8KXBjzVlPrb7s+gIpQxWrw0uJmz9/B+FW+gxZadZXnoNb7fC92I
mQ0upGpX5czmg0yjEzJ4IIGVE7Cur3btkU3NOkPWHZf1v0+RtTKRyO7JXwceDdVR
jwPK+3oqd2R226PowguYi+zbWG9+vNP71HHYMxZH7PZ77Oz8AUJKjWieXcsRKeml
HWW+XaaR96og/7DSgjFoKVE93L3LTU3DMTZ/5y9AylR1bKd0lYSL4MlyOmy6hH2A
l4UTwUGr9O8934Dz+b+lnziAxMyAZxoX7AgoDWAZLgWnpwaRzwBx1LAoi4GROdNA
/+Kb03B6ogyTO5p2GISTxbe/OhbmEihD5DRgv/72twWNsRgt7p+VAVtvJMIz1bQQ
pV56fFXrcpP2qE3M9Kmq2pGddlNIVBMBCjmgNFgARiNlKqFFkSEIx1M+wO3+O7SF
ja8rfhvLwa3cuB4eHAbRbvsROFTBy4TR6Q6FUIMGhjNapD72Oza05v+EdmgXRHQW
KNLYUMkmbY2J/XIYUb2xcLmTuAXn+MCUNcS/nLa6OCKOqywgNrHrHLbodZypGGGt
5KwOTgS2ugFAZHVEVNeFLeA9Swl4ZKz0u4iPrZGfgD/T/gf5Cvc=
=MIaN
-----END PGP SIGNATURE-----
pgpZ436fLakuO.pgp
Description: PGP signature
--- End Message ---