Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935681 - llvm-r1.eclass: unable to satisfy REQUIRED_USE for testing LLVM (18.1.8)
Summary: llvm-r1.eclass: unable to satisfy REQUIRED_USE for testing LLVM (18.1.8)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-07-06 23:35 UTC by Matt Jolly
Modified: 2024-07-23 14:07 UTC (History)
1 user (show)

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


Attachments
foo-1.2.3.ebuild (file_935681.txt,497 bytes, text/plain)
2024-07-06 23:35 UTC, Matt Jolly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Jolly gentoo-dev 2024-07-06 23:35:06 UTC
Created attachment 897239 [details]
foo-1.2.3.ebuild

I'm attempting to port Chromium to use the llvm-r1 eclass after running up against some of the limitations of the older version.

I'm trying to build with only testing LLVM/Clang to rule out some weird issues I'm seeing on my dev laptop, however I am unable to do so without setting the USE_EXPAND for the testing slot. This seems unintuitive based on the eclass docs:

> The eclass sets IUSE and REQUIRED_USE.  The flag corresponding
> to the newest supported stable LLVM slot (or the newest testing,
> if no stable slots are supported) is enabled by default.

Am I holding the eclass wrong? Minimum reproducer ebuild attached.

```
$ doas ebuild chromium-127.0.6533.26.ebuild clean merge ; eix clang; eix llvm; emerge -pv llvm:18

  The following REQUIRED_USE flag constraints are unsatisfied:
    ^^ ( llvm_slot_18 llvm_slot_19 )

  The above constraints are a subset of the following complete expression:
    !headless? ( any-of ( X wayland ) ) official? ( lto ) pgo? ( X !wayland ) qt6? ( qt5 ) screencast? ( wayland ) !system-toolchain? ( libcxx ) ffmpeg-chromium? ( bindist proprietary-codecs ) exactly-one-of ( llvm_slot_18 llvm_slot_19 )

[I] sys-devel/clang
     Available versions:  
     (15)   15.0.7-r3(15/15g1)^t
     (16)   16.0.6(16/16)^t
     (17)   17.0.6(17/17)^t
     (18)   (~)18.1.8(18/18.1)^t
     (19)   **19.0.0.9999(19/19.0.0.9999)*l^t
       {(+)debug doc +extra ieee-long-double +pie +static-analyzer test verify-sig xml ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" LLVM_TARGETS="AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai LoongArch M68k MSP430 Mips NVPTX PowerPC RISCV SPIRV Sparc SystemZ VE WebAssembly X86 XCore Xtensa" PYTHON_SINGLE_TARGET="python3_10 python3_11 python3_12 python3_13"}
     Installed versions:  17.0.6(17/17)^t(06:47:40 22/06/24)(extra pie static-analyzer xml -debug -doc -ieee-long-double -test -verify-sig ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11") 18.1.8(18/18.1)^t(11:19:05 04/07/24)(extra pie static-analyzer xml -debug -doc -ieee-long-double -test -verify-sig ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11 -python3_13")
     Homepage:            https://llvm.org/
     Description:         C language family frontend for LLVM

[I] sys-devel/llvm
     Available versions:  
     (15)   15.0.7-r3(15/15)^t
     (16)   16.0.6(16/16)^t
     (17)   17.0.6(17/17)^t
     (18)   (~)18.1.8(18/18.1)^t
     (19)   **19.0.0_pre20240623(19/19.0.0_pre20240623)^t **19.0.0.9999(19/19.0.0.9999)*l^t
       {+binutils-plugin (+)debug debuginfod doc exegesis libedit +libffi ncurses test verify-sig xar xml z3 zstd ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" LLVM_TARGETS="AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai LoongArch M68k MSP430 Mips NVPTX PowerPC RISCV SPIRV Sparc SystemZ VE WebAssembly X86 XCore Xtensa"}
     Installed versions:  17.0.6(17/17)^t(04:30:54 22/06/24)(binutils-plugin libffi ncurses xml zstd -debug -debuginfod -doc -exegesis -libedit -test -verify-sig -xar -z3 ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa") 18.1.8(18/18.1)^t(10:57:42 04/07/24)(binutils-plugin libffi ncurses xml zstd -debug -debuginfod -doc -exegesis -libedit -test -verify-sig -z3 ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa")
     Homepage:            https://llvm.org/
     Description:         Low Level Virtual Machine


These are the packages that would be merged, in order:

Calculating dependencies  ... done!
Dependency resolution took 2.84 s (backtrack: 0/20).

[ebuild   R   ~] sys-devel/llvm-18.1.8:18/18.1::gentoo  USE="binutils-plugin libffi ncurses xml zstd -debug -debuginfod -doc -exegesis -libedit -test -verify-sig -z3" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (LoongArch) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) -ARC -CSKY -DirectX -M68k -SPIRV -Xtensa" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
```
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-07-07 02:22:12 UTC
# portageq metadata / ebuild app-misc/foo-1.2.3 IUSE
+llvm_slot_19 llvm_slot_18

