Bug#1142561: ipe-tools: will FTBFS with poppler >= 26.06: Page box accessors now return a reference

Nadzeya Hutsko nadzeya at debian.org
Tue Jul 21 18:45:36 BST 2026


Source: ipe-tools
Version: 1:7.2.29.2-1
Severity: normal
Tags: ftbfs patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Dear Maintainer,

poppler 26.06 changed the Page box accessors (getMediaBox(), getCropBox()
and friends) to return a const reference instead of a pointer, in upstream
commit d50a4510 "Some const PDFRectangle * to const PDFRectangle &"

pdftoipe still assigns the result to a pointer, so it will FTBFS once
poppler >= 26.06 reaches unstable:

```
xmloutputdev.cpp:68:48: error: cannot convert 'const PDFRectangle' to 'const PDFRectangle*' in initialization
xmloutputdev.cpp:69:46: error: cannot convert 'const PDFRectangle' to 'const PDFRectangle*' in initialization
```

This was found in a test rebuild against poppler 26.07.0. Unstable is still
at 26.01.0-5, so the package builds fine today.

The attached patch takes the address of the returned reference, guarded with
the POPPLER_VERSION_AT_LEAST macro pdftoipe already defines and uses for
poppler. It is a no-op with the current poppler in unstable, so it can be 
applied now, ahead of the transition

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEuVOE/FJ0HcdfWSw//lAdKwFeZPsFAmpfsD0ACgkQ/lAdKwFe
ZPsSsA//U47xS+LN683/szDYw4NXyTdQ7hcbvfdL3iIueKOCqOrFBxLHUBCF76Ea
QNuIiIX+kWBdyfAf3pnTA+3qjxr0+ktbHHBcGjgwrwhTrxQjN37uznjn/RK0aqe7
qvToCFkRRGq0G+/tvvygaPT63PJjxS7ke/4lvdZfYOQGrT2Ze5DhbwXRlHccYVvY
XA6BLXB41T1revnLgwCcZgVworgIb6LUNVyVJMo6fyi8V8MzLbd21waIsCxIwXNL
E9Z/EA4Ahws6fYtfdQtKdVzID23Utjh+xPcabpOeREkY9Fb9zWXqOt9FtIvfYCY6
xUhjZvgkx9yPd/Iwt8bK6huJUhtU2EBGYwV8FsBsKxXnHBOyD1ulDI11CKvPAc0+
ZVMHZaXFFp0+bmhBBC7sFDEbAVQHt+zPllqclg5PvoFJ70Sfjp17TcIPTenqR075
ZBOb32W8TjxBOCj08MCRa8pZka9qtmJD4JoaX9juKE+rl1APQCH3dSslf4w6soZ4
FrCYOL7yzV1dKipC/QfvxZqnR1MJfNLVB4Cv6ihuU6NlFP8E/9URi0nt4iipUNdK
6mh+Z0LAbHcyw1er6/OJUsJfImtdwj6Sl3ZIrn4CgyP8kwPYhtucALYL4HyV+qQe
4fWzUQOUB1tUt+lphgtxNtHYEaHjqoio0SknSZ/ZmwwGtGUelG0=
=UoD6
-----END PGP SIGNATURE-----
-------------- next part --------------
Description: Fix FTBFS with poppler >= 26.06
 poppler 26.06 changed the Page box accessors to return a const
 reference instead of a pointer. Take the address of the result,
 guarded by a version check so older poppler still builds
Author: Nadzeya Hutsko <nadzeya at ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ipe-tools/+bug/2161433
Forwarded: no
Last-Update: 2026-07-21
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/pdftoipe/xmloutputdev.cpp
+++ b/pdftoipe/xmloutputdev.cpp
@@ -65,8 +65,13 @@
   }
   */
 
+#if POPPLER_VERSION_AT_LEAST(26, 6, 0)
+  const PDFRectangle *media = &page->getMediaBox();
+  const PDFRectangle *crop = &page->getCropBox();
+#else
   const PDFRectangle *media = page->getMediaBox();
   const PDFRectangle *crop = page->getCropBox();
+#endif
 
   fprintf(stderr, "MediaBox: %g %g %g %g (%g x %g)\n", 
 	  media->x1, media->x2, media->y1, media->y2, wid, ht);


More information about the debian-science-maintainers mailing list