Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 791349 - net-fs/samba: add sys-libs/llvm-libunwind as another possibility with sys-libs/libunwind
Summary: net-fs/samba: add sys-libs/llvm-libunwind as another possibility with sys-lib...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 804333
  Show dependency tree
 
Reported: 2021-05-21 16:20 UTC by Adel KARA SLIMANE
Modified: 2021-09-24 21:49 UTC (History)
11 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 Adel KARA SLIMANE 2021-05-21 16:20:06 UTC
Hello,

I was following [1] to be able to use clang to build packages so I can compile the kernel with Clang, I have an issue with it as I need to use sys-libs/llvm-libunwind. [1] says that sys-libs/llvm-libunwind as a drop-in replacement for sys-libs/libunwind.

Unfortunately, net-fs/samba pulls only sys-libs/libunwind and makes it impossible to switch to sys-libs/llvm-libunwind. 

I edited line 93 of the EBUILD from 

```!alpha? ( !sparc? ( sys-libs/libunwind:= ) )```

to

```!alpha? ( !sparc? ( || ( sys-libs/libunwind:= sys-libs/llvm-libunwind ) ) )```

And it seems to build just fine on my machine where I replaced sys-libs/libunwind with sys-libs/llvm-libunwind


[1] https://wiki.gentoo.org/wiki/Clang
Comment 1 Arfrever Frehtes Taifersar Arahesis 2021-05-31 21:15:33 UTC
https://github.com/gentoo/gentoo/pull/20761
Comment 2 Jan Henke 2021-06-11 07:34:14 UTC
This bug is now blocking an update on my system. As Clang now newly depends on sys-devel/llvm-libunwind, but samba pulling in sys-devel/libunwind and both cannot be installed at the same time. Please work on getting the PR ready and merged.
Comment 3 Sam James archtester gentoo-dev Security 2021-06-11 07:39:45 UTC
(In reply to Jan Henke from comment #2)
> This bug is now blocking an update on my system. As Clang now newly depends
> on sys-devel/llvm-libunwind, but samba pulling in sys-devel/libunwind and
> both cannot be installed at the same time. Please work on getting the PR
> ready and merged.

Isn’t it optional on Clang….?
Comment 4 Sam James archtester gentoo-dev Security 2021-06-11 07:41:15 UTC
(In reply to Jan Henke from comment #2)
> This bug is now blocking an update on my system. As Clang now newly depends
> on sys-devel/llvm-libunwind, but samba pulling in sys-devel/libunwind and
> both cannot be installed at the same time. Please work on getting the PR
> ready and merged.

I think as ever, full emerge output would be useful.
Comment 5 Jan Henke 2021-06-11 09:26:58 UTC
Sorry, was distracted by work:

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

Calculating dependencies... done!
[ebuild     U  ] dev-perl/GSSAPI-0.280.0-r2 [0.280.0-r1]
[ebuild   R    ] sys-libs/libomp-11.1.0  ABI_X86="32*" 
[ebuild  N     ] sys-libs/llvm-libunwind-11.1.0  USE="-debug -static-libs -test" ABI_X86="32 (64) (-x32)" 
[ebuild   R    ] sys-libs/libcxxabi-11.1.0  ABI_X86="32*" 
[ebuild   R    ] sys-libs/libcxx-11.1.0  ABI_X86="32*" 
[ebuild   R    ] sys-devel/clang-runtime-11.1.0  ABI_X86="32*" 
[ebuild   R    ] sys-devel/clang-runtime-10.0.1  ABI_X86="32*" 
[blocks B      ] sys-libs/libunwind ("sys-libs/libunwind" is blocking sys-libs/llvm-libunwind-11.1.0)

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

  (sys-libs/libunwind-1.5.0-r1:0/8::gentoo, installed) pulled in by
    sys-libs/libunwind:= required by (net-fs/samba-4.13.9:0/0::gentoo, installed) USE="acl addns ads client cups ldap pam python regedit system-mitkrb5 winbind zeroconf -addc -ceph -cluster -debug (-dmapi) (-fam) -glusterfs -gpg -iprint -json -ntvfs -profiling-data -quota (-selinux) -snapper -spotlight -syslog (-system-heimdal) -systemd (-test)" ABI_X86="(64) -32 (-x32)" PYTHON_SINGLE_TARGET="python3_9 -python3_8"
    sys-libs/libunwind:0/8= required by (net-fs/samba-4.13.9:0/0::gentoo, installed) USE="acl addns ads client cups ldap pam python regedit system-mitkrb5 winbind zeroconf -addc -ceph -cluster -debug (-dmapi) (-fam) -glusterfs -gpg -iprint -json -ntvfs -profiling-data -quota (-selinux) -snapper -spotlight -syslog (-system-heimdal) -systemd (-test)" ABI_X86="(64) -32 (-x32)" PYTHON_SINGLE_TARGET="python3_9 -python3_8"

  (sys-libs/llvm-libunwind-11.1.0:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] (>=sys-libs/llvm-libunwind-3.9.0-r1[abi_x86_32(-),abi_x86_64(-)]) required by (sys-libs/libcxxabi-11.1.0:0/0::gentoo, ebuild scheduled for merge) USE="libunwind -static-libs -test" ABI_X86="32 (64) (-x32)"
Comment 6 Jan Henke 2021-06-11 09:27:55 UTC
Command line:

emerge --oneshot --ask --keep-going --update --newuse --autounmask --deep --with-bdeps=y @world
Comment 7 Arfrever Frehtes Taifersar Arahesis 2021-06-11 20:01:49 UTC
(In reply to Jan Henke from comment #2 and comment #6)

Your problems are unrelated to this bug.
Both sys-devel/clang and sys-libs/libcxxabi depend on either sys-devel/libunwind or sys-devel/llvm-libunwind.

Probable cause of your problem is mismatched USE flags:
ABI_X86="32" for sys-libs/libcxxabi and sys-libs/llvm-libunwind
ABI_X86="-32" for sys-libs/libunwind
Since USE flags are satisfied only by sys-libs/llvm-libunwind and not by sys-libs/libunwind, Portage incorrectly suggests switching from sys-libs/libunwind to sys-libs/llvm-libunwind.

This happens since:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d10cdcf53d0f254880621200ec882af96c59914e

Maybe abi_x86_32 should be enabled by default for sys-libs/libunwind.
Comment 8 Jan Henke 2021-06-11 20:28:27 UTC
Well, I tend to disagree. At least partially it is related to this bug, because samba prevents switching to sys-devel/llvm-libunwind (which would be my preferred sulution anyway). Thus making net-fs/samba support sys-devel/llvm-libunwind as well would allow me to proceed to switch my libunwind.

Anyway, I am aware that this is all done by people in their spare time and there is no right to demand any solution. Nevertheless I want to point out that the recent change to sys-devel/clang made this change more urgent, as there is now additional motivation to switch to LLVM's libunwind implementation.
Comment 9 Adel KARA SLIMANE 2021-06-11 22:07:12 UTC
I just got the same dependency issue with clang pulling libunwind with the new change, the new change should include clang 32bit too :thinking:


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

  (sys-libs/libunwind-1.5.0-r1:0/8::gentoo, ebuild scheduled for merge) pulled in by
    sys-libs/libunwind:= required by (net-fs/samba-4.14.5-r1:0/0::gentoo-adel, installed) USE="acl client cups pam regedit system-mitkrb5 systemd -addc -addns -ads -ceph -cluster -debug (-dmapi) (-fam) -glusterfs -gpg -iprint -json -ldap -ntvfs -profiling-data -python -quota (-selinux) -snapper -spotlight -syslog (-system-heimdal) (-test) -winbind -zeroconf" ABI_X86="(64) -32 (-x32)" PYTHON_SINGLE_TARGET="python3_8 -python3_9"
    sys-libs/libunwind required by (sys-devel/clang-12.0.0-r1:12/12::gentoo, installed) USE="default-compiler-rt default-lld static-analyzer xml -debug -default-libcxx -doc -test" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARC -ARM -AVR (-CSKY) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" PYTHON_SINGLE_TARGET="python3_8 -python3_7 -python3_9"

  (sys-libs/llvm-libunwind-12.0.0:0/0::gentoo, installed) pulled in by
    sys-libs/llvm-libunwind:0/0= required by (net-fs/samba-4.14.5-r1:0/0::gentoo-adel, installed) USE="acl client cups pam regedit system-mitkrb5 systemd -addc -addns -ads -ceph -cluster -debug (-dmapi) (-fam) -glusterfs -gpg -iprint -json -ldap -ntvfs -profiling-data -python -quota (-selinux) -snapper -spotlight -syslog (-system-heimdal) (-test) -winbind -zeroconf" ABI_X86="(64) -32 (-x32)" PYTHON_SINGLE_TARGET="python3_8 -python3_9"
    sys-libs/llvm-libunwind required by @selected 
    >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] (>=sys-libs/llvm-libunwind-3.9.0-r1[abi_x86_32(-),abi_x86_64(-)]) required by (sys-libs/libcxxabi-12.0.0:0/0::gentoo, ebuild scheduled for merge) USE="libunwind -static-libs -test" ABI_X86="32 (64) (-x32)"
```
Comment 10 Adel KARA SLIMANE 2021-06-11 22:50:36 UTC
(In reply to Adel KARA SLIMANE from comment #9)

As stated in a comment in the PR https://github.com/gentoo/gentoo/pull/20761 clang version 12.0.0-r1 needs now the `llvm-libunwind` USE flag when using `sys-libs/llvm-libunwind` that fixed the dependency issue.
Comment 11 Arfrever Frehtes Taifersar Arahesis 2021-06-12 06:51:56 UTC
Currently 3 packages have any dependency on sys-libs/llvm-libunwind:

- dev-cpp/glog[libunwind] and sys-devel/clang[default-compiler-rt] have "llvm-libunwind" USE flag and have generally this dependency:

  llvm-libunwind? ( sys-libs/llvm-libunwind )
  !llvm-libunwind? ( sys-libs/libunwind )

- sys-libs/libcxxabi[libunwind] is missing "llvm-libunwind" USE flag and has old-style dependency:
  || (
    sys-libs/libunwind
    sys-libs/llvm-libunwind
  )

Bug #722992 contains patch for sys-libs/libcxxabi to use "llvm-libunwind" USE flag.

|| ( ... ) combined with mismatching USE flags (in this case caused by profile) can make Portage's dependency resolver incorrectly suggest switching from one package to another package (sys-libs/libunwind -> sys-libs/llvm-libunwind).

After bug #722992 is fixed, the worst what should happen is that Portage's autounmasker will suggest enabling "abi_x86_32" USE flag for sys-libs/libunwind and its dependencies (app-arch/xz-utils, sys-libs/zlib).

Users who want to use sys-libs/libunwind should not enable "llvm-libunwind" USE flag (it is disabled by default).

Users who want to use sys-libs/llvm-libunwind should enable "llvm-libunwind" USE flag.
However support for sys-libs/llvm-libunwind in Gentoo should be considered experimental for now.