Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833043 - sys-libs/compiler-rt-13.0.1 requires 32bit packages on a pure 64bit system
Summary: sys-libs/compiler-rt-13.0.1 requires 32bit packages on a pure 64bit system
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-10 07:23 UTC by Ooblick
Modified: 2022-02-14 07:23 UTC (History)
0 users

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 Ooblick 2022-02-10 07:23:49 UTC
When upgrading to clang-13.0.1 and llvm-13.0.1, compiler-rt-13.0.1 is pulled in as a dependency. This has a surprising and unwanted requirement on a machine built with ABI_X86="64":

# required by sys-libs/compiler-rt-sanitizers-13.0.1::gentoo
# required by sys-devel/clang-runtime-13.0.1::gentoo[sanitize,compiler-rt]
# required by sys-devel/clang-13.0.1::gentoo
# required by sys-devel/clang-common-13.0.1::gentoo
>=virtual/libcrypt-2 abi_x86_32
# required by virtual/libcrypt-2::gentoo
# required by sys-libs/compiler-rt-sanitizers-13.0.1::gentoo
# required by sys-devel/clang-runtime-13.0.1::gentoo[sanitize,compiler-rt]
# required by sys-devel/clang-13.0.1::gentoo
# required by sys-devel/clang-common-13.0.1::gentoo
>=sys-libs/libxcrypt-4.4.27 abi_x86_32

The ebuild has this added since 13.0.0:

+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+

Please remove this so no unnecessary 32bit libraries are required.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-10 07:29:33 UTC
That fragment/hunk you highlight would not be responsible for a dependency change at all. It just affects options passed to the build system.

emerge -p -uvDU @world output would be helpful to understand why it's enabled for Clang LLVM which then drags in the other deps. --autounmask=n may give more helpful output too.

In any case, please give more output and information.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-10 07:30:32 UTC
Ah, I see we have this in compiler-rt-sanitizers:
>IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-10 07:32:59 UTC
(In reply to Sam James from comment #2)
> Ah, I see we have this in compiler-rt-sanitizers:
> >IUSE="+abi_x86_32 abi_x86_64 +clang debug test"

commit 1b8078187d4d85e5f5a88f80b665051939dd48a3
Author: Michał Górny <mgorny@gentoo.org>
Date:   Sat Dec 4 14:24:29 2021 +0100

    sys-libs/compiler-rt-sanitizers: Inline ABI_X86 flags to fix non-x86
    
    Inline ABI_X86 flags instead of using multilib-build, as the latter
    injects a REQUIRED_USE constraint that is impossible to satisfy
    on non-x86 architectures.
    
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

commit 3cd6d3273c98da84571084ce2e814c2bbb2d6bb3
Author: Michał Górny <mgorny@gentoo.org>
Date:   Fri Dec 3 19:06:10 2021 +0100

    sys-libs/compiler-rt-sanitizers: Add ABI_X86 flags
    
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

... then ...

$ grep -rsin "abi_x86" profiles/ | grep clang
profiles/arch/amd64/package.use:6:sys-devel/clang-runtime abi_x86_32

... then ...

# Theo Anderson <telans@posteo.de> (2021-03-06)                                 
# Enable 32-bit clang runtime to ease -m32 builds with non-GCC runtime          
sys-devel/clang-runtime abi_x86_32                                              
sys-libs/libcxxabi abi_x86_32                                                   
sys-libs/libcxx abi_x86_32                                                      
sys-libs/libomp abi_x86_32                                                      
sys-libs/llvm-libunwind abi_x86_32

.... then ...

commit d10cdcf53d0f254880621200ec882af96c59914e
Author: Theo Anderson <telans@posteo.de>
Date:   Sat Mar 6 22:23:07 2021 +1300

    profiles: enable abi_x86_32 clang-runtime & deps
    
    Enables compatability with -unwindlib=libunwind
    sys-devel/clang[default-compiler-rt] requires these for multilib builds
    
    Package-Manager: Portage-3.0.16, Repoman-3.0.2
    Signed-off-by: Theo Anderson <telans@posteo.de>
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

-
so nothing new, I don't think.
Comment 4 Ooblick 2022-02-14 07:23:25 UTC
Ah. I didn't have a no-multilib profile selected. I see glibc is built 32bit. It would be nice if xcrypt defaulted to that if it's required.