Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612772 - sys-apps/portage: slot operator rebuilds not triggered for llvm:0 to llvm:4 upgrade with clang
Summary: sys-apps/portage: slot operator rebuilds not triggered for llvm:0 to llvm:4 u...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 612576 (view as bug list)
Depends on:
Blocks: 300071 612780
  Show dependency tree
 
Reported: 2017-03-15 20:58 UTC by Zac Medico
Modified: 2017-05-20 18:25 UTC (History)
7 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 Zac Medico gentoo-dev 2017-03-15 20:58:58 UTC
For the llvm:0 to llvm:4 upgrade with clang, slot operator rebuilds are not properly triggered (for things like mesa), resulting in unsolved blockers.

I've studied this problem in a debugger, and found that this code from bug 584626 is ineffective due to the _upgrade_available method returning False for the installed instance of clang:0:

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

The reason that _upgrade_available returns False is that the clang:4 upgrade is in a new slot, and _upgrade_available only checks for an upgrade in the clang:0 slot. The clang:0 and clang:4 slots are mutually exclusive due to blockers, therefore it would make more sense for _upgrade_available to return True in cases like this.

The emerge output with unsolved blockers was as follows:

Calculating dependencies... done!
[ebuild  N     ] app-vim/llvm-vim-4.0.0::gentoo  20,524 KiB
[ebuild  NS    ] sys-devel/llvm-4.0.0:4::gentoo [3.9.1-r1:0/3.9.1::gentoo] USE="doc libffi ncurses -debug -gold -libedit {-test}" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -XCore" 0 KiB
[ebuild     U  ] sys-libs/libomp-4.0.0:0/0::gentoo [3.9.1:0/3.9::gentoo] USE="-hwloc -ompt {-test%}" ABI_X86="32 (64) (-x32)" 1,993 KiB
[ebuild  N     ] sys-libs/compiler-rt-sanitizers-4.0.0:4.0.0::gentoo  USE="{-test}" 1,402 KiB
[ebuild  NS    ] sys-devel/clang-4.0.0:4::gentoo [3.9.1-r100:0/3.9.1::gentoo] USE="doc static-analyzer -debug -default-compiler-rt -default-libcxx -multitarget {-test} -xml" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -XCore" PYTHON_TARGETS="python2_7" 11,215 KiB
[ebuild  N     ] sys-libs/compiler-rt-4.0.0:4.0.0::gentoo  USE="clang {-test}" 0 KiB
[ebuild  NS    ] sys-devel/clang-runtime-4.0.0:4.0.0::gentoo [3.9.1:0::gentoo] USE="compiler-rt openmp sanitize -libcxx" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild   R    ] dev-lang/rust-1.15.1:stable/1.15::gentoo  USE="clang -debug -doc -libcxx -system-llvm*" 0 KiB
[blocks B      ] sys-devel/clang:0 ("sys-devel/clang:0" is blocking sys-devel/clang-4.0.0)
[blocks B      ] <sys-devel/llvm-4.0.0_rc:0 ("<sys-devel/llvm-4.0.0_rc:0" is blocking sys-devel/clang-4.0.0)
[blocks B      ] sys-devel/llvm:0 ("sys-devel/llvm:0" is blocking app-vim/llvm-vim-4.0.0, sys-devel/llvm-4.0.0)

