Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612602 - sys-libs/libunwind static-libs use default vs libcxxabi static-libs use defaults
Summary: sys-libs/libunwind static-libs use default vs libcxxabi static-libs use defaults
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-14 11:45 UTC by Alexis Ballier
Modified: 2020-12-17 17:26 UTC (History)
4 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 Alexis Ballier gentoo-dev 2017-03-14 11:45:58 UTC
With llvm-4, libcxxabi use defaults are: +libunwind +static-libs
With deps:
RDEPEND="
	libunwind? (
		|| (
			>=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
			>=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
		)
	)"


sys-libs/libunwind does not enable static-libs by default.

Today, I tried to update to llvm-4, and I got quite cryptic/annoying errors from portage:

# emerge -uNDa world

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

Calculating dependencies... done!
[ebuild   R    ] sys-devel/clang-runtime-4.0.0  USE="compiler-rt* sanitize*" 
[ebuild     U  ] dev-libs/libsodium-1.0.12 [1.0.11]
[ebuild     U  ] dev-util/debootstrap-1.0.89 [1.0.88]
[ebuild     U  ] media-libs/harfbuzz-1.4.5 [1.4.4]
[ebuild     U  ] dev-python/setuptools-34.3.2 [34.0.2-r1]
[ebuild     U  ] x11-terms/mate-terminal-1.16.1-r2 [1.16.1-r1]
[ebuild  N     ] sys-libs/llvm-libunwind-4.0.0  USE="static-libs -debug" ABI_X86="32 (64) (-x32)" 
[ebuild  N     ] sys-libs/libcxxabi-4.0.0  USE="libunwind static-libs {-test}" ABI_X86="32 (64) (-x32)" 
[ebuild     U  ] sys-libs/libcxx-4.0.0 [3.9.1] USE="libcxxabi* libunwind* -libcxxrt*" 
[ebuild   R    ] sys-devel/clang-4.0.0  USE="default-compiler-rt* default-libcxx*" 
[ebuild     U  ] x11-misc/xlockmore-5.51 [5.50]
[ebuild     U  ] dev-util/android-studio-2.3.0.8.162.3764568 [2.2.3.0.145.3537739]
[ebuild   R    ] media-video/vlc-2.2.4-r1  USE="mtp*" 
[blocks B      ] sys-libs/libunwind ("sys-libs/libunwind" is blocking sys-libs/llvm-libunwind-4.0.0)

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

  (sys-libs/libunwind-1.2:7/7::gentoo, installed) pulled in by
    sys-libs/libunwind required by (net-libs/zeromq-4.2.2:0/5::gentoo, installed)
    sys-libs/libunwind required by (dev-util/google-perftools-2.5:0/4::gentoo, installed)

  (sys-libs/llvm-libunwind-4.0.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_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] (>=sys-libs/llvm-libunwind-3.9.0-r1[static-libs,abi_x86_32(-),abi_x86_64(-)]) required by (sys-libs/libcxxabi-4.0.0:0/0::gentoo, ebuild scheduled for merge)




The solution I went for was enabling static-libs on sys-libs/libunwind and it went fine. However, the default experience with it will likely be similar errors.



I can see various solutions, by my order of preference:

1. Enable +static-libs in sys-libs/libunwind
2. Remove +static-libs default in libcxxabi and other clang/llvm ebuilds
3. Improve portage error message to suggest enabling static-libs on libunwind


The 1st one has the advantage that clang/clang++ -static will work out of the box. The 2nd will break clang/clang++ -static by default and thus profiles with clang as default system compiler will need to p.use.force it. The 3rd is probably harder, esp. with the various heuristics and options that can affect this behavior.
Comment 1 SpanKY gentoo-dev 2017-03-14 18:04:57 UTC
i don't see the USE defaults changing in libunwind

your basic complaint is not specific to libunwind or llvm -- the error message you're quoting is how it looks whenever a USE flag dep doesn't line up
Comment 2 Zac Medico gentoo-dev 2017-03-14 18:12:40 UTC
(In reply to Alexis Ballier from comment #0)
> 3. Improve portage error message to suggest enabling static-libs on libunwind

Yeah, it looks like it could use some smarts to prefer the sys-libs/libunwind choice, and then autounmask will suggest the USE=static-libs change.
Comment 3 Zac Medico gentoo-dev 2017-03-15 15:58:51 UTC
The IUSE="+static-libs" in the sys-libs/llvm-libunwind-4.0.0 ebuild is leads portage in the wrong direction. Otherwise, this code from bug 278729 would solve it:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=35d9537a14714a80c40eaeaed2a6f17b05897103
Comment 4 Alexis Ballier gentoo-dev 2017-03-15 16:00:11 UTC
(In reply to SpanKY from comment #1)
> i don't see the USE defaults changing in libunwind
> 
> your basic complaint is not specific to libunwind or llvm -- the error
> message you're quoting is how it looks whenever a USE flag dep doesn't line
> up

still, it's better to have packages installable without touching /etc/portage on a standard install, even with a nice message from portage, so i guess that leaves us with disabling 'static-libs' on clang libs and have 'clang -static' broken by default on linux...
Comment 5 Larry the Git Cow gentoo-dev 2017-10-02 22:32:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24d2172de19427daacbbf458ddba254b69bf754b

commit 24d2172de19427daacbbf458ddba254b69bf754b
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2017-10-02 22:31:52 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2017-10-02 22:32:07 +0000

    sys-libs/libunwind: End the pissing contest in bug 612602
    
    @ vapier: if you don't give reasons for your decisions you'll eventually get ignored
    
    Closes: https://bugs.gentoo.org/612602
    Package-Manager: Portage-2.3.10, Repoman-2.3.3

 sys-libs/libunwind/libunwind-1.1-r1.ebuild  | 2 +-
 sys-libs/libunwind/libunwind-1.2.1.ebuild   | 2 +-
 sys-libs/libunwind/libunwind-1.2.ebuild     | 2 +-
 sys-libs/libunwind/libunwind-1.2_rc1.ebuild | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)