Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 596664 - dev-util/intltool broken by missing XML::Parser after upgrade, breaks all dependents in configure
Summary: dev-util/intltool broken by missing XML::Parser after upgrade, breaks all dep...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
: 504480 563810 570460 584848 596640 611224 612512 616822 620870 628982 628988 629216 629218 629220 637396 655998 660352 667886 704078 704080 708610 754432 787383 796716 800188 828114 832333 835794 838112 854693 870052 939112 (view as bug list)
Depends on: 907949
Blocks: build-order
  Show dependency tree
 
Reported: 2016-10-09 09:50 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2024-09-05 12:21 UTC (History)
30 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-10-09 09:50:17 UTC
This is a re-hashing of the seperate bug, #41124, to track all the bugs that form indirectly from this problem.

The general problem is: 

   X -> intltool -> dev-perl/XML-Parser -> perl

As per the lengthy description in the similar bug, #592880

1. Perl upgrades
2. XML-Parser enters a "broken state" which is equivalent to "missing" from perl's perspective
3. Portage does not recognize that XML-Parser is now "missing"
4. Portage assumes intltool still works
5. Portage tries to compile something using intltool, and dies because XML-Parser is missing.

The death path is usually either in per-dependent configure stage via intltools '.m4' 

/usr/share/aclocal/intltool.m4:   AC_MSG_CHECKING([for XML::Parser])
/usr/share/aclocal/intltool.m4:   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
/usr/share/aclocal/intltool.m4:       AC_MSG_ERROR([XML::Parser perl module is required for intltool])

Or via invoking intltool and having it fail:

/usr/bin/intltool-merge:    my $ret = eval 'require XML::Parser';
/usr/bin/intltool-merge:        die "You must have XML::Parser installed to run $0\n\n";
/usr/bin/intltool-extract:    my $ret = eval 'require XML::Parser';
/usr/bin/intltool-extract:        die "You must have XML::Parser installed to run $0\n\n";

intltool's dependencies are already correct:
- Perl is in both DEPEND and RDEPEND
- XML-Parser is in both DEPEND and RDEPEND
- intltool does not itself link against perl.so or contain any libraries with perl-ABI-version specific paths, so subslot deps are not warranted.

The only solution left that we know of is for portage to work out how to pull this dependency when it should, and encourage all users experiencing this issue to sprinkle --with-bdeps=y into their stuff judiciously.
Comment 1 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-10-09 09:51:09 UTC
*** Bug 596640 has been marked as a duplicate of this bug. ***
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-10-09 09:54:00 UTC
*** Bug 584848 has been marked as a duplicate of this bug. ***
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-10-09 09:57:04 UTC
*** Bug 570460 has been marked as a duplicate of this bug. ***
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-10-09 09:58:55 UTC
*** Bug 563810 has been marked as a duplicate of this bug. ***
Comment 5 Pacho Ramos gentoo-dev 2016-10-09 10:23:44 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #0)
[...]
> 1. Perl upgrades
> 2. XML-Parser enters a "broken state" which is equivalent to "missing" from
> perl's perspective
> 3. Portage does not recognize that XML-Parser is now "missing"
> 4. Portage assumes intltool still works
> 5. Portage tries to compile something using intltool, and dies because
> XML-Parser is missing.

