Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 823179

Summary: sys-libs/libxcrypt-4.4.25 distcc causes libxcrypt to build but fail in strange ways
Product: Gentoo Linux Reporter: gentoo
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: UNCONFIRMED ---    
Severity: major CC: jstein, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://forums.gentoo.org/viewtopic-t-1144974.html
See Also: https://bugs.gentoo.org/show_bug.cgi?id=821496
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
libxcrypt build log with distcc enabled (broken version)
pam errors
pam build log after installing broken libxcrypt
screen build log with broken libxcrypt
python-3.8 build log after broken libxcrypt
python-3.9 build log after broken libxcrypt
libxcrypt build log with distcc disabled (good version)
libxcrypt-4.4.26 build log with distcc enabled (broken version)
pam build log after installing broken libxcrypt-4.4.26

Description gentoo 2021-11-11 21:40:53 UTC
When FEATURES="distcc" is enabled sys-libs/libxcrypt-4.4.25:0/1::gentoo builds but causes lots of issues.  Any other packages that try to compile with crypt support fail including sys-libs/pam-1.5.1_p20210622-r1::gentoo which making logging in on the console, su-ing, sudo-ing, and logging in via ssh impossible.

Reproducible: Always

Steps to Reproduce:
1. Enable FEATURES="distcc"
2. emerge -1v libxcrypt
3. emerge -1v pam
Actual Results:  
pam fails to compile, and pam is broken making logins impossible.  Other packages that fail to build are python, mailutils, and screen.

Expected Results:  
pam and other packages should compile and function.

Most of the compilation failures have messages referencing crypt.
The distcc server seems to still be using glibc crypt.
This is especially annoying because the pam failures make it very difficult to become root so you can actually fix the issue.
Comment 1 gentoo 2021-11-11 21:43:03 UTC
Created attachment 750471 [details]
emerge --info
Comment 2 Mike Gilbert gentoo-dev 2021-11-11 21:49:47 UTC
Please provide builds logs for the failing packages.
Comment 3 gentoo 2021-11-11 21:52:21 UTC
Created attachment 750474 [details]
libxcrypt build log with distcc enabled (broken version)
Comment 4 gentoo 2021-11-11 21:56:29 UTC
Created attachment 750477 [details]
pam errors

These are the messages generated by pam in syslog when libxcrypt is in its broken state by using distcc.  Even though pam was previously built with a good libxcrypt, when I rebuilt libxcrypt, it immediately stopped working.
Comment 5 gentoo 2021-11-11 21:57:28 UTC
Created attachment 750480 [details]
pam build log after installing broken libxcrypt
Comment 6 gentoo 2021-11-11 21:58:01 UTC
Created attachment 750483 [details]
screen build log with broken libxcrypt
Comment 7 gentoo 2021-11-11 21:58:38 UTC
Created attachment 750486 [details]
python-3.8 build log after broken libxcrypt
Comment 8 gentoo 2021-11-11 21:59:04 UTC
Created attachment 750489 [details]
python-3.9 build log after broken libxcrypt
Comment 9 gentoo 2021-11-11 22:03:32 UTC
Created attachment 750492 [details]
libxcrypt build log with distcc disabled (good version)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-11 22:08:41 UTC
(In reply to Mike Gilbert from comment #2)
> Please provide builds logs for the failing packages.

I'd give them a few minutes ;)
Comment 11 gentoo 2021-11-11 22:37:12 UTC
Created attachment 750495 [details]
libxcrypt-4.4.26 build log with distcc enabled (broken version)
Comment 12 gentoo 2021-11-11 22:40:37 UTC
Created attachment 750498 [details]
pam build log after installing broken libxcrypt-4.4.26
Comment 13 gentoo 2021-11-12 00:44:18 UTC
It appears much of this was caused by using distcc on a docker image that was deprecated (gentoo/stage3-amd64:latest) causing it to have an ancient version of gcc (x86_64-pc-linux-gnu-9.3.0).

libxcrypt and pam seem to compile and work just fine when using an up to date docker image with the latest stable gcc (x86_64-pc-linux-gnu-11.2.0).
Comment 14 Larry the Git Cow gentoo-dev 2021-12-02 01:16:54 UTC
The bug has been referenced in the following commit(s):

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

commit a6396f527bae1a5d55bb63060713cd60b83cf323
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-02 01:16:13 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-02 01:16:40 +0000

    sys-libs/libxcrypt: add warning re distcc and older GCCs (<10)
    
    Bug: https://bugs.gentoo.org/823179
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/libxcrypt/libxcrypt-4.4.25-r1.ebuild | 11 +++++++++++
 sys-libs/libxcrypt/libxcrypt-4.4.26-r1.ebuild | 11 +++++++++++
 2 files changed, 22 insertions(+)
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-02 01:17:11 UTC
See also: https://forums.gentoo.org/viewtopic-t-1144803.html.
Comment 16 Matthew Ogilvie 2021-12-03 17:52:56 UTC
So what's the word if I've already upgraded libxcrypt a few weeks ago using gcc 9.3 and 9.4 on various machines, and it seems to work fine (until the newer libxcrypt ebuild complains about gcc<10 just now)?  See the above forum thread for more details...
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-03 17:55:56 UTC
(In reply to Matthew Ogilvie from comment #16)
> So what's the word if I've already upgraded libxcrypt a few weeks ago using
> gcc 9.3 and 9.4 on various machines, and it seems to work fine (until the
> newer libxcrypt ebuild complains about gcc<10 just now)?  See the above
> forum thread for more details...

I suppose I could keep the check just for distcc (I think the configure check only gets confused in that case).

I'll reply to the rest on the forums.
Comment 18 Larry the Git Cow gentoo-dev 2021-12-03 18:57:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92b792402254e0ae4b269fbc48ba75815deb3f19

commit 92b792402254e0ae4b269fbc48ba75815deb3f19
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-03 18:56:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-03 18:56:31 +0000

    sys-libs/libxcrypt: only show < GCC 10 warning with distcc
    
    The issues should only occur if configure is confused
    which should only happen with a mismatch between
    the compiler used for configure and compilation
    (e.g. distcc).
    
    Bug: https://bugs.gentoo.org/823179
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/libxcrypt/libxcrypt-4.4.25-r1.ebuild | 8 ++++----
 sys-libs/libxcrypt/libxcrypt-4.4.26-r1.ebuild | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)