Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 812938 - sys-devel/gcc: allow building just libgcc, libstdc++ (or split into new packages)
Summary: sys-devel/gcc: allow building just libgcc, libstdc++ (or split into new packa...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-13 09:30 UTC by hoelbezier
Modified: 2021-09-15 00:44 UTC (History)
2 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 hoelbezier 2021-09-13 09:30:48 UTC
dev-libs/icu-69.1 is linked to libstdc++.so.6.

However, it has no RDEPEND to sys-devel/gcc nor to sys-libs/libcxx which provide for it.

Ideally it should depend on any one of them, so that users can choose which provider for libstdc++.so.6 they want to use.
Comment 1 Sam James archtester gentoo-dev Security 2021-09-14 05:11:28 UTC
It needs *a* C++ compiler, not necessarily gcc's g++. You can even mix and match Clang and libstdc++. ICU does not specifically need libstdc++ (as far as I know), it needs an implementation of the C++ standard library.

If you want to use libcxx (LLVM's project), you need to set that in your *FLAGS (CXXFLAGS and LDFLAGS(?)). It's not for USE flags or dependencies to control. clang even has a default-libcxx flag if you want to use that.

Adding a dependency in the ebuild wouldn't change any of this, it'd just force e.g. Clang to be installed?

TL;DR: You control this via *FLAGS, there's no need for an explicit dependency, and we try to avoid using USE flags for just flag changes.
Comment 2 hoelbezier 2021-09-14 13:46:23 UTC
Without setting a proper dependency in the ebuild however, installing a binary package of icu into a chroot using emerge --root= option, or downloading binary packages using --getbinpkgonly from a set up binary package server, will fail to install icu runtime dependency.

Hence, when executing a program depending on icu, I get a “cannot open shared object file” error. For example, with `newaliases` from mail-mta/postfix with USE-flag eai enabled:

newaliases: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Comment 3 Ionen Wolkens gentoo-dev 2021-09-14 17:00:03 UTC
Packages don't typically depend on a libc either because it's supposed to always be there.

And, just like glibc, gcc is in @system set and it's not normal if you're missing it.
Comment 4 Sam James archtester gentoo-dev Security 2021-09-15 00:43:13 UTC
(In reply to Ionen Wolkens from comment #3)
> Packages don't typically depend on a libc either because it's supposed to
> always be there.
> 
> And, just like glibc, gcc is in @system set and it's not normal if you're
> missing it.

Agreed. But there is a valid use case for a container with just libstdc++. Let's repurpose this bug for a request to separately package libgcc and libstdc++ (or via USE flags on sys-devel/gcc).