Total: 8 packages (1 upgrade, 3 new, 3 in new slots, 1 reinstall), Size of downloads: 35,133 KiB
Conflict: 3 blocks (3 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (sys-devel/llvm-3.9.1-r1:0/3.9.1::gentoo, installed) pulled in by
    <sys-devel/llvm-5:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] (<sys-devel/llvm-5:=[abi_x86_32(-),abi_x86_64(-)]) required by (media-libs/mesa-17.0.1:0/0::gentoo, installed)
    <sys-devel/llvm-5:0/3.9.1=[abi_x86_32(-),abi_x86_64(-)] required by (media-libs/mesa-17.0.1:0/0::gentoo, installed)
    ~sys-devel/llvm-3.9.1[clang(-),debug=,python?,static-analyzer?,llvm_targets_AArch64?,llvm_targets_AMDGPU?,llvm_targets_ARM?,llvm_targets_BPF?,llvm_targets_Hexagon?,llvm_targets_Mips?,llvm_targets_MSP430?,llvm_targets_NVPTX?,llvm_targets_PowerPC?,llvm_targets_Sparc?,llvm_targets_SystemZ?,llvm_targets_X86?,llvm_targets_XCore?,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] (~sys-devel/llvm-3.9.1[clang(-),-debug,python,static-analyzer,llvm_targets_AMDGPU,llvm_targets_BPF,llvm_targets_NVPTX,llvm_targets_X86,abi_x86_32(-),abi_x86_64(-)]) required by (sys-devel/clang-3.9.1-r100:0/3.9.1::gentoo, installed)

  (sys-devel/clang-4.0.0:4/4::gentoo, ebuild scheduled for merge) pulled in by
    sys-devel/clang required by (dev-lang/rust-1.15.1:stable/1.15::gentoo, ebuild scheduled for merge)
    sys-devel/clang required by (sys-libs/compiler-rt-4.0.0:4.0.0/4.0.0::gentoo, ebuild scheduled for merge)

  (sys-devel/llvm-4.0.0:4/4::gentoo, ebuild scheduled for merge) pulled in by
    >=sys-devel/llvm-4 required by (sys-libs/compiler-rt-sanitizers-4.0.0:4.0.0/4.0.0::gentoo, ebuild scheduled for merge)
    >=sys-devel/llvm-4 required by (sys-libs/compiler-rt-4.0.0:4.0.0/4.0.0::gentoo, ebuild scheduled for merge)
    sys-devel/llvm:4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] (sys-devel/llvm:4[abi_x86_32(-),abi_x86_64(-)]) required by (media-libs/mesa-17.0.1:0/0::gentoo, installed)
    ~sys-devel/llvm-4.0.0:4=[debug=,llvm_targets_AArch64?,llvm_targets_AMDGPU?,llvm_targets_ARM?,llvm_targets_BPF?,llvm_targets_Hexagon?,llvm_targets_Lanai?,llvm_targets_Mips?,llvm_targets_MSP430?,llvm_targets_NVPTX?,llvm_targets_PowerPC?,llvm_targets_RISCV?,llvm_targets_Sparc?,llvm_targets_SystemZ?,llvm_targets_X86?,llvm_targets_XCore?,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] (~sys-devel/llvm-4.0.0:4=[-debug,llvm_targets_AMDGPU,llvm_targets_BPF,llvm_targets_NVPTX,llvm_targets_X86,abi_x86_32(-),abi_x86_64(-)]) required by (sys-devel/clang-4.0.0:4/4::gentoo, ebuild scheduled for merge)
Comment 1 Zac Medico gentoo-dev 2017-03-15 21:43:44 UTC
I have a test case that reproduces the problem in this branch:

https://github.com/zmedico/portage/commits/bug_612772
Comment 4 jospezial 2017-03-16 21:28:02 UTC
After emerging portage-9999 it looks great.
Comment 5 jospezial 2017-03-16 21:29:43 UTC
Will this help for the next boost update too?
Comment 6 Zac Medico gentoo-dev 2017-03-16 21:40:31 UTC
(In reply to jospezial from comment #5)
> Will this help for the next boost update too?

It will only help for the boost update if blockers are involved. We've got a few other recent fixes that might help though:

These are already in the master branch:

bug 612042
bug 612094

This one's not merged yet:

bug 612846
Comment 7 Alex Xu (Hello71) 2017-03-26 01:32:18 UTC
*** Bug 612576 has been marked as a duplicate of this bug. ***
Comment 8 EoD 2017-04-11 09:22:27 UTC
It seems the fix for this bug is also included in sys-apps/portage-2.3.5
Comment 9 Zac Medico gentoo-dev 2017-05-20 18:25:49 UTC
Fixed in portage-2.3.5 (now has stable keywords).