gentoo / dlang

[MIRROR] D programming language ebuild repository
https://gitweb.gentoo.org/repo/user/dlang.git
GNU General Public License v2.0
30 stars 25 forks source link

ldc2 and llvm-4.0.0:4::gentoo #57

Closed Alessandro-Barbieri closed 7 years ago

Alessandro-Barbieri commented 7 years ago

Actually llvm-4 is slotted in slot 4 but the ldc2 ebuild wants to pull in only llvm:0

mleise commented 7 years ago

I cannot reproduce this behavior. The ldc2 ebuilds >= 1.1.0 should pull in llvm 4 if you keyworded app-vim/llvm-vim, sys-devel/llvm and sys-devel/llvmgold. There was never a dependency on a specific slot in the ebuilds.

mleise commented 7 years ago

What you probably stumbled upon is that llvm:0 actually blocks llvm:4!

llvm-4.0.0-r2.ebuild:

# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
        !sys-devel/llvm:0"
Alessandro-Barbieri commented 7 years ago

no slot means slot 0

for example mesa does this

        llvm? (
                video_cards_radeonsi? (
                        virtual/libelf:0=[${MULTILIB_USEDEP}]
                        vulkan? (
                                || (
                                        sys-devel/llvm:4[${MULTILIB_USEDEP}]
                                        >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] ) )
                )
                video_cards_r600? (
                        virtual/libelf:0=[${MULTILIB_USEDEP}]
                )
                video_cards_radeon? (
                        virtual/libelf:0=[${MULTILIB_USEDEP}]
                )
                || (
                        sys-devel/llvm:4[${MULTILIB_USEDEP}]
                        >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}]
                )
                <sys-devel/llvm-5:=[${MULTILIB_USEDEP}]
        )

this should work

|| ( sys-devel/llvm:4 sys-devel/llvm:0 ) 
mleise commented 7 years ago

no slot means slot 0

No slot means any slot will satisfy the dependency. There was an old rule I think, where an omitted SLOT variable in an ebuild would default it to "0". In any case, I tested the ldc2-1.2.0 ebuild and it pulls in llvm:4 if that is the best version that's available. Please double check that llvm:4 and dependencies are in your package.accept_keywords and that you have no packages installed that depend on an older version of llvm, such as ldc2-1.0.0 or ldc2-0.17.1 and earlier. (ldc2-0.17.4 is compatible with llvm:4).

|| ( sys-devel/llvm:4 sys-devel/llvm:0 )

That's the same as sys-devel/llvm as far as I understand it from https://devmanual.gentoo.org/general-concepts/dependencies/index.html. Do you have a source that suggests otherwise?

Alessandro-Barbieri commented 7 years ago

Something is confusing portage

sudo emerge -av ldc2

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

