#22627 closed defect (fixed)
Inkscape FTBFS with poppler-26.01.0
| Reported by: | Douglas R. Reno | Owned by: | Bruce Dubbs |
|---|---|---|---|
| Priority: | normal | Milestone: | 13.0 |
| Component: | BOOK | Version: | git |
| Severity: | medium | Keywords: | |
| Cc: |
Description
Inkscape doesn't build with poppler-26.01.0:
/sources/inkscape-1.4.3/inkscape-1.4.3_2025-12-25_0d15f75042/src/extension/internal/pdfinput/pdf-input.cpp: In destructor ‘virtual Inkscape::Extension::Internal::PdfImportDialog::~PdfImportDialog()’:
/sources/inkscape-1.4.3/inkscape-1.4.3_2025-12-25_0d15f75042/src/extension/internal/pdfinput/pdf-input.cpp:286:13: error: ‘gfree’ was not declared in this scope; did you mean ‘g_free’?
286 | gfree(_thumb_data);
| ^~~~~
| g_free
/sources/inkscape-1.4.3/inkscape-1.4.3_2025-12-25_0d15f75042/src/extension/internal/pdfinput/pdf-input.cpp: In member function ‘void Inkscape::Extension::Internal::PdfImportDialog::_setPreviewPage(int)’:
/sources/inkscape-1.4.3/inkscape-1.4.3_2025-12-25_0d15f75042/src/extension/internal/pdfinput/pdf-input.cpp:514:13: error: ‘gfree’ was not declared in this scope; did you mean ‘g_free’?
514 | gfree(_thumb_data);
| ^~~~~
| g_free
I was able to work around this one with:
sed -i 's/gfree/g_free/' src/extension/internal/pdfinput/pdf-input.cpp
After that though, I got an error about the reset function similar to what we saw in Libreoffice, so I did another sed for that:
sed -i 's/gfree/g_free/' src/extension/internal/pdfinput/pdf-input.cpp
Now though I'm getting hit with:
/sources/inkscape-1.4.3/inkscape-1.4.3_2025-12-25_0d15f75042/src/extension/internal/pdfinput/svg-builder.cpp:1632:42: error: ‘gmallocn’ was not declared in this scope; did you mean ‘malloc’?
1632 | auto cairo_glyphs = (cairo_glyph_t *)gmallocn(_glyphs.size(), sizeof(cairo_glyph_t));
| ^~~~~~~~
| malloc
This one I'm not sure about. That seems to be a wrapper that used to be in the xpdf headers.
Change History (5)
comment:1 by , 9 months ago
comment:2 by , 9 months ago
Adding the following to the inkscape instructions works for me:
sed -i 's/gfree/g_free/' src/extension/internal/pdfinput/pdf-input.cpp &&
sed -e '/Stream.h/a#include <poppler/goo/gmem.h>' \
-e 's/reset/rewind/' \
-i src/extension/internal/pdfinput/svg-builder.cpp &&
comment:3 by , 9 months ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , 9 months ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixed at commit ba8a8fba80.
Note:
See TracTickets
for help on using tickets.

gmalloc is defined in /usr/include/poppler/goo/gmem.h
In src/extension/internal/pdfinput/svg-builder.cpp we probably need to add
#include <poppler/goo/gmem.h>
svg-builder.cpp already has
so my best guess is that gmem.h used to be included by one of those, but now has to be explicitly included.
I'll note that src/extension/internal/pdfinput/pdf-input.cpp currently has #include <poppler/goo/GooString.h>.