Shouldn't portage try to rebuild as soon as possible xml-parser (listed as RDEPEND in intltool) to try to solve the breakage as soon as possible? :/
Comment 6 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-10-09 12:02:28 UTC
It (In reply to Pacho Ramos from comment #5)
> (In reply to Kent Fredric (IRC: kent\n) from comment #0)
> [...]
> > 1. Perl upgrades
> > 2. XML-Parser enters a "broken state" which is equivalent to "missing" from
> > perl's perspective
> > 3. Portage does not recognize that XML-Parser is now "missing"
> > 4. Portage assumes intltool still works
> > 5. Portage tries to compile something using intltool, and dies because
> > XML-Parser is missing.
> 
> Shouldn't portage try to rebuild as soon as possible xml-parser (listed as
> RDEPEND in intltool) to try to solve the breakage as soon as possible? :/

It *should*, but it doesn't. 

Bug #463976 and bug #199856  are portage bugs for things we *believe* resolution of will mitigate this problem, but we won't know for sure until that happens.

When you read those bugs, the broad nature of this problem is uh, rather scary.

Its really surprising we didn't note this sooner.
Comment 7 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2016-10-09 12:11:07 UTC
Though I'm having a hard time identifying the cycle (if any) that is causing this issue. 

The only possible cycle I see so far is:

intltool -> XML-Parser -> perl -> sys-libs/db -> virtual/jdk -> icedtea-bin -> dev-java/icedtea-sound -> media-sound/pulseaudio -> intltool 

And I *really* doubt that's what's tripping portage.
Comment 8 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-02-28 18:53:02 UTC
*** Bug 611224 has been marked as a duplicate of this bug. ***
Comment 9 Cedric Sodhi 2017-03-13 16:40:15 UTC
*** Bug 612512 has been marked as a duplicate of this bug. ***
Comment 10 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-04-28 10:24:17 UTC
*** Bug 616822 has been marked as a duplicate of this bug. ***
Comment 11 Mart Raudsepp gentoo-dev 2017-06-10 16:18:02 UTC
*** Bug 620870 has been marked as a duplicate of this bug. ***
Comment 12 Mike Gilbert gentoo-dev 2017-08-26 18:51:47 UTC
*** Bug 628982 has been marked as a duplicate of this bug. ***
Comment 13 Mike Gilbert gentoo-dev 2017-08-28 17:37:19 UTC
*** Bug 629220 has been marked as a duplicate of this bug. ***
Comment 14 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-08-28 20:53:08 UTC
*** Bug 629218 has been marked as a duplicate of this bug. ***
Comment 15 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-08-29 08:30:33 UTC
*** Bug 629216 has been marked as a duplicate of this bug. ***
Comment 16 James Le Cuirot gentoo-dev 2017-08-29 10:21:18 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #7)
> Though I'm having a hard time identifying the cycle (if any) that is causing
> this issue. 
> 
> The only possible cycle I see so far is:
> 
> intltool -> XML-Parser -> perl -> sys-libs/db -> virtual/jdk -> icedtea-bin
> -> dev-java/icedtea-sound -> media-sound/pulseaudio -> intltool 
> 
> And I *really* doubt that's what's tripping portage.

That sounds a likely candidate as I only recall hitting this problem on systems with icedtea-bin installed. It may be unrelated but I have seen other weirdness around Portage's handling of virtual/jdk before.
Comment 17 Pacho Ramos gentoo-dev 2017-08-30 17:45:11 UTC
*** Bug 628988 has been marked as a duplicate of this bug. ***
Comment 18 Mart Raudsepp gentoo-dev 2017-11-14 07:54:43 UTC
*** Bug 637396 has been marked as a duplicate of this bug. ***
Comment 19 Toralf Förster gentoo-dev 2018-01-20 22:22:53 UTC
FWIW I did no longer hit this at my tinderbox so I removed a special quirk for this bug for now from teh script.
Comment 20 Mart Raudsepp gentoo-dev 2018-05-18 13:49:42 UTC
*** Bug 655998 has been marked as a duplicate of this bug. ***
Comment 21 Mart Raudsepp gentoo-dev 2018-07-05 05:35:00 UTC
*** Bug 660352 has been marked as a duplicate of this bug. ***
Comment 22 Mart Raudsepp gentoo-dev 2018-10-06 14:21:27 UTC
*** Bug 667886 has been marked as a duplicate of this bug. ***
Comment 23 Toralf Förster gentoo-dev 2019-09-20 14:42:09 UTC
(In reply to Toralf Förster from comment #19)
> FWIW I did no longer hit this at my tinderbox so I removed a special quirk
> for this bug for now from teh script.

happened again today at 17.1_systemd-libressl-20190919-191611- re-adding the quirk:

checking for perl >= 5.8.1... 5.30.0
checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/x11-misc/shared-mime-info-1.10-r1/work/shared-mime-info-1.10/config.log

for x11-misc/shared-mime-info-1.10-r1
Comment 24 Mart Raudsepp gentoo-dev 2019-12-28 12:34:27 UTC
*** Bug 704078 has been marked as a duplicate of this bug. ***
Comment 25 Jeroen Roovers (RETIRED) gentoo-dev 2020-02-07 13:12:26 UTC
*** Bug 708610 has been marked as a duplicate of this bug. ***
Comment 26 Mart Raudsepp gentoo-dev 2020-02-16 11:06:55 UTC
*** Bug 704080 has been marked as a duplicate of this bug. ***
Comment 27 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2020-11-14 21:28:54 UTC
*** Bug 754432 has been marked as a duplicate of this bug. ***
Comment 28 Ionen Wolkens gentoo-dev 2021-06-19 18:51:45 UTC
*** Bug 796716 has been marked as a duplicate of this bug. ***
Comment 29 Mart Raudsepp gentoo-dev 2021-07-06 04:35:06 UTC
*** Bug 800188 has been marked as a duplicate of this bug. ***
Comment 30 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-04 04:45:09 UTC
*** Bug 828114 has been marked as a duplicate of this bug. ***
Comment 31 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-29 16:07:07 UTC
*** Bug 832333 has been marked as a duplicate of this bug. ***
Comment 32 Matt Turner gentoo-dev 2022-04-20 02:22:11 UTC
*** Bug 838112 has been marked as a duplicate of this bug. ***
Comment 33 Toralf Förster gentoo-dev 2022-06-28 08:47:46 UTC
seems still be the case:

checking for perl >= 5.8.1... 5.36.0
checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool
Comment 34 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-28 12:31:31 UTC
*** Bug 835794 has been marked as a duplicate of this bug. ***
Comment 35 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-28 12:32:17 UTC
*** Bug 854693 has been marked as a duplicate of this bug. ***
Comment 36 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-28 12:32:36 UTC
*** Bug 787383 has been marked as a duplicate of this bug. ***
Comment 37 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-28 12:32:56 UTC
*** Bug 504480 has been marked as a duplicate of this bug. ***
Comment 38 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-14 09:48:31 UTC
*** Bug 870052 has been marked as a duplicate of this bug. ***
Comment 39 hypersyd 2022-09-14 10:12:19 UTC
Is it possible to add dev-perl/XML-Parser as a dependency ? In the ebuilds where it requires it like in libxfce4uitl where the installation completely breaks, obviously we can emerge dev-perl/XML-Parser and then emerge anything that needs it.
Comment 40 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-19 19:01:54 UTC
(In reply to Sid from comment #39)
> Is it possible to add dev-perl/XML-Parser as a dependency ? In the ebuilds
> where it requires it like in libxfce4uitl where the installation completely
> breaks, obviously we can emerge dev-perl/XML-Parser and then emerge anything
> that needs it.

All the relevant packages do depend on it, though. Adding a redundant dependency is unlikely to help.
Comment 41 Larry the Git Cow gentoo-dev 2023-06-16 03:34:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=224207c7d1988a354d004507bb7ecfb90b4ef097

commit 224207c7d1988a354d004507bb7ecfb90b4ef097
Author:     YiFei Zhu <zhuyifei1999@gmail.com>
AuthorDate: 2023-06-13 00:47:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-16 03:34:46 +0000

    depgraph: Do not allow slotted deps to be satisfied by wrong slots
    
    This may be part of what caused the "perl rebuild bug". The
    "priority" of perl, when seen by perl modules, may have "satisfied"
    set to an installed perl of a wrong slot. Compounding this factor
    with bug #756199 where find_smallest_cycle would select a single
    node, in this case because the dependency of perl is satisfied and
    the priority then gets ignored, the "cycle" becomes a perl module
    alone and gets rebuilt early.
    
    I also updated the test from the previous patch to account for
    this change. No other tests seems affected.
    
    For a larger scale test, I reproduced this initially with a stage3
    chroot from a Jan 1 2022 stage3 snapshot, and testing in an
    equivalent dockerfile would work too:
    
      FROM gentoo/stage3:amd64-openrc-20220101
      RUN emerge-webrsync
      COPY . /portage
    
    Before this patch (USE flags omitted):
    
      # cd /portage && bin/emerge -puDN @world 2>&1 | grep -i perl
      [ebuild     U  ] app-admin/perl-cleaner-2.30-r1 [2.30]
      [ebuild  rR    ] virtual/perl-File-Temp-0.231.100
      [ebuild  rR    ] dev-perl/Locale-gettext-1.70.0-r1
      [ebuild  rR    ] dev-perl/MIME-Charset-1.12.2-r1
      [ebuild  rR    ] dev-perl/Module-Build-0.423.100
      [ebuild  rR    ] dev-perl/Text-CharWidth-0.40.0-r2
      [ebuild     U  ] dev-lang/perl-5.36.0-r2 [5.34.0-r3]
      [ebuild  N     ] virtual/perl-CPAN-2.330.0
      [ebuild     U  ] virtual/perl-ExtUtils-MakeMaker-7.640.0 [7.620.0]
      [ebuild     U  ] virtual/perl-File-Spec-3.840.0 [3.800.0]
      [...]
    
    After this patch:
    
      # cd /portage && bin/emerge -puDN @world 2>&1 | grep -i perl
      [ebuild     U  ] app-admin/perl-cleaner-2.30-r1 [2.30]
      [ebuild     U  ] dev-lang/perl-5.36.0-r2:0/5.36 [5.34.0-r3:0/5.34]
      [ebuild  N     ] virtual/perl-CPAN-2.330.0
      [ebuild     U  ] virtual/perl-ExtUtils-MakeMaker-7.640.0 [7.620.0]
      [ebuild     U  ] virtual/perl-Data-Dumper-2.184.0 [2.179.0]
      [ebuild     U  ] virtual/perl-File-Spec-3.840.0 [3.800.0]
      [ebuild     U  ] virtual/perl-Test-Harness-3.440.0-r1 [3.430.0]
      [ebuild  rR    ] dev-perl/Pod-Parser-1.630.0-r1
      [ebuild  rR    ] dev-perl/Text-CharWidth-0.40.0-r2
      [ebuild  rR    ] dev-perl/Text-WrapI18N-0.60.0-r2
      [...]
    
    Bug: https://bugs.gentoo.org/463976
    Bug: https://bugs.gentoo.org/592880
    Bug: https://bugs.gentoo.org/596664
    Bug: https://bugs.gentoo.org/631490
    Bug: https://bugs.gentoo.org/764365
    Bug: https://bugs.gentoo.org/793992
    Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com>
    Closes: https://github.com/gentoo/portage/pull/1055
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/_emerge/depgraph.py                             | 18 ++++++++++++++++++
 lib/portage/tests/resolver/test_perl_rebuild_bug.py |  4 ++--
 2 files changed, 20 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=ff457f742b513a65e6609054e5310f8beee488ec

commit ff457f742b513a65e6609054e5310f8beee488ec
Author:     YiFei Zhu <zhuyifei1999@gmail.com>
AuthorDate: 2023-06-13 08:08:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-16 03:34:46 +0000

    tests: resolver: Test the broken behavior of Perl rebuild bug
    
    Bug: https://bugs.gentoo.org/463976
    Bug: https://bugs.gentoo.org/592880
    Bug: https://bugs.gentoo.org/596664
    Bug: https://bugs.gentoo.org/631490
    Bug: https://bugs.gentoo.org/764365
    Bug: https://bugs.gentoo.org/793992
    Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../tests/resolver/test_perl_rebuild_bug.py        | 121 +++++++++++++++++++++
 1 file changed, 121 insertions(+)
Comment 42 Larry the Git Cow gentoo-dev 2023-06-21 19:12:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9502761c5bef818dbec90f062909d46dc22289df

commit 9502761c5bef818dbec90f062909d46dc22289df
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-06-21 19:09:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-21 19:11:05 +0000

    sys-apps/portage: add 3.0.49
    
    Closes: https://bugs.gentoo.org/485100
    Cloess: https://bugs.gentoo.org/592880
    Closes: https://bugs.gentoo.org/596664
    Closes: https://bugs.gentoo.org/631490
    Closes: https://bugs.gentoo.org/764365
    Closes: https://bugs.gentoo.org/793992
    Closes: https://bugs.gentoo.org/890812
    Closes: https://bugs.gentoo.org/905660
    Closes: https://bugs.gentoo.org/907949
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.49.ebuild | 296 +++++++++++++++++++++++++++++++++
 2 files changed, 297 insertions(+)
Comment 43 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-05 12:21:18 UTC
*** Bug 939112 has been marked as a duplicate of this bug. ***