Calculating dependencies                                    ... done!
[ebuild  N     ] app-eselect/eselect-dlang-20160606-r1::dlang  0 KiB
[ebuild  N     ] dev-libs/libconfig-1.5::gentoo  USE="cxx examples -static-libs" 630 KiB
[ebuild  NS   #] sys-devel/llvm-3.7.1-r3:0/3.7.1::gentoo [4.0.0-r2:4::gentoo] USE="clang gold libffi lldb ncurses ocaml python static-analyzer xml -debug -doc -libedit
-multitarget {-test}" PYTHON_TARGETS="python2_7" VIDEO_CARDS="-radeon" 35011 KiB
[ebuild  NS   #] sys-devel/clang-3.7.1-r100:0/3.7::gentoo [4.0.0-r2:4::gentoo] USE="python static-analyzer -debug -multitarget" 0 KiB
[ebuild  N     ] dev-lang/ldc2-0.17.1-r1:0.17/1::dlang  4844 KiB
[blocks B      ] sys-devel/llvm[ocaml(-)] ("sys-devel/llvm[ocaml(-)]" is blocking dev-ml/llvm-ocaml-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-r2, sys-devel/llvmgold-4)
[blocks B      ] sys-devel/clang:0 ("sys-devel/clang:0" is blocking sys-devel/clang-4.0.0-r2)
[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-r2)

Total: 5 packages (3 new, 2 in new slots), Size of downloads: 40484 KiB
Conflict: 4 blocks (4 unsatisfied)

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

  (sys-devel/clang-3.7.1-r100:0/3.7::gentoo, ebuild scheduled for merge) pulled in by
    sys-devel/clang required by @selected
    =sys-devel/clang-3.7.1-r100 required by (sys-devel/llvm-3.7.1-r3:0/3.7.1::gentoo, ebuild scheduled for merge)

  (sys-devel/llvm-3.7.1-r3:0/3.7.1::gentoo, ebuild scheduled for merge) pulled in by
    <sys-devel/llvm-3.9 required by (dev-lang/ldc2-0.17.1-r1:0.17/1::dlang, ebuild scheduled for merge)
    ~sys-devel/llvm-3.7.1[clang(-),debug=,multitarget?,python?,static-analyzer?,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.7.1[clang(-),-debug,python,static-analyzer,abi_x86_64(-)]) required by (sys-d
evel/clang-3.7.1-r100:0/3.7::gentoo, ebuild scheduled for merge)

  (sys-devel/llvm-4.0.0-r2:4/4::gentoo, installed) pulled in by
    <sys-devel/llvm-5:4/4=[abi_x86_64(-)] required by (media-libs/mesa-17.0.4:0/0::gentoo, installed)
    >=sys-devel/llvm-4 required by (sys-libs/compiler-rt-4.0.0:4.0.0/4.0.0::gentoo, installed)
    sys-devel/llvm:4[gold] required by (sys-devel/llvmgold-4:0/0::gentoo, installed)
    >=sys-devel/llvm-3.5 required by (dev-lang/ldc2-0.17.1-r1:0.17/1::dlang, ebuild scheduled for merge)
    >=sys-devel/llvm-4 required by (sys-libs/libcxx-4.0.0:0/0::gentoo, installed)
    sys-devel/llvm:4[abi_x86_64(-)] required by (media-libs/mesa-17.0.4:0/0::gentoo, installed)
    >=sys-devel/llvm-4 required by (sys-libs/compiler-rt-sanitizers-4.0.0:4.0.0/4.0.0::gentoo, installed)
    >=sys-devel/llvm-4 required by (sys-libs/libcxxabi-4.0.0: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_target
    ~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?,ll[36/3241]
s_Mips?,llvm_targets_MSP430?,llvm_targets_NVPTX?,llvm_targets_PowerPC?,llvm_targets_RISCV?,llvm_targets_Sparc?,llvm_targets_SystemZ?,llvm_targets_X86?,llvm_targets_XCor
e?,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_64(-)]) required by (sys-devel/clang-4.0.0-r2:4/4::gentoo,
installed)
    ~sys-devel/llvm-4.0.0:=[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?] (~sy
s-devel/llvm-4.0.0:=[llvm_targets_AMDGPU,llvm_targets_BPF,llvm_targets_NVPTX,llvm_targets_X86]) required by (dev-ml/llvm-ocaml-4.0.0:0/4.0.0::gentoo, installed)
    >=sys-devel/llvm-3.5 required by (sys-devel/llvm-3.7.1-r3:0/3.7.1::gentoo, ebuild scheduled for merge)
    ~sys-devel/llvm-4.0.0:4/4=[llvm_targets_AMDGPU,llvm_targets_BPF,llvm_targets_NVPTX,llvm_targets_X86] required by (dev-ml/llvm-ocaml-4.0.0:0/4.0.0::gentoo, installed
)
    ~sys-devel/llvm-4.0.0:4/4=[-debug,llvm_targets_AMDGPU,llvm_targets_BPF,llvm_targets_NVPTX,llvm_targets_X86,abi_x86_64(-)] required by (sys-devel/clang-4.0.0-r2:4/4:
:gentoo, installed)

  (dev-ml/llvm-ocaml-4.0.0:0/4.0.0::gentoo, installed) pulled in by
    dev-ml/llvm-ocaml required by @selected

  (sys-devel/clang-4.0.0-r2:4/4::gentoo, installed) pulled in by
    sys-devel/clang:4/4= required by (app-doc/doxygen-1.8.13-r1:0/0::gentoo, installed)
    sys-devel/clang required by (sys-libs/compiler-rt-4.0.0:4.0.0/4.0.0::gentoo, installed)
    sys-devel/clang:= required by (app-doc/doxygen-1.8.13-r1:0/0::gentoo, installed)
    sys-devel/clang required by (dev-lang/rust-1.16.0:stable/1.16::gentoo, installed)
    sys-devel/clang required by @selected
mleise commented 7 years ago

ldc2-0.17.1 does not support llvm-4. Use ldc2-0.17.4 (last standalone compiler updated to work with llvm 4) or >=ldc2-1.1.0 (also requires an installed Dlang compiler to build).

Alessandro-Barbieri commented 7 years ago

Well I did not specified the version, portage choose the 0.17.1-r1 for some strange reason

mleise commented 7 years ago

The reason is clear: It is the most recent stable ebuild. :)