Bug 2395533
| Summary: | dot's GDKPixbuf-based image exporters can't output images in F43 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | "FeRD" (Frank Dana) <ferdnyc> |
| Component: | graphviz | Assignee: | Jaroslav Škarvada <jskarvad> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 43 | CC: | alex, go-sig, jskarvad, mjg, r-maint-sig, spotrh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | graphviz-14.0.2-2.fc44 | Doc Type: | --- |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-11-27 16:07:14 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
CC'ing spot, who brought the issue to our attention @pydot. Reported upstream at https://gitlab.com/graphviz/graphviz/-/issues/2732 I've submitted a PR to address this, at least in the short term until the issue can be diagnosed: https://src.fedoraproject.org/rpms/graphviz/pull-request/24 It takes an admittedly heavy-handed (but sure to be effective) approach, disabling GDKPixbuf completely when building for Fedora 43+. For posterity so that it doesn't get lost in the PR history (especially with Pagure eventually going away), my summary of the issue and the effects of disabling GDKPixbuf as a workaround...
Effects of disabling GDKPixbuf
==============================
Graphviz output formats are specified as a colon-separated triplet of <format>:<renderer>:<formatter>. GDKPixbuf always takes the <formatter> role (third item), as simply "gdk". For convenience, dot accepts '-T' arguments with fewer than three parts, and will use the argument supplied as a prefix, selecting the first available format which matches. (So, 'dot -Tjpg' gets the first of whatever JPEG modes is available, 'dot -Tjpg:cairo' gets the first available one based on Cairo, etc.)
The list of available format methods to output a given type of image in Fedora's graphviz builds is dependent on the set of subpackages installed. Looking at Graphviz 12.2.1 in Fedora 42 with all plugin subpackages installed, there are 5 image formats with a GDKPixbuf output option ("jpg" and "tiff" have multiple spellings, so there are more than 5 lines here, but the list represents 5 distinct formats):
========
$ for fmt in $(dot -Thelp 2>&1|sed -e 's/.*one of: //;'); do dot -T${fmt}:; done|&grep gdk
Format: "bmp:" not recognized. Use one of: bmp:cairo:gdk bmp:cairo:devil
Format: "ico:" not recognized. Use one of: ico:cairo:gdk
Format: "jpe:" not recognized. Use one of: jpe:cairo:gdk jpe:cairo:gd jpe:gd:gd jpe:cairo:devil
Format: "jpeg:" not recognized. Use one of: jpeg:cairo:gdk jpeg:cairo:gd jpeg:gd:gd jpeg:cairo:devil
Format: "jpg:" not recognized. Use one of: jpg:cairo:gdk jpg:cairo:gd jpg:gd:gd jpg:cairo:devil
Format: "png:" not recognized. Use one of: png:cairo:cairo png:cairo:gdk png:cairo:gd png:gd:gd png:cairo:devil
Format: "tif:" not recognized. Use one of: tif:cairo:gdk tif:cairo:devil
Format: "tiff:" not recognized. Use one of: tiff:cairo:gdk tiff:cairo:devil
========
ICO, BMP, JPG, and TIF all default to the GDKPixbuf formatter. With the current F43beta/F44 graphviz package, any of the following commands will produce an empty file instead of an image:
echo "graph G { a -- b; }" | dot -Tico -o graph.ico
echo "graph G { a -- b; }" | dot -Tbmp -o graph.bmp
echo "graph G { a -- b; }" | dot -Tjpg -o graph.jpg
echo "graph G { a -- b; }" | dot -Ttiff -o graph.tif
With GDKPixbuf disabled
=======================
If GDKPixbuf is disabled, it has the following effects:
1. (only) .ICO becomes unsupported; there is no other method of generating an ico-format image.
2. TIFF and BMP will be unavailable in the base package,
but can be restored by also installing the graphviz-devil subpackage.
3. JPEG will also be unavailable in the base package.
It will now require either graphviz-gd or graphviz-devil to be installed.
4. PNG will be unaffected in all cases.
With or without GDKPixbuf, it's always defaulted to '-Tpng:cairo:cairo'
from the base package, and will continue to do so.
If the loss of available output formats in the base package is a problem, we could make graphviz-devil and/or graphviz-gd a Recommended: or even Required: dependency of the base graphviz temporarily. (My PR does not currently take that step.) By including devil/gd by default, we'd ensure that the functionality available after running `sudo dnf install graphviz` is nearly equivalent to the same in F42 and earlier (modulo the loss of support for `dot -Tico`).
FEDORA-2025-c1781068d5 (graphviz-14.0.2-2.fc44) has been submitted as an update to Fedora 44. https://bodhi.fedoraproject.org/updates/FEDORA-2025-c1781068d5 FEDORA-2025-c1781068d5 (graphviz-14.0.2-2.fc44) has been pushed to the Fedora 44 stable repository. If problem still persists, please make note of it in this bug report. |
Description of problem: The default JPEG writer used by `dot` creates an empty file, when using the graphviz & gdkpixbuf from F43 beta. Dot's other JPEG exporters (based on cairo+gd, cairo+devil, or gd alone) all work as expected. The GDKPixbuf-based PNG writer is also affected, but it isn't the default writer. Version-Release number of selected component (if applicable): graphviz-13.1.1-3.fc43.x86_64 gdk-pixbuf2-2.44.0-1.fc43.x86_64 How reproducible: 100% Steps to Reproduce: $ echo "graph G { a--b; }" | dot -Tjpg -o test.jpg $ file test.jpg Actual results: test.jpg: empty Expected results: test.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 83x155, components 3 Additional info: A valid JPEG can be retrieved by running `dot -Tjpg:cairo:gd`, `dot -Tjpg:cairo:devil`, or `dot -Tjpg:gd:gd`, all of which avoid using GDKPixbuf. `dot -Tjpg` defaults to `dot -Tjpg:cairo:gdk` which is the only mode affected. `dot -Tpng:cairo:gdk` will also produce an empty PNG file, however that's not the default for `dot -Tpng`. `dot -Tpng` implies `dot -Tpng:cairo:cairo` which is not affected. This may be related to the incorporation of Glycin-based image loaders in GDKPixbuf 2.44. Fedora 42 is not affected, `jpg:cairo:gdk` and `png:cairo:gdk` work as expected.