@h3b: Why does the code in the error you have not match the actual dia code? (edit: the error upstream was fixed last September )
I cannot reproduce, so perhaps you need to do a clean build, or build in a clean chroot.
![]() |
VOOZH | about |
| Git Clone URL: | https://aur.archlinux.org/dia-git.git (read-only, click to copy) |
|---|---|
| Package Base: | dia-git |
| Description: | A GTK+ based diagram creation program |
| Upstream URL: | https://gitlab.gnome.org/GNOME/dia |
| Licenses: | GPL-2.0-or-later |
| Conflicts: | dia |
| Provides: | dia |
| Submitter: | lilac |
| Maintainer: | a821 |
| Last Packager: | a821 |
| Votes: | 4 |
| Popularity: | 0.004843 |
| First Submitted: | 2019-05-08 01:07 (UTC) |
| Last Updated: | 2026-06-16 07:00 (UTC) |
@h3b: Why does the code in the error you have not match the actual dia code? (edit: the error upstream was fixed last September )
I cannot reproduce, so perhaps you need to do a clean build, or build in a clean chroot.
Hello! I'm getting similar fails as @lash:
../dia/plug-ins/pdf/pdf-import.cpp:368:40: error: cannot convert ‘const std::array<double, 6>’ to ‘const double*’ in initialization
368 | const double *fm = f->getFontMatrix();
| ~~~~~~~~~~~~~~~~^~
| |
| const std::array<double, 6>
../dia/plug-ins/pdf/pdf-import.cpp: In member function ‘void DiaOutputDev::drawString(GfxState*, GooString*)’:
../dia/plug-ins/pdf/pdf-import.cpp:728:16: error: ‘class GooString’ has no member named ‘getLength’
728 | int len = s->getLength();
| ^~~~~~~~~
../dia/plug-ins/pdf/pdf-import.cpp: In member function ‘void DiaOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int*, bool)’:
../dia/plug-ins/pdf/pdf-import.cpp:845:14: error: ‘class ImageStream’ has no member named ‘reset’
845 | imgStr.reset(); // otherwise getLine() is crashing right away
| ^~~~~
Fails to build on latest commit.
==> Starting prepare()...
Applied patch to 'plug-ins/pdf/pdf-import.cpp' with conflicts.
U plug-ins/pdf/pdf-import.cpp
Recorded preimage for 'plug-ins/pdf/pdf-import.cpp'
==> ERROR: A failure occurred in prepare().
@lash: thanks for letting me know. I can reproduce the issue and I guess poppler 25.10 broke it again (t̶o̶ ̶b̶e̶ ̶c̶o̶n̶f̶i̶r̶m̶e̶d̶). I don't see an issue upstream yet... I will try to find a workaround.
Edit: Indeed, poppler 25.10 broke it, I built dia successfully with poppler 25.09 (set the date to 2025-10-15 if you use the Arch Linux archive).
Edit2: SOLVED. I found a patch following the lead of the same issue for 25.09 (upstream #570)
Is this documentation failing to build?
--
../dia/plug-ins/pdf/pdf-import.cpp: In member function ‘void DiaOutputDev::drawString(GfxState*, GooString*)’:
../dia/plug-ins/pdf/pdf-import.cpp:779:16: error: ‘class GooString’ has no member named ‘getLength’
779 | int len = s->getLength();
| ^~~~~~~~~
../dia/plug-ins/pdf/pdf-import.cpp: In member function ‘void DiaOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int*, bool)’:
../dia/plug-ins/pdf/pdf-import.cpp:903:19: warning: ignoring return value of ‘bool ImageStream::reset()’, declared with attribute ‘nodiscard’ [-Wunused-result]
903 | imgStr.reset(); // otherwise getLine() is crashing right away
| ~~~~~~~~~~~~^~
In file included from /usr/include/poppler/Object.h:614,
from /usr/include/poppler/OutputDev.h:4,
from ../dia/plug-ins/pdf/pdf-import.cpp:36:
/usr/include/poppler/Stream.h:474:24: note: declared here
474 | [[nodiscard]] bool reset();
| ^~~~~
[29/31] Generating doc/en/e...a.pdf with a custom comman
No template matches termdef in term.
No template matches termdef in term.
ninja: build stopped: subcommand failed.
@jahway603: thanks! I reverted the last commit which undoes the patch. I hope it is OK now.
@a821 the sha256sum of the patch does not match what is in the PKGBUILD, but that patch's contents are now incorporated into the upstream here https://gitlab.gnome.org/GNOME/dia/-/blob/master/plug-ins/pdf/pdf-import.cpp?ref_type=heads#L399, so the patch is no longer needed.
@Kakadus: thanks for the report and the patch. It seems to work. I have incorporated your MR in the PKGBUILD I will push an update shortly.
At the moment I'm out of town for two weeks, so keep in mind I might take some time for me to reply.
Currently, build fails because of change in poppler with
[526/562] Compiling C++ object plug-ins/libpdf_filter.so.p/pdf_pdf-import.cpp.o
FAILED: plug-ins/libpdf_filter.so.p/pdf_pdf-import.cpp.o
sccache c++ -Iplug-ins/libpdf_filter.so.p -Iplug-ins -I../dia/plug-ins -Ilib -I../dia/lib -I. -I../dia -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cloudproviders -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/atk-1.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -I/usr/include/libxml2 -I/usr/include/graphene-1.0 -I/usr/lib/graphene-1.0/include -I/usr/include/poppler -I/usr/include/nss -I/usr/include/nspr -I/usr/include/openjpeg-2.5 -I/usr/include/poppler/cpp -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu++20 -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_8 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_76 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_76 -DGSEAL_ENABLE -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -fPIC -pthread -mfpmath=sse -msse -msse2 -MD -MQ plug-ins/libpdf_filter.so.p/pdf_pdf-import.cpp.o -MF plug-ins/libpdf_filter.so.p/pdf_pdf-import.cpp.o.d -o plug-ins/libpdf_filter.so.p/pdf_pdf-import.cpp.o -c ../dia/plug-ins/pdf/pdf-import.cpp
../dia/plug-ins/pdf/pdf-import.cpp: In member function ‘virtual void DiaOutputDev::updateFont(GfxState*)’:
../dia/plug-ins/pdf/pdf-import.cpp:378:24: warning: bitwise operation between different enumeration types ‘DiaFontFamily’ and ‘DiaFontSlant’ is deprecated [-Wdeprecated-enum-enum-conversion]
377 | DiaFontStyle style = (f->isSerif() ? DIA_FONT_SERIF : DIA_FONT_SANS)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
378 | | (f->isItalic() ? DIA_FONT_ITALIC : DIA_FONT_NORMAL)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../dia/plug-ins/pdf/pdf-import.cpp:399:40: error: cannot convert ‘const std::array<double, 6>’ to ‘const double*’ in initialization
399 | const double *fm = f->getFontMatrix();
| ~~~~~~~~~~~~~~~~^~
| |
| const std::array<double, 6>
../dia/plug-ins/pdf/pdf-import.cpp: In member function ‘void DiaOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int*, bool)’:
../dia/plug-ins/pdf/pdf-import.cpp:903:19: warning: ignoring return value of ‘bool ImageStream::reset()’, declared with attribute ‘nodiscard’ [-Wunused-result]
903 | imgStr.reset(); // otherwise getLine() is crashing right away
| ~~~~~~~~~~~~^~
In file included from /usr/include/poppler/Object.h:605,
from /usr/include/poppler/OutputDev.h:43,
from ../dia/plug-ins/pdf/pdf-import.cpp:36:
/usr/include/poppler/Stream.h:474:24: note: declared here
474 | [[nodiscard]] bool reset();
| ^~~~~
[543/562] Merging translations for sheets/ciscotelephony.sheet
ninja: build stopped: subcommand failed.
Upstream issue: https://gitlab.gnome.org/GNOME/dia/-/issues/570.
Upstream PR: https://gitlab.gnome.org/GNOME/dia/-/merge_requests/140
Maybe you want to add it as a patch to PKGBUILD if necessary.
@a821 Thanks! I recommend defining dependencies by common name that is specified in Provides instead of a specific package name.