Package: doxygen
Version: 1.9.4-4
Severity: normal

Dear maintainer,

Cairo 1.17.6 (or close to it) introduced a change[1] in how certain
PDF elements are generated which introduces a build failure in the
doxygen docs[2], as well as in other packages that use doxygen (like
fenics-dolfinx).

That version of cairo is durrently in debian experimental. As soon as
that moves to unstable, the FTBFS will start. Ubuntu is seeing it
right now[4]:

Generating XML output for file generation.cpp
Generating XML output for file generation.h
Generating XML output ferror: Failed to extract bounding box from
generated diagram file
/<<PKGBUILDDIR>>/cpp/doc/latex/d2/d97/classdolfinx_1_1io_1_1FidesWriter__inherit__graph.pdf
 (warning treated as error, aborting now)
Segmentation fault (core dumped)
make[1]: *** [debian/rules:168: override_dh_auto_install-indep] Error 139
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:125: binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess
returned exit status 2


The upstream bug report[2] had a lot of back and forth until the final
set of fixes made it into the doxygen 1.9.7 release[3]

I collected the commits, and this is the set, where some bits are even
reverted in follow-up commits:

commit 8129939c312e4b5060042fdb93bd071b7b133381
Author: Dimitri van Heesch <doxy...@gmail.com>
Date:   Thu Jan 5 11:16:24 2023 +0100

    issue #9319: Doc build fails with cairo 1.17.6

    - Improve detection of "flate" encoded streams

commit 7b2a6027775b0158304635a98de0f9b5672f163a
Author: Dimitri van Heesch <doxy...@gmail.com>
Date:   Wed Jan 4 10:55:36 2023 +0100

    issue #9319: Doc build fails with cairo 1.17.6

commit 293d3beaf03c8798899332b7a948b32c4a3da3e9
Author: albert-github <albert.te...@gmail.com>
Date:   Sun Nov 6 14:07:42 2022 +0100

    issue #9319 Doc build fails with cairo 1.17.6

    Implementing the use of the environment variable so that always
the non compressed version is written.

commit 9df76e22464a0b6302b7c1cda980a35b39185bc4
Author: albert-github <albert.te...@gmail.com>
Date:   Sat May 7 18:07:26 2022 +0200

    issue #9319 Doc build fails with cairo 1.17.6

    Fixed compilation issue with the `ceil` function.

commit c22ae5ed4ca8d7e5568be7d5a930ee388117703e
Author: albert-github <albert.te...@gmail.com>
Date:   Sat May 7 17:55:25 2022 +0200

    issue #9319 Doc build fails with cairo 1.17.6

    The `\MediaBox` field is written as:
    ```
    sscanf(p+bblen,"%d %d %d %d",&x,&y,width,height)
    ```
    bur read with
    ```
    sscanf(p+bblen,"%d %d %d %d",&x,&y,width,height)
    ```
    this has been corrected.

It doesn't apply cleanly, because a big one is this, which introduces
a vendored gunzip library:

commit 966d69c603b5a6ae22e3132b6ecc6a39b86e52ab
Author: Dimitri van Heesch <doxy...@gmail.com>
Date:   Wed Jan 4 10:38:58 2023 +0100

    Add TinyDeflate as dependency

Maybe others are needed still, this is where I stopped. It seems safer
to update to the new upstream 1.9.7 instead, I suppose.

A short-term workaround would be to call doxygen with
CAIRO_DEBUG_PDF=1. That will tell cairo to not use compression with
those PDF elements, and then the doxygen parsing would work. Problem
is that this would have to be done for all packages that call doxygen
and are affected by this bug, and also it relies on some
cairo-specific behavior which might change.


1. 
https://gitlab.freedesktop.org/cairo/cairo/-/commit/bd514f6b08c1b31a75948fd99c147319e5aa649f
2. https://github.com/doxygen/doxygen/issues/9319
3. https://www.doxygen.nl/manual/changelog.html#log_1_9_7
4. https://bugs.launchpad.net/ubuntu/+source/doxygen/+bug/2026834

  • Bug#1040864: doxygen: upcoming FTBFS with cairo >= 1.1... Andreas Hasenack

Reply via email to