Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 181147 - media-gfx/graphviz missing PNG/JPEG support unless media-libs/gd was built w/ USE="png jpeg" (was: media-libs/libdvbpsi-0.1.5 failed w/ USE=doc)
Summary: media-gfx/graphviz missing PNG/JPEG support unless media-libs/gd was built w/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
: 195533 287377 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-06 23:40 UTC by Austin McKinley
Modified: 2011-10-11 01:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch to check /usr/bin/dot for PNG support before building documentation (libdvbpsi-0.1.5.ebuild-png-check.patch,879 bytes, patch)
2007-06-09 22:26 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Austin McKinley 2007-06-06 23:40:33 UTC
attempting to emerge vlc:

li austin # emerge -av vlc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] media-libs/libdvdnav-0.1.10  528 kB 
[ebuild  N    ] media-libs/libdvbpsi-0.1.5  USE="doc" 0 kB 
[ebuild  N    ] media-libs/libdvdplay-1.0.1  170 kB 
[ebuild  N    ] media-video/vlc-0.8.6-r1  USE="X a52 alsa dvd flac matroska mp3 ncurses nsplugin ogg opengl png samba svg vorbis (-3dfx) -aalib (-altivec) -arts -avahi -bidi -cdda -cddb -corba -daap -debug -directfb -dts -dvb -esd -fbcon -ggi -gnutls -hal -httpd -libcaca -libnotify -lirc -live -mod -mpeg -musepack -optimisememory -oss -rtsp -sdl -sdl-image -seamonkey -shout -skins -speex -stream (-svga) -theora -truetype -upnp -v4l -vcd -vlm (-win32codecs) -wxwindows -xinerama -xml -xosd -xv" 10,271 kB 

and here's the error:

 * Attempting to build documentation
make -C doc doc
make[1]: Entering directory `/var/tmp/portage/media-libs/libdvbpsi-0.1.5/work/libdvbpsi4-0.1.5/doc'
dot -Tpng -o decoder.png decoder.dot
Renderer type: "png" not recognized. Use one of: canon cmap cmapx dia dot fig gd gd2 gif hpgl imap ismap mif mp pcl pic plain plain-ext ps ps2 svg svgz vtx wbmp xdot
make[1]: *** [decoder.png] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-libs/libdvbpsi-0.1.5/work/libdvbpsi4-0.1.5/doc'
make: *** [doc] Error 2

!!! ERROR: media-libs/libdvbpsi-0.1.5 failed.
Call stack:
  ebuild.sh, line 1615:   Called dyn_compile
  ebuild.sh, line 972:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  libdvbpsi-0.1.5.ebuild, line 31:   Called die

!!! Could not build documentation.
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/media-libs/libdvbpsi-0.1.5/temp/build.log'.

note that emerging without the "doc" USE flag works perfectly.the failure results from dot (part of the graphviz package) not having png support. there's no obvious USE flag that enables png support in graphviz:

li austin # emerge -av graphviz

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] media-gfx/graphviz-2.12  USE="X doc examples nls python ruby -gnome -gtk -pango -perl -tcl -tk" 0 kB 

Reproducible: Always

Steps to Reproduce:
1.emerge libdvbpsi with the "doc" USE flag set
Comment 1 Kevin Pyle 2007-06-09 22:17:06 UTC
For my system, /usr/bin/dot from media-gfx/graphviz-2.12 does have support for png.  From looking at configure.ac for graphviz, it appears to have PNG support if you installed media-libs/gd with png support.  Unlike graphviz, gd does have a USE=png flag.

If I am reading this right, USE=doc in media-libs/libdvbpsi relies on graphviz having been built with a gd with USE=png.  Checking for this will not be easy since a user could theoretically do:

USE=-png emerge media-libs/gd
emerge media-gfx/graphviz
USE=png emerge media-libs/gd
emerge media-gfx/libdvbpsi

In such an order, 'built_with_use media-libs/gd png' would return true, even though (as best I can tell without rebuilding to test this), graphviz would NOT have png support since it had not been rebuilt with the new USE flag for gd.

It may be easier to address this bug by patching graphviz to control PNG support directly, rather than through the support in gd.  If graphviz cannot be easily patched to do that, perhaps it would be sufficient to add a USE=png flag to graphviz with logic like:

if use png && ! built_with_use media-libs/gd png ; then
	eerror "PNG support in graphviz requires PNG support in media-libs/gd."
	eerror "Set USE=png in media-libs/gd or USE=-png in graphviz."
	die "Missing png USE-flag for media-libs/gd"
fi

Then packages could detect whether graphviz had support for PNG in a slightly less roundabout way.  Once detected, the packages using graphviz could either abort or turn off the functionality requiring PNG support.
Comment 2 Kevin Pyle 2007-06-09 22:26:07 UTC
Created attachment 121631 [details, diff]
Proposed patch to check /usr/bin/dot for PNG support before building documentation

This patch modifies the libdvbpsi-0.1.5.ebuild to check whether /usr/bin/dot can create PNG files.  If dot cannot, then make doc is skipped so that the ebuild does not die.  This patch is not dependent on my speculation in comment #1, since it checks dot directly, rather than examining the USE flags of various supporting packages.
Comment 3 Matthias Schwarzott gentoo-dev 2007-06-12 12:36:51 UTC
Using the check of Kevin Pyle, but added it to pkg_setup, and die there with nice error message.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-10-11 21:01:42 UTC
*** Bug 195533 has been marked as a duplicate of this bug. ***
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-10-11 21:05:47 UTC
Reopen and re-assign to graphviz maintainers. The suggestion in Comment #1 still sounds better than the current state, but this graphviz configure stuff plain sucks.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-10-11 21:24:53 UTC
Same crap with jpeg, btw.
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2007-12-16 22:46:59 UTC
Fixed in 2.16.1
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2011-10-11 01:47:00 UTC
*** Bug 287377 has been marked as a duplicate of this bug. ***