Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 468052 - portage- Ordering of pkgs for 'emerge -e world' causing compilation failure due to circular dependencies
Summary: portage- Ordering of pkgs for 'emerge -e world' causing compilation...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
Depends on:
Blocks: 155723
  Show dependency tree
Reported: 2013-04-30 20:01 UTC by Roman Žilka
Modified: 2013-05-02 19:15 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Roman Žilka 2013-04-30 20:01:39 UTC
I run portage- on the x86/13.0/developer profile. After about two weeks today I synced the tree and run 'emerge -e world'. Among the packages that were to be upgraded was icu, from 49.1.2 to 51.1. The soname in these two versions differs. Libxml2 is also present and it depends on icu (dev-libs/icu:=). However, emerge placed the libxml2 re-merge before the icu upgrade. This caused a state with libxml2 already re-merged and built against icu-49, icu later upgraded and unusable because of its dependency on As the '-e world' progressed further, the turn came to libxslt whose compilation failed because it links against -lxml2 which has unresolved library deps at the moment.

Now I'm not well versed in EAPI 5, but from the devmanual specs of it I conclude that libxml2's dependency on "dev-libs/icu:=" is correct, but 'emerge -e' doesn't honor that dep. I find similarities with my issue in bug 440392, but this is an '-e world' situation which should complete smoothly.

Reproducible: Always
Comment 1 Roman Žilka 2013-04-30 20:13:07 UTC
Now with the '-e world' terminated, I ran 'emerge --resume --skipfirst' to skip the libxslt build that I know would fail. But emerge returns this:

# emerge --resume --skipfirst
Calculating dependencies... done!
 * One or more packages are either masked or have missing dependencies:
 *   dev-libs/icu:0/0= pulled in by:
 *     (dev-libs/libxml2-2.9.0-r2::gentoo, installed)
 * The resume list contains packages that are either masked or have
 * unsatisfied dependencies. Please restart/continue the operation
 * manually, or use --skipfirst to skip the first package in the list and
 * any other packages that may be masked or have missing dependencies.

Why does emerge take icu and libxml2 into consideration now? They had both been merged before the libxslt failure, so I believe emerge should now ignore whatever unresolved deps those two have.

It's also interesting that emerge notices the dep of libxml2 on icu now, but it didn't when the original '-e world' deps were being resolved. Maybe it's just a simple bug in the "--emptytree" feature.

Finally, it may or may not be wrong that emerge thinks libxml2 depends on icu:0/0=. There is no such icu version if I get things right.
Comment 2 Roman Žilka 2013-04-30 20:17:39 UTC
The original problem (placing libxml2 before icu) could, hypothetically, be caused by circular deps. If you could suggest an efficient way to discover them, I'd make a good use of it.
Comment 3 Roman Žilka 2013-04-30 20:27:42 UTC
Ah, this is important: before the original '-e world' I manually upgraded portage to the latest stable (
Comment 4 Zac Medico gentoo-dev 2013-04-30 20:35:54 UTC
(In reply to comment #2)
> The original problem (placing libxml2 before icu) could, hypothetically, be
> caused by circular deps.

Yes, it's probably circular deps.

> If you could suggest an efficient way to discover
> them, I'd make a good use of it.

A couple of things might help mitigate the issue:

1) Do a normal update first, before using -e (that way there are fewer circular deps to deal with during the update phase)

2) Enable FEATURES=preserve-libs in make.conf, so that things like libxml2 continue to be usable after the icu update.