Hope I am not being an idiot here... I have a new laptop that I am putting gentoo on (amd64 on Intel Core 2 Duo) using the same USE flags that I have on my (genuine AMD) amd64 desktop. The basic install goes well, until I emerge kde (though I can reproduce this with cups alone etc) where I get a whole host of circular dependencies. Removing the -doc flag seems to cure the problem: # emerge -pv cups These are the packages that would be merged, in order: Calculating dependencies... done! [nomerge ] x11-libs/qt-3.3.8-r2 USE="cups doc gif ipv6 opengl -debug -examples (-firebird) -immqt -immqt-bc -mysql -nas -nis -odbc -postgres -sqlite -xinerama" [nomerge ] net-print/cups-1.2.10 USE="X dbus jpeg ldap nls pam png ppds ssl tiff -php -samba -slp" [nomerge ] sys-apps/dbus-1.0.2-r2 USE="X doc -debug (-selinux)" [nomerge ] app-doc/doxygen-1.5.2 USE="doc qt3 -tetex" [ebuild N ] media-gfx/graphviz-2.12 USE="X doc gtk nls perl python -examples -gnome -pango -ruby -tcl -tk" [ebuild N ] dev-lang/swig-1.3.31 USE="doc java perl python -guile -lua -mono -ocaml -php -pike -ruby -tcl -tk" [ebuild N ] virtual/jdk-1.6.0 [ebuild N ] dev-java/sun-jdk-1.6.0-r2 USE="X alsa doc -examples -jce (-nsplugin)" [ebuild N ] media-libs/alsa-lib-1.0.14_rc3 USE="doc -debug" [ebuild N ] sys-apps/dbus-1.0.2-r2 USE="X doc -debug (-selinux)" [ebuild N ] app-doc/doxygen-1.5.2 USE="doc qt3 -tetex" [ebuild N ] x11-libs/qt-3.3.8-r2 USE="cups doc gif ipv6 opengl -debug -examples (-firebird) -immqt -immqt-bc -mysql -nas -nis -odbc -postgres -sqlite -xinerama" [ebuild N ] virtual/ghostscript-0 [ebuild N ] app-text/ghostscript-gpl-8.54 USE="X cups gtk -cjk -djvu -emacs -jpeg2k" [ebuild N ] net-print/cups-1.2.10 USE="X dbus jpeg ldap nls pam png ppds ssl tiff -php -samba -slp" !!! Error: circular dependencies: ('ebuild', '/', 'media-gfx/graphviz-2.12', 'merge') depends on ('ebuild', '/', 'dev-lang/swig-1.3.31', 'merge') (hard) ('ebuild', '/', 'virtual/jdk-1.6.0', 'merge') depends on ('ebuild', '/', 'dev-java/sun-jdk-1.6.0-r2', 'merge') (medium) ('ebuild', '/', 'x11-libs/qt-3.3.8-r2', 'merge') depends on ('ebuild', '/', 'net-print/cups-1.2.10', 'merge') (hard) ('ebuild', '/', 'virtual/ghostscript-0', 'merge') depends on ('ebuild', '/', 'app-text/ghostscript-gpl-8.54', 'merge') (medium) ('ebuild', '/', 'net-print/cups-1.2.10', 'merge') (soft) ('ebuild', '/', 'app-text/ghostscript-gpl-8.54', 'merge') depends on ('ebuild', '/', 'net-print/cups-1.2.10', 'merge') (hard) ('ebuild', '/', 'dev-java/sun-jdk-1.6.0-r2', 'merge') depends on ('ebuild', '/', 'media-libs/alsa-lib-1.0.14_rc3', 'merge') (medium) ('ebuild', '/', 'dev-lang/swig-1.3.31', 'merge') depends on ('ebuild', '/', 'dev-java/sun-jdk-1.6.0-r2', 'merge') (hard) ('ebuild', '/', 'virtual/jdk-1.6.0', 'merge') (hard) ('ebuild', '/', 'sys-apps/dbus-1.0.2-r2', 'merge') depends on ('ebuild', '/', 'app-doc/doxygen-1.5.2', 'merge') (hard) ('ebuild', '/', 'app-doc/doxygen-1.5.2', 'merge') depends on ('ebuild', '/', 'app-text/ghostscript-gpl-8.54', 'merge') (hard) ('ebuild', '/', 'x11-libs/qt-3.3.8-r2', 'merge') (hard) ('ebuild', '/', 'virtual/ghostscript-0', 'merge') (hard) ('ebuild', '/', 'media-gfx/graphviz-2.12', 'merge') (hard) ('ebuild', '/', 'net-print/cups-1.2.10', 'merge') depends on ('ebuild', '/', 'sys-apps/dbus-1.0.2-r2', 'merge') (hard) ('ebuild', '/', 'media-libs/alsa-lib-1.0.14_rc3', 'merge') depends on ('ebuild', '/', 'app-doc/doxygen-1.5.2', 'merge') (hard) !!! Note that circular dependencies can often be avoided by temporarily !!! disabling USE flags that trigger optional dependencies. Running # USE="-doc" emerge -pv cups does not show the error. Confusingly, the AMD box I copied the USE flags from does not have the problem, so I am not sure how to suggest reproducing this. Anyway if anybody is seeing this, just drop the -doc flag. Reproducible: Always
(after removing doc flag) # emerge --info Portage 2.1.2.4 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.20-gentoo-r6 x86_64) ================================================================= System uname: 2.6.20-gentoo-r6 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz Gentoo Base System release 1.12.10 Timestamp of tree: Tue, 24 Apr 2007 08:00:01 +0000 dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=nocona" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe -march=nocona" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ " LINGUAS="en fr el" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa amd64 arts berkdb bitmap-fonts bluetooth browserplugin cairo cddb cdparanoia cdr cli cracklib crypt cups dbus dri dvd dvdr eds emboss encode esd exif fam firefox flac fontconfig fortran gd gdbm gif gpm gstreamer gtk gtk2 hal http iconv ieee1394 ipv6 isdnlog jabber java jikes jpeg kde ldap libg++ mad midi mikmod mozbranding mp3 mpeg mule ncurses nls nptl nptlonly nsplugin obex ogg opengl oss pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts udb unicode usb verbose vorbis xine xml xml2 xorg xpm xv yaz zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr el" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i810 mga neomagic nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Not sure who to assign this one so adding the maintainers of the listed pkgs in this to the CC: printing@gentoo.org,nerdboy@gentoo.org,gentopia@gentoo.org
What exactly do you want me to do? Those are the depends to build the D-Bus docs. Take any of those depends out and D-Bus will not compile successfully when you try to build the docs.
@Cardoe: you could split dbus into two packages: dbus and dbus-docs. Where dbus ebuild contains: RDEPEND="doc? ( dbus-docs )"
(The current summary seems to be saying that there are circular deps with doc *disabled* which is obviously wrong.) :p (In reply to comment #4) > you could split dbus into two packages: dbus and dbus-docs. Where dbus ebuild > contains: > RDEPEND="doc? ( dbus-docs )" How is that going to help? You still need to disable doc to break the cycle. RDEPEND is a hard dependency with the current resolver. The only thing that would help is if some of those deps could be moved to PDEPEND which would let portage build the package when it's PDEPENDs aren't satisfied yet. But if they are build time deps it would still fail.. Just not up front.. I suppose PDEPEND="doc? ( dbus-docs )" might work..
bug wranglers don't want this... And no, RDEPEND won't work. :) Pretty much CANTFIX unless you can move this to PDEPEND until portage handles it properly.
Ahem. I now have doubt in my mind - I may have not emerged world after the stage 3 install but prior to start adding packages. Assuming nobody can reproduce this (can they?) I suggest we close this, and if somebody else gets it they can reopen it. I can't reproduce this on an up-to-date system.
*** Bug 178237 has been marked as a duplicate of this bug. ***
Also on x86. It may be "minor" in severity, but it will blow up any install of Gnome, samba, or cups. These are not obscure special-interest packages, and selecting extra documentation is a reasonable thing to do for a developer (or an eager newbie). I've been running Linux since 1994 and I was ready to abandon Gentoo altogether in frustration. As to up-to-date system, I ran into this today on a 2007.0 fresh install (which blew up from the CD) and a fresh emerge --sync. If the problem really doesn't occur with a fresh system, perhaps it's time to release a 2007.1 CD. Fix it.
This is not the only such circular dep caused by USE=doc. Many (most?) packages have it. Honestly, I've looked at it, and there's no way to solve it that I can see, short of not allowing docs to be installed at all. What would you propose to fix it? We cannot maintain a separate docs package for every package in the tree; that's *way* too much work. All we can do at this point is document it and have people do a two-pass install.
*** Bug 183240 has been marked as a duplicate of this bug. ***
(In reply to comment #9) > Fix it. Eh; the only real solution to this is to fix portage so that it can disable use flags temporarily to work around circular dependencies and later on rebuild the affected packages with original requested use flags. As such, there's no point in assigning similar type bugs wrt USE=doc to maintainers or even filing more bugs about this. This is not an ebuild bug at all, the ebuilds merely state the required dependencies, they won't build otherwise. The only advise to users is to disable USE=doc on initial install, otherwise they are bound to hit this issue. Either re-assign this to portage folks (all portage bugs about circular dependencies handling have been closed AFAICS), or close this as CANTFIX.
(In reply to comment #12) > The only advise to users is to disable USE=doc on initial install, otherwise > they are bound to hit this issue. Precisely. At the very least, do NOT allow "docs" to be selected in the install wizard GUI. Note that there is no warning about this, specifically, IIRC. A near-term workaround might be to determine where the core source of most of the circularity arises (ghostscript? doxygen? qt? all of the above?) and create a special-purpose ebuild-meta which downloads and builds these packages with flags set to avoid the problem. Note that some packages are more likely than others to be requested with extensive extra docs -- qt and cups, in particular, are sufficiently large, complex, and central to development/administration that extra-doc builds are probable.
(In reply to comment #13) > A near-term workaround might be to determine where the core source of most of > the circularity arises (ghostscript? doxygen? qt? all of the above?) and create > a special-purpose ebuild-meta which downloads and builds these packages with > flags set to avoid the problem. Nope; please re-read Comment #10; we don't have time to maintain such hacks in the tree. Fixing the package manager is the only solution to this.
Sending to docs team so that this can be documented in handbook/somewhere else if they wish.
Nah. We don't recommend installing stuff with +doc anyway.
*** Bug 152576 has been marked as a duplicate of this bug. ***
*** Bug 152405 has been marked as a duplicate of this bug. ***
*** Bug 32394 has been marked as a duplicate of this bug. ***
*** Bug 190351 has been marked as a duplicate of this bug. ***
*** Bug 190671 has been marked as a duplicate of this bug. ***
*** Bug 192714 has been marked as a duplicate of this bug. ***
*** Bug 193861 has been marked as a duplicate of this bug. ***
OK, from the number of duplicates it's obvious that this is a widespread problem. From #10, #12, #14, and #16 it appears that nobody at Gentoo is particularly eager to do anything about it, but everybody would much rather sweep it under the rug by simply closing it with some "go away, don't bother me kid" status. Fine. Got it.
(In reply to comment #24) > OK, from the number of duplicates it's obvious that this is a widespread > problem. From #10, #12, #14, and #16 it appears that nobody at Gentoo is > particularly eager to do anything about it The bug is assigned to dev-portage now and we're working on fixing it. Please be patient.
(In reply to comment #24) > OK, from the number of duplicates it's obvious that this is a widespread > problem. From #10, #12, #14, and #16 it appears that nobody at Gentoo is > particularly eager to do anything about it, but everybody would much rather > sweep it under the rug by simply closing it with some "go away, don't bother me > kid" status. > > Fine. Got it. > Portage is open source. Feel free do download the code yourself and write the necessary code to fix this. That's how open source works. Additionally, no Gentoo developer is paid to maintain any of this software and you didn't pay a dime for this software, so expecting someone to go out of their way to put in features or fix an issue you are having is preposterous. You either must have patience or contribute to open source. There is only one guaranteed way to have open source do what you want it to do, and that's write it yourself.
(In reply to comment #26) > Portage is open source. Feel free do download the code yourself and write the > necessary code to fix this. That's how open source works. The few times I did that, and attach the patch to the bug, it has never been merged to portage, nor added to foobar/files directory. I am no longer motivated to ever write code again.
(In reply to comment #27) > (In reply to comment #26) > > Portage is open source. Feel free do download the code yourself and write the > > necessary code to fix this. That's how open source works. > > The few times I did that, and attach the patch to the bug, it has never been > merged to portage, nor added to foobar/files directory. I am no longer > motivated to ever write code again. > Well then don't expect others to write the code for you out of the goodness of their hearts.
I don't.
*** Bug 174078 has been marked as a duplicate of this bug. ***
*** Bug 216601 has been marked as a duplicate of this bug. ***
Hey guys, I'm having the same thing go on with anything I try to emerge. I'm installing a new system and I can't install GTK QT GNOME KDE, or anything important to what I do with this system. I'm no developer, but is there anything I can do that doesn't involve unsetting each of my 100 use flags?
I also just thought of something -- what allowed portage to work before whatever update was done? Maybe removing this 'feature' will allow everyone to emerge their packages again?
(In reply to comment #33) > I also just thought of something -- what allowed portage to work before > whatever update was done? Maybe removing this 'feature' will allow everyone to > emerge their packages again? Older versions of portage dropped dependencies and that often led to seemingly random build failures. We don't want users to be filing lots of bugs for things that break because of it. For now, the recommended workaround is to temporarily disable flags in make.conf or package.use in order to break dependency cycles. For example, temporarily adding USE="-cups -doc -samba" to make.conf should break some of the most common known dependency cycles. After you've broken the dependency cycles and installed your system, you can revert the USE settings in make.conf and then run `emerge --newuse --deep world` to rebuild everything with your desired flags.
I got this on 2008.0 too. USE="-cups -doc -samba" emerge gnome would get rid of the errors and start building.
I also got this on 2008.0. Removing "doc" and "emacs" from my large USE="..." list got rid of the circular dependency errors. Maybe someone clever could write a script to figure out which USE flags cause the circular dependency and suggest how to run it when portage detects a circular dependency.
(In reply to comment #36) > I also got this on 2008.0. > > Removing "doc" and "emacs" from my large USE="..." list > got rid of the circular dependency errors. > > Maybe someone clever could write a script to figure out which USE flags > cause the circular dependency and suggest how to run it when portage > detects a circular dependency. > I have also got this on 2008.0 trying to emerge any gui system for my computer.
(In reply to comment #37) > I have also got this on 2008.0 trying to emerge any gui system for my computer. In general, please refrain from "me too" comments on bugs. This is a well known problem. Until it's properly fixed, the recommended workaround is to temporarily disable some USE flags in /etc/make.conf and/or /etc/portage/package.use. For example, you should disable the "doc" flag for circular dependencies involving packages that are used to build documentation. Similarly, you should disable the "samba" and "cups" USE flags for circular dependencies involving the net-fs/samba and net-print/cups, respectively. If you're still have trouble resolving circular dependencies, you might also try reading the forum thread that's linked from this bug: http://forums.gentoo.org/viewtopic-t-539520-postdays-0-postorder-asc-start-0.html
*** Bug 239973 has been marked as a duplicate of this bug. ***
I believe I have a workable solution to this problem, but I need to do a test case and provide resource requirements. I am now working on this bug and will provide updates.
I think the easiest way to solve this is as follows: 1) Store USE conditional information inside the digraph, as an attribute of the priority object that is stored for each edge. 2) When a cycle is encountered, remove conditional edges as necessary to break the cycle. Take care not to break USE dependencies when doing this. 3) Create a new dependency graph, to plan rebuild of packages which had their USE changed in step (2). There may still be cycles, so this step may have to be repeated any number of times. We can make it bail out if the number of graphs exceeds 10 or so, since that probably means something is wrong. 4) Schedule the series of dependency graphs created above, one after another.
*** Bug 277981 has been marked as a duplicate of this bug. ***
docs flag set somewhere leads to circular dependencies and breaks portage david # emerge -NuvDp world These are the packages that would be merged, in order: Calculating dependencies... done! [nomerge ] gnome-base/gnome-2.24.1 [nomerge ] gnome-base/gnome-applets-2.24.3.1 [nomerge ] gnome-extra/gucharmap-2.24.3 [nomerge ] dev-python/pygtk-2.14.1-r1 [nomerge ] dev-python/pycairo-1.8.8 [1.8.2] USE="doc%* -svg%" [nomerge ] dev-python/sphinx-0.6.1-r1 USE="doc -test" [ebuild N ] dev-python/jinja2-2.1.1 USE="doc -examples -i18n -test" [ebuild N ] dev-python/sphinx-0.6.1-r1 USE="doc -test" * Error: circular dependencies: ('ebuild', '/', 'dev-python/sphinx-0.6.1-r1', 'merge') depends on ('ebuild', '/', 'dev-python/jinja2-2.1.1', 'merge') (buildtime) ('ebuild', '/', 'dev-python/jinja2-2.1.1', 'merge') depends on ('ebuild', '/', 'dev-python/sphinx-0.6.1-r1', 'merge') (buildtime) * Note that circular dependencies can often be avoided by temporarily * disabling USE flags that trigger optional dependencies. Defeated by- david # USE="-doc examples truetype" emerge -uvDp dev-python/sphinx These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] dev-python/jinja2-2.1.1 USE="examples -doc -i18n -test" 505 kB [ebuild N ] dev-python/pygments-1.0 USE="-doc -test" 909 kB [ebuild N ] dev-python/sphinx-0.6.1-r1 USE="-doc -test" 0 kB [ebuild U ] dev-lang/tcl-8.5.7 [8.4.18] USE="threads -debug" 4,319 kB [ebuild U ] dev-lang/tk-8.5.7 [8.4.18-r1] USE="threads truetype%* -debug" 3,692 kB Total: 5 packages (2 upgrades, 3 new), Size of downloads: 9,423 kB
*** Bug 268805 has been marked as a duplicate of this bug. ***
I also have a new laptop that I am putting Gentoo on (amd64 on Intel Core 2 Duo) using the same USE flags that I have on my old (Pentium M) x86 laptop. I tried to emerge something with plenty of dependencies (okular). Only the error messages describing the circular dependencies required me to press PageUP 32 times (yes, I had to build a kernel with a huge scrollback buffer in system RAM to handle this). USE=-doc in front of the emerge command reduced this to maybe a handful of screen pages. I experimented a little and found that adding USE="-cups -doc" instead got it down to only a few lines. Finally I found that USE="-cups -doc -sdl" eliminated all such errors. So it seemed possible to bootstrap the system. Then I tried to find a minimal set of USE-flag disablings that allowed the system to be bootstrapped. This is what I needed in package.use in the end: dev-libs/glib -doc x11-libs/libxcb -doc media-libs/alsa-lib -doc gnome-extra/libgsf -doc sys-apps/dbus -doc gnome-base/librsvg -doc x11-libs/cairo -doc x11-libs/gtk+ -doc x11-libs/pango -doc dev-libs/atk -doc media-libs/fontconfig -doc gnome-base/libglade -doc dev-python/jinja2 -doc dev-libs/libcroco -doc net-libs/gnutls -doc dev-libs/DirectFB -sdl dev-scheme/guile -emacs Comment #10 >We cannot maintain a separate docs package for every package in the tree; that's *way* too much work. All we can do at this point is document it and have people do a two-pass install. As I discovered, it is only necessary to set USE=-doc for a few packages. So if the circular dependency on doc could be solved by maintaining separate doc packages just for them, it would be very valuable. It is very unfortunate if installing Gentoo would continue to be as challenging for others as it was for me now.
for gnome related packages, USE="doc" will change behavior in the future, see bug #262491. It should fix circular dependency issues too.
*** Bug 303138 has been marked as a duplicate of this bug. ***
*** Bug 303959 has been marked as a duplicate of this bug. ***
*** Bug 304377 has been marked as a duplicate of this bug. ***
*** Bug 307295 has been marked as a duplicate of this bug. ***
I can confirm, tah USE="-cups -doc" repairs circular dependencies when emerging.
*** Bug 307409 has been marked as a duplicate of this bug. ***
*** Bug 309969 has been marked as a duplicate of this bug. ***
In git we have support for finding the smallest cycle: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b4870759f4b6ae0337c31b4bb4797b261ef5cbfe and suggestions for USE adjustments: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=180de572bcf6b247b0f85989e02b265aee33ead2
*** Bug 336884 has been marked as a duplicate of this bug. ***
*** Bug 361189 has been marked as a duplicate of this bug. ***
Zac, is this still relevant?
Yeah, it's still relevant. It's kind of low-priority though, especially since we now have the suggestions mentioned in comment #54.
*** Bug 424801 has been marked as a duplicate of this bug. ***
I propose to change the "Product" of this bug to "Portage Development"
Is there any systemic blocker (i.e. specced semantic behavior) preventing this from being implemented at this point?
I think it's just a matter having someone put in the time to implement it and polish it up. Lately I've been kind of busy with polishing up the EAPI 5 stuff (working on a fix for bug 456340 now).
Automatic USE configuration changes to solve circular deps are similar to USE changes within the context of bug 258371.
*** Bug 749342 has been marked as a duplicate of this bug. ***