Is this a stable system?  Perhaps the problem you're hitting is that slot 18 is stable-masked.
Comment 2 Matt Jolly gentoo-dev 2024-07-07 03:47:46 UTC
Hi Michal,

I've seen this on several global ~amd64 systems. While I have llvm 17 installed here I wanted to rule out an issue with it and tried to restrict the minimum slot in LLVM_COMPAT to 18.

I expected the REQUIRED_USE to be automatically filled based on the eclass comments and was a bit surprised when it wasn't.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-07 04:45:05 UTC
(In reply to Matt Jolly from comment #2)
Your REQUIRED_USE is OK, I think (I got it wrong at first), the issue is that the IUSE default is wrong for you (or for some reason not working).

mgorny's output shows the metadata looks right -- what does it show for you?
Comment 4 Matt Jolly gentoo-dev 2024-07-07 04:57:43 UTC
portageq metadata / ebuild app-misc/foo-1.2.3 IUSE
+llvm_slot_19 llvm_slot_18
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-07 04:59:52 UTC
have you got LLVM_SLOT="18" in make.conf or package.use globally?
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-07 05:00:06 UTC
(also, it shouldn't be choosing 19 here, obviously, it should choose *18*)
Comment 7 Matt Jolly gentoo-dev 2024-07-07 05:50:32 UTC
No, nothing. Just grepped /etc/portage to be sure.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-07 05:52:57 UTC
Ah, wait, so:
* ^^ = exactly-one-of
* 19 is set, so no +18 in there
* nothing sets 18

So yeah, we're back to the issue being "it shouldn't choose +19, but instead +18, as 19 isn't released".
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-07-07 11:21:04 UTC
(In reply to Sam James from comment #8)
> Ah, wait, so:
> * ^^ = exactly-one-of
> * 19 is set, so no +18 in there
> * nothing sets 18
> 
> So yeah, we're back to the issue being "it shouldn't choose +19, but instead
> +18, as 19 isn't released".

Right, sorry, I've missed that in my output x_x.
Comment 10 Larry the Git Cow gentoo-dev 2024-07-23 14:07:57 UTC
The bug has been closed via the following commit(s):

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

commit 9f09b98ee6a5edce65e995c4701776e8e1c86d1d
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-07-07 12:22:52 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-07-23 14:07:52 +0000

    llvm-r1.eclass: Do not default-enable unkeyworded slots
    
    Change the IUSE defaults logic to default-enable the *oldest* ~arch
    version rather than the newest one, when no stable slots are supported.
    Since we only except a single ~arch version to exist, this effectively
    prevents the eclass from default-enabling the unkeyworded snapshots.
    
    Closes: https://bugs.gentoo.org/935681
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/37473
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 eclass/llvm-r1.eclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)