Subject: Bug#1097703: qpdfview: ftbfs with GCC-15

From: Matthias Klose <[email-masked]>
Date: Mon, 17 Feb 2025 17:47:39 +0000

Package: src:qpdfview
Version: 0.5.0+ds-5
Severity: important
Tags: sid forky
User: [email-masked]
Usertags: ftbfs-gcc-15

[This bug is NOT targeted to the upcoming trixie release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-15/g++-15, but succeeds to build with gcc-14/g++-14. The
severity of this report will be raised before the forky release.

The full build log can be found at:
http://qa-logs.debian.net/2025/02/16/amd64exp/qpdfview_0.5.0+ds-5_unstable_gccexp.log.gz
The last lines of the build log are at the end of this report.

To build with GCC 15, either set CC=gcc-15 CXX=g++-15 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++ 

GCC 15 now defaults to the C23/C++23 standards, exposing many FTBFS.
Other Common build failures are new warnings resulting in build failures
with -Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-15/porting_to.html

[...]
/usr/lib/qt6/libexec/moc -D_FILE_OFFSET_BITS=64 -DHAS_POPPLER_14 -DHAS_POPPLER_18 -DHAS_POPPLER_20 -DHAS_POPPLER_22 -DHAS_POPPLER_24 -DHAS_POPPLER_26 -DHAS_POPPLER_31 -DHAS_POPPLER_35 -DHAS_POPPLER_74 -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /build/reproducible-path/qpdfview-0.5.0+ds/moc-pdf/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -I/build/reproducible-path/qpdfview-0.5.0+ds -I/usr/include/poppler/qt6 -I/usr/include/poppler -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/QtCore -I/usr/include/c++/15 -I/usr/include/x86_64-linux-gnu/c++/15 -I/usr/include/c++/15/backward -I/usr/lib/gcc/x86_64-linux-gnu/15/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sources/annotationwidgets.h -o moc-pdf/moc_annotationwidgets.cpp
/usr/lib/qt6/libexec/moc -D_FILE_OFFSET_BITS=64 -DHAS_POPPLER_14 -DHAS_POPPLER_18 -DHAS_POPPLER_20 -DHAS_POPPLER_22 -DHAS_POPPLER_24 -DHAS_POPPLER_26 -DHAS_POPPLER_31 -DHAS_POPPLER_35 -DHAS_POPPLER_74 -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /build/reproducible-path/qpdfview-0.5.0+ds/moc-pdf/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -I/build/reproducible-path/qpdfview-0.5.0+ds -I/usr/include/poppler/qt6 -I/usr/include/poppler -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/QtCore -I/usr/include/c++/15 -I/usr/include/x86_64-linux-gnu/c++/15 -I/usr/include/c++/15/backward -I/usr/lib/gcc/x86_64-linux-gnu/15/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include sources/formfieldwidgets.h -o moc-pdf/moc_formfieldwidgets.cpp
g++ -c -pipe -g -O2 -ffile-prefix-map=/build/reproducible-path/qpdfview-0.5.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -D_REENTRANT -fPIC -D_FILE_OFFSET_BITS=64 -DHAS_POPPLER_14 -DHAS_POPPLER_18 -DHAS_POPPLER_20 -DHAS_POPPLER_22 -DHAS_POPPLER_24 -DHAS_POPPLER_26 -DHAS_POPPLER_31 -DHAS_POPPLER_35 -DHAS_POPPLER_74 -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/poppler/qt6 -I/usr/include/poppler -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/QtCore -Imoc-pdf -I/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -o objects-pdf/moc_annotationwidgets.o moc-pdf/moc_annotationwidgets.cpp
g++ -c -pipe -g -O2 -ffile-prefix-map=/build/reproducible-path/qpdfview-0.5.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -D_REENTRANT -fPIC -D_FILE_OFFSET_BITS=64 -DHAS_POPPLER_14 -DHAS_POPPLER_18 -DHAS_POPPLER_20 -DHAS_POPPLER_22 -DHAS_POPPLER_24 -DHAS_POPPLER_26 -DHAS_POPPLER_31 -DHAS_POPPLER_35 -DHAS_POPPLER_74 -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/poppler/qt6 -I/usr/include/poppler -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/QtCore -Imoc-pdf -I/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -o objects-pdf/moc_formfieldwidgets.o moc-pdf/moc_formfieldwidgets.cpp
g++ -c -pipe -g -O2 -ffile-prefix-map=/build/reproducible-path/qpdfview-0.5.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -D_REENTRANT -fPIC -D_FILE_OFFSET_BITS=64 -DHAS_POPPLER_14 -DHAS_POPPLER_18 -DHAS_POPPLER_20 -DHAS_POPPLER_22 -DHAS_POPPLER_24 -DHAS_POPPLER_26 -DHAS_POPPLER_31 -DHAS_POPPLER_35 -DHAS_POPPLER_74 -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/poppler/qt6 -I/usr/include/poppler -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/QtCore -Imoc-pdf -I/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -o objects-pdf/moc_pdfmodel.o moc-pdf/moc_pdfmodel.cpp
g++ -c -pipe -g -O2 -ffile-prefix-map=/build/reproducible-path/qpdfview-0.5.0+ds=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -D_REENTRANT -fPIC -D_FILE_OFFSET_BITS=64 -DHAS_POPPLER_14 -DHAS_POPPLER_18 -DHAS_POPPLER_20 -DHAS_POPPLER_22 -DHAS_POPPLER_24 -DHAS_POPPLER_26 -DHAS_POPPLER_31 -DHAS_POPPLER_35 -DHAS_POPPLER_74 -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/poppler/qt6 -I/usr/include/poppler -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/QtCore -Imoc-pdf -I/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -o objects-pdf/moc_model.o moc-pdf/moc_model.cpp
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydatapointer.h:7,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qbytearray.h:11,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qstringview.h:8,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qchar.h:656,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qstring.h:14,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qcoreapplication.h:8,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/QCoreApplication:1,
                 from sources/pdfmodel.h:26,
                 from sources/pdfmodel.cpp:24:
In member function ‘void QtPrivate::QMovableArrayOps<T>::Inserter::insertOne(qsizetype, T&&) [with T = Poppler::HighlightAnnotation::Quad]’,
    inlined from ‘void QtPrivate::QMovableArrayOps<T>::emplace(qsizetype, Args&& ...) [with Args = {const Poppler::HighlightAnnotation::Quad&}; T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydataops.h:838:37,
    inlined from ‘T& QList<T>::emplaceBack(Args&& ...) [with Args = {const Poppler::HighlightAnnotation::Quad&}; T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:866:15,
    inlined from ‘void QList<T>::append(parameter_type) [with T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:444:48,
    inlined from ‘QList<T>& QList<T>::operator<<(parameter_type) [with T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:693:13,
    inlined from ‘virtual qpdfview::Model::Annotation* qpdfview::Model::PdfPage::addHighlightAnnotation(const QRectF&, const QColor&)’ at sources/pdfmodel.cpp:855:84:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydataops.h:754:13: warning: ‘*(unsigned char*)((char*)&quad + offsetof(Poppler::HighlightAnnotation::Quad, Poppler::HighlightAnnotation::Quad::capStart))’ is used uninitialized [-Wuninitialized]
  754 |             new (where) T(std::move(t));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
sources/pdfmodel.cpp: In member function ‘virtual qpdfview::Model::Annotation* qpdfview::Model::PdfPage::addHighlightAnnotation(const QRectF&, const QColor&)’:
sources/pdfmodel.cpp:849:40: note: ‘*(unsigned char*)((char*)&quad + offsetof(Poppler::HighlightAnnotation::Quad, Poppler::HighlightAnnotation::Quad::capStart))’ was declared here
  849 |     Poppler::HighlightAnnotation::Quad quad;
      |                                        ^~~~
In member function ‘void QtPrivate::QMovableArrayOps<T>::Inserter::insertOne(qsizetype, T&&) [with T = Poppler::HighlightAnnotation::Quad]’,
    inlined from ‘void QtPrivate::QMovableArrayOps<T>::emplace(qsizetype, Args&& ...) [with Args = {const Poppler::HighlightAnnotation::Quad&}; T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydataops.h:838:37,
    inlined from ‘T& QList<T>::emplaceBack(Args&& ...) [with Args = {const Poppler::HighlightAnnotation::Quad&}; T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:866:15,
    inlined from ‘void QList<T>::append(parameter_type) [with T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:444:48,
    inlined from ‘QList<T>& QList<T>::operator<<(parameter_type) [with T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:693:13,
    inlined from ‘virtual qpdfview::Model::Annotation* qpdfview::Model::PdfPage::addHighlightAnnotation(const QRectF&, const QColor&)’ at sources/pdfmodel.cpp:855:84:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydataops.h:754:13: warning: ‘*(unsigned char*)((char*)&quad + offsetof(Poppler::HighlightAnnotation::Quad, Poppler::HighlightAnnotation::Quad::capEnd))’ is used uninitialized [-Wuninitialized]
  754 |             new (where) T(std::move(t));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
sources/pdfmodel.cpp: In member function ‘virtual qpdfview::Model::Annotation* qpdfview::Model::PdfPage::addHighlightAnnotation(const QRectF&, const QColor&)’:
sources/pdfmodel.cpp:849:40: note: ‘*(unsigned char*)((char*)&quad + offsetof(Poppler::HighlightAnnotation::Quad, Poppler::HighlightAnnotation::Quad::capEnd))’ was declared here
  849 |     Poppler::HighlightAnnotation::Quad quad;
      |                                        ^~~~
In member function ‘void QtPrivate::QMovableArrayOps<T>::Inserter::insertOne(qsizetype, T&&) [with T = Poppler::HighlightAnnotation::Quad]’,
    inlined from ‘void QtPrivate::QMovableArrayOps<T>::emplace(qsizetype, Args&& ...) [with Args = {const Poppler::HighlightAnnotation::Quad&}; T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydataops.h:838:37,
    inlined from ‘T& QList<T>::emplaceBack(Args&& ...) [with Args = {const Poppler::HighlightAnnotation::Quad&}; T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:866:15,
    inlined from ‘void QList<T>::append(parameter_type) [with T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:444:48,
    inlined from ‘QList<T>& QList<T>::operator<<(parameter_type) [with T = Poppler::HighlightAnnotation::Quad]’ at /usr/include/x86_64-linux-gnu/qt6/QtCore/qlist.h:693:13,
    inlined from ‘virtual qpdfview::Model::Annotation* qpdfview::Model::PdfPage::addHighlightAnnotation(const QRectF&, const QColor&)’ at sources/pdfmodel.cpp:855:84:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qarraydataops.h:754:13: warning: ‘quad.Poppler::HighlightAnnotation::Quad::feather’ is used uninitialized [-Wuninitialized]
  754 |             new (where) T(std::move(t));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
sources/pdfmodel.cpp: In member function ‘virtual qpdfview::Model::Annotation* qpdfview::Model::PdfPage::addHighlightAnnotation(const QRectF&, const QColor&)’:
sources/pdfmodel.cpp:849:40: note: ‘quad.Poppler::HighlightAnnotation::Quad::feather’ was declared here
  849 |     Poppler::HighlightAnnotation::Quad quad;
      |                                        ^~~~
rm -f libqpdfview_pdf.so
g++ -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu -shared -o libqpdfview_pdf.so objects-pdf/pdfmodel.o objects-pdf/annotationwidgets.o objects-pdf/formfieldwidgets.o objects-pdf/moc_model.o objects-pdf/moc_pdfmodel.o objects-pdf/moc_annotationwidgets.o objects-pdf/moc_formfieldwidgets.o  -lpoppler-qt6 /usr/lib/x86_64-linux-gnu/libQt6Widgets.so /usr/lib/x86_64-linux-gnu/libQt6Gui.so /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so /usr/lib/x86_64-linux-gnu/libQt6Core.so -lpthread -lGLX -lOpenGL    
/usr/bin/ld: objects-pdf/annotationwidgets.o:(.rodata+0x0): multiple definition of `QtPrivate::IsFloatType_v<_Float16>'; objects-pdf/pdfmodel.o:(.rodata+0x4e): first defined here
/usr/bin/ld: objects-pdf/formfieldwidgets.o:(.rodata+0x0): multiple definition of `QtPrivate::IsFloatType_v<_Float16>'; objects-pdf/pdfmodel.o:(.rodata+0x4e): first defined here
/usr/bin/ld: objects-pdf/moc_model.o:(.rodata+0x1c4): multiple definition of `QtPrivate::IsFloatType_v<_Float16>'; objects-pdf/pdfmodel.o:(.rodata+0x4e): first defined here
/usr/bin/ld: objects-pdf/moc_pdfmodel.o:(.rodata+0x1c8): multiple definition of `QtPrivate::IsFloatType_v<_Float16>'; objects-pdf/pdfmodel.o:(.rodata+0x4e): first defined here
/usr/bin/ld: objects-pdf/moc_annotationwidgets.o:(.rodata+0x258): multiple definition of `QtPrivate::IsFloatType_v<_Float16>'; objects-pdf/pdfmodel.o:(.rodata+0x4e): first defined here
/usr/bin/ld: objects-pdf/moc_formfieldwidgets.o:(.rodata+0x62c): multiple definition of `QtPrivate::IsFloatType_v<_Float16>'; objects-pdf/pdfmodel.o:(.rodata+0x4e): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile.pdf-plugin:156: libqpdfview_pdf.so] Error 1
make[2]: Leaving directory '/build/reproducible-path/qpdfview-0.5.0+ds'
make[1]: *** [Makefile:48: sub-pdf-plugin-pro-make_first-ordered] Error 2
make[1]: Leaving directory '/build/reproducible-path/qpdfview-0.5.0+ds'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

---

From: "Debian Bug Tracking System" <[email-masked]>
Date: Mon, 17 Feb 2025 17:49:34 +0000

Thank you for filing a new Bug report with Debian.

You can follow progress on this Bug here: 1097703: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097703.

This is an automatically generated reply to let you know your message
has been received.

Your message has been forwarded to the package maintainers (but not
other interested parties, as you requested) for their attention; they
will reply in due course.

Your message has been sent to the package maintainer(s):
 Louis-Philippe Véronneau <[email-masked]>

If you wish to submit further information on this problem, please
send it to [email-masked].

Please do not send mail to [email-masked] unless you wish
to report a problem with the Bug-tracking system.

-- 
1097703: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097703
Debian Bug Tracking System
Contact [email-masked] with problems