emerge kdelibs-3.4.2 fails with access violations. .... Making apidox in kmdi make[2]: Entering directory `/var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi' make[3]: Entering directory `/var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi' ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. /var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi/dockcontainer.h:51 Warning: Found unknown command `\TODO' /var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi/dockcontainer.h:63 Warning: Found unknown command `\TODO' ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. /var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi/mainwindow.h Reproducible: Always Steps to Reproduce: 1.emerge -Du =kdelibs-3.4.2 2. 3. Actual Results: .... Making apidox in kmdi make[2]: Entering directory `/var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi' make[3]: Entering directory `/var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi' ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. /var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi/dockcontainer.h:51 Warning: Found unknown command `\TODO' /var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi/dockcontainer.h:63 Warning: Found unknown command `\TODO' ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. ACCESS DENIED open_wr: /usr/lib/graphviz/config Error: failed to open /usr/lib/graphviz/config for write. /var/tmp/portage/kdelibs-3.4.2/work/kdelibs-3.4.2/kmdi/kmdi/mainwindo
After emerging graphviz you need to run 'dot -V' once. This will create /usr/lib/graphviz/config file. This step must be included in graphviz ebuild, otherwise all ebuilds which generate documentation using doxygen and dot will fail.
You need to run `dot -V` as root, otherwize you get Error: failed to open /usr/lib/graphviz/config for write. dot version 2.4 (Wed Aug 3 16:43:39 UTC 2005) Thought I'd mention it, since I just stumbled across...
Reassigning to graphviz maintainers.
Same problem here when trying to compile gwenhywfar (needed for GnuCash with HBCI support) after upgrading to graphviz-2.4. The given workaround (running 'dot -V' as root) works. I don't think it's the proper solution to just use it in the ebuild, though. /usr is not the right place for config files.
*** Bug 101834 has been marked as a duplicate of this bug. ***
*** Bug 101759 has been marked as a duplicate of this bug. ***
*** Bug 102008 has been marked as a duplicate of this bug. ***
same problem. xerces-c 2.6.0
*** Bug 103031 has been marked as a duplicate of this bug. ***
*** Bug 103223 has been marked as a duplicate of this bug. ***
Okies, I went for the simple solution. I generated a config file and made the graphviz-2.4-r1 ebuild install it in /etc/graphviz.conf. /usr/lib/graphviz/config is a symlink to that file. Can you comment if it fixes the problems you are having installing other packages? Further, can alpha, hppa, ia64, mips, ppc-macos and sparc folks keyword it if it works? I couldn't find anything in Bugzilla or the ChangeLog explaining why keywords were dropped.
graphviz-2.4-r1.ebuild does not fix the bug, I think because the installed /etc/graphviz.conf is not newer than /usr/bin/dot: # ls --full-time /etc/graphviz.conf /usr/bin/dot -rw-r--r-- 1 root root 236 2005-08-21 19:16:39.000000000 +0100 /etc/graphviz.conf -rwxr-xr-x 1 root root 9458 2005-08-21 19:16:39.000000000 +0100 /usr/bin/dot* # su operator -c 'dot -V' Error: failed to open /usr/lib/graphviz/config for write. dot version 2.4 (Sun Aug 21 18:08:02 UTC 2005) # touch /etc/graphviz.conf # su operator -c 'dot -V' dot version 2.4 (Sun Aug 21 18:08:02 UTC 2005) # touch /etc/graphviz.conf -r /usr/bin/dot # su operator -c 'dot -V' Error: failed to open /usr/lib/graphviz/config for write. dot version 2.4 (Sun Aug 21 18:08:02 UTC 2005) I guess it should work to touch /etc/graphviz.conf in postinst().
Ed, can you test your idea using touch inside the ebuild? --- graphviz-2.4-r1.ebuild 21 Aug 2005 16:31:24 -0000 1.1 +++ graphviz-2.4-r1.ebuild 21 Aug 2005 18:46:28 -0000 @@ -41,6 +41,7 @@ # bug 101337 insinto /etc newins ${FILESDIR}/${P}.conf ${PN}.conf + touch ${D}/etc/${PN}.conf dosym /etc/${PN}.conf /usr/lib/graphviz/config }
That won't work; when portage merges a package it sets the mtime of all regular files to the same time (see treewalk in portage.py). That's why the touch has to be in postinst. Also, I'm wrong about it being the mtime of /usr/bin/dot that /etc/graphviz.conf is compared against; it's actually the mtime of the directory /usr/lib/graphviz: [graphviz-2.4/lib/gvc/gvconfig.c 442 gvconfig()] if (rc == -1 || libdir_st.st_mtime > config_st.st_mtime) { config_rescan(gvc, config_path); ^ this is what tries to write to /usr/lib/graphviz/config Since /usr/lib/graphviz is modified after the merge proper starts, the only way to give /etc/graphviz.conf a not earlier mtime is to touch it in postinst. Note: # touch /etc/graphviz.conf -r /usr/lib/graphviz # su operator -c 'dot -V' dot version 2.4 (Sun Aug 21 18:08:02 UTC 2005)
Well, just tested putting it in pkg_postinst() and got the same result. --- graphviz-2.4-r1.ebuild 21 Aug 2005 16:31:24 -0000 1.1 +++ graphviz-2.4-r1.ebuild 21 Aug 2005 19:49:39 -0000 @@ -45,5 +45,6 @@ } pkg_postinst() { + touch ${D}/etc/${PN}.conf einfo "Edit /etc/${PN}.conf to your liking before running." } $ ls --full-time /etc/graphviz.conf /usr/bin/dot -rw-r--r-- 1 root root 236 2005-08-21 16:42:41.000000000 -0300 /etc/graphviz.conf -rwxr-xr-x 1 root root 49748 2005-08-21 16:42:41.000000000 -0300 /usr/bin/dot :-( Any ideas?
I meant: --- graphviz-2.4-r1.ebuild 21 Aug 2005 16:31:24 -0000 1.1 +++ graphviz-2.4-r1.ebuild 21 Aug 2005 19:49:39 -0000 @@ -45,5 +45,6 @@ } pkg_postinst() { + touch /etc/${PN}.conf einfo "Edit /etc/${PN}.conf to your liking before running." } i.e. touch the file on the live filesystem. However, I'm no longer sure that's correct; it seems that rather than a configuration file, /usr/lib/graphviz/config is a registry of graphviz render plugins - see http://www.graphviz.org/pub/graphviz/CURRENT/doxygen/html/gvconfig_8c-source.html line 52 ff. Thus for FHS compatibility (and RO root support) we should hack graphviz to site the /usr/lib/graphviz/config file in /var, probably /var/cache/graphviz/config. Then in postinst graphviz (and anything other ebuild that provides graphviz render plugins; I don't know of any in portage, but graphviz-cairo - see bug 99802 - will be one such) should force graphviz to update the plugin registry (by removing the file and running dot -V). This could be done in an eclass, as with gst-plugins_update_registry in gst-plugins.eclass.
Created attachment 66511 [details, diff] gvcachedir.patch Make graphviz site its renderer registry at /var/cache/graphviz/config. Something like: --- graphviz-2.4-r1.ebuild 2005/08/21 23:25:48 1.1 +++ graphviz-2.4-r1.ebuild 2005/08/21 23:45:31 @@ -2,6 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /home/ed/scratch/graphviz-2.4/graphviz-2.4-r1.ebuild,v 1.1 2005/08/21 23:25:48 ed Exp ed $ +inherit eutils + DESCRIPTION="Open Source Graph Visualization Software" HOMEPAGE="http://www.graphviz.org/" SRC_URI="http://www.graphviz.org/pub/graphviz/ARCHIVE/${P}.tar.gz" @@ -23,6 +25,11 @@ RDEPEND=">=sys-libs/zlib-1.1.3 DEPEND="${RDEPEND} dev-util/pkgconfig" +src_unpack() { + unpack ${A} + cd ${S}; epatch ${FILESDIR}/${PN}-2.4-cachedir.patch +} + src_compile() { econf --with-mylibgd \ $(use_with dynagraph dynagraph) \ @@ -38,12 +45,29 @@ src_install() { dodoc doc/*.pdf doc/Dot.ref dohtml -r . - # bug 101337 - insinto /etc - newins ${FILESDIR}/${P}.conf ${PN}.conf - dosym /etc/${PN}.conf /usr/lib/graphviz/config + keepdir /var/cache/graphviz } pkg_postinst() { - einfo "Edit /etc/${PN}.conf to your liking before running." + local GVCACHEDIR="/var/cache/graphviz" + ebegin "Regenerating $GVCACHEDIR/config" + if [[ ! -d /var/cache/graphviz ]]; then + eerror "directory $GVCACHEDIR missing!" + eend 1 + return 1 + fi + if [[ -e "$GVCACHEDIR/config" ]]; then + ebegin "Backing up old registry to $GVCACHEDIR/config.old" + mv "$GVCACHEDIR/config" "$GVCACHEDIR/config.old" + eend $? + fi + ebegin "Generating new registry" + dot -V >/dev/null + eend $? + if [[ ! -e "$GVCACHEDIR/config" && -e "$GVCACHEDIR/config.old" ]]; then + ebegin "Restoring old registry" + mv "$GVCACHEDIR/config.old" "$GVCACHEDIR/config" + eend $? + fi + [[ ! "$GVCACHEDIR/config" -ot /usr/lib/graphviz ]]; eend $? } modulo introducing a new graphviz-plugin eclass.
Sorry, some mistakes. This should be better: --- graphviz-2.4-r1.ebuild 2005/08/21 23:25:48 1.1 +++ graphviz-2.4-r1.ebuild 2005/08/22 00:53:37 @@ -2,6 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /home/ed/scratch/graphviz-2.4/graphviz-2.4-r1.ebuild,v 1.1 2005/08/21 23:25:48 ed Exp ed $ +inherit eutils + DESCRIPTION="Open Source Graph Visualization Software" HOMEPAGE="http://www.graphviz.org/" SRC_URI="http://www.graphviz.org/pub/graphviz/ARCHIVE/${P}.tar.gz" @@ -23,6 +25,11 @@ RDEPEND=">=sys-libs/zlib-1.1.3 DEPEND="${RDEPEND} dev-util/pkgconfig" +src_unpack() { + unpack ${A} + cd ${S}; epatch ${FILESDIR}/${PN}-2.4-cachedir.patch +} + src_compile() { econf --with-mylibgd \ $(use_with dynagraph dynagraph) \ @@ -38,12 +45,44 @@ src_install() { dodoc doc/*.pdf doc/Dot.ref dohtml -r . - # bug 101337 - insinto /etc - newins ${FILESDIR}/${P}.conf ${PN}.conf - dosym /etc/${PN}.conf /usr/lib/graphviz/config + keepdir /var/cache/graphviz +} + +graphviz-plugins_generate_plugins_cache() { + local GVLIBDIR="/usr/lib/graphviz" + local GVCACHEDIR="/var/cache/graphviz" + if [[ -d "$GVLIBDIR" ]]; then + ebegin "Regenerating $GVCACHEDIR/config" + if [[ ! -d "$GVCACHEDIR" ]]; then + eerror "directory $GVCACHEDIR missing!" + eend 1 + return 1 + fi + if [[ -e "$GVCACHEDIR/config" ]]; then + ebegin "Backing up old registry to $GVCACHEDIR/config.old" + mv "$GVCACHEDIR/config" "$GVCACHEDIR/config.old" + eend $? + fi + ebegin "Generating new registry" + dot -V >/dev/null + eend $? + if [[ ! -e "$GVCACHEDIR/config" && -e "$GVCACHEDIR/config.old" ]]; then + ebegin "Restoring old registry" + mv "$GVCACHEDIR/config.old" "$GVCACHEDIR/config" + eend $? + fi + [[ ! "$GVCACHEDIR/config" -ot "$GVLIBDIR" ]]; eend $? + else + ebegin "Removing $GVCACHEDIR" + rm "$GVCACHEDIR/"{config,config.old,.keep} && rmdir "$GVCACHEDIR" + eend $? + fi } pkg_postinst() { - einfo "Edit /etc/${PN}.conf to your liking before running." + graphviz-plugins_generate_plugins_cache +} + +pkg_postrm() { + graphviz-plugins_generate_plugins_cache }
FYI. I hope to have a graphviz-2.6 release this week. The config creation has been changed from a side effect of "dot -V" to the explicit effect of a new switch "dot -c". Normal invocations of dot no longer check timestamps of config or attempt to recreate it when possibly non-root. The current graphviz2.5 snapshots should be representative of graphviz-2.6 in this area.
*** Bug 103974 has been marked as a duplicate of this bug. ***
*** Bug 105087 has been marked as a duplicate of this bug. ***
*** Bug 105109 has been marked as a duplicate of this bug. ***
graphviz 2.6 is now in portage, and it fixes this error with doxygen. It should also fix it for you all; please test and re-open if you still have problems.
*** Bug 106201 has been marked as a duplicate of this bug. ***
*** Bug 106249 has been marked as a duplicate of this bug. ***