Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 877567 - sys-libs/libxcrypt: fix circular compiler-rt build dependency
Summary: sys-libs/libxcrypt: fix circular compiler-rt build dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-10-18 17:41 UTC by Adrian Ratiu
Modified: 2022-11-08 01:32 UTC (History)
1 user (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 Adrian Ratiu 2022-10-18 17:41:52 UTC
While bootstrapping a pure LLVM based toolchain, compiler-rt
depends on crypt.h, but libxcrypt cannot be built yet because
it requires a working compiler runtime, so the solution is:

1. Install libxcrypt headers-only
2. Build compiler-rt & the rest of llvm/clang
3. Build full libxcrypt

Thus we need to add the ability to install libxcrypt headers-only.

I have a local patch for this, will post the GitHub link.

Reproducible: Always

Steps to Reproduce:
1. Try to bootstrap a LLVM compiler using libxcrypt
Actual Results:  
compiler-rt will fail because libxcrypt is not built and libxcrypt itself requires compiler-rt

Expected Results:  
There should be an option for libxcrypt to install only the headers, exactly how glibc has the "headers-only" use flag.
Comment 1 Adrian Ratiu 2022-10-18 17:43:20 UTC
Here is the pull request: https://github.com/gentoo/gentoo/pull/27840
Comment 2 Larry the Git Cow gentoo-dev 2022-10-19 03:15:14 UTC
The bug has been closed via the following commit(s):

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

commit 884319a75efc97f367338fc9d2f099e7bc1b2b6b
Author:     Adrian Ratiu <adrian.ratiu@collabora.com>
AuthorDate: 2022-10-18 17:18:35 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-19 03:14:13 +0000

    sys-libs/libxcrypt: add headers-only install
    
    While bootstrapping a pure LLVM based toolchain, compiler-rt-sanitizers
    depends on crypt.h, but libxcrypt cannot be built yet because
    it requires a working compiler runtime, so the solution is:
    
    1. Install libxcrypt headers-only
    2. Build compiler-rt-sanitizers & the rest of llvm/clang
    3. Build full libxcrypt
    
    Thus we add the ability to install libxcrypt headers-only,
    similar to how glibc does it.
    
    Closes: https://bugs.gentoo.org/877567
    Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
    Closes: https://github.com/gentoo/gentoo/pull/27840
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild | 18 ++++++++++++++++--
 sys-libs/libxcrypt/metadata.xml               |  1 +
 2 files changed, 17 insertions(+), 2 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2022-11-08 01:30:48 UTC
The bug has been referenced in the following commit(s):

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

commit 00b505ef3ec34426f2feb425967ad685471efd6b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-08 01:15:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-08 01:16:25 +0000

    sys-libs/musl: RDEPEND -> PDEPEND for libxcrypt
    
    Anything actually linking against libcrypt should depend
    on the virtual anyway, and this means we can have
    libxcrypt properly depend on virtual/libc (which is needed
    to ensure it can be installed first).
    
    Bug: https://bugs.gentoo.org/877567
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/musl/{musl-1.2.3-r4.ebuild => musl-1.2.3-r5.ebuild} | 6 ++----
 sys-libs/musl/musl-9999.ebuild                               | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)