1 |
On Sat, 4 Apr 2020 10:43:26 +0100 |
2 |
James Le Cuirot <chewi@g.o> wrote: |
3 |
|
4 |
> On Sat, 4 Apr 2020 08:12:09 +0200 |
5 |
> Alessandro Barbieri <lssndrbarbieri@×××××.com> wrote: |
6 |
> |
7 |
> > I was trying to remove static-libs from hwloc and I noticed that the last |
8 |
> > bump of ceph is requiring hwloc:=[static-libs?] |
9 |
> > And I notices it needs also alot of other dependencies with [static-libs?] |
10 |
> > Is there a *valid* reason for having ceph[static-libs] around in the first |
11 |
> > place? |
12 |
> > |
13 |
> > For more context on static-libs see: |
14 |
> > https://projects.gentoo.org/qa/policy-guide/installed-files.html?highlight=static#pg0302 |
15 |
> > https://flameeyes.blog/2011/08/29/useless-flag-static-libs/ |
16 |
> > https://archives.gentoo.org/gentoo-dev/message/2dada80c2b9c85b0e83e6328428bf8ab |
17 |
> |
18 |
> I do like to have the option for static-libs where it's not too much |
19 |
> trouble. It's obviously not a mainline use case but I have needed it on |
20 |
> occasions. |
21 |
> |
22 |
> I think these dependencies are wrong though and I've seen the same |
23 |
> thing in other packages. You don't need the dependent static libs |
24 |
> when building other static libs. For example. I have webp[-static-libs] |
25 |
> installed and I can build leptonica[static-libs,webp] just fine. They |
26 |
> are only needed when linking executable binaries and for that, you'll |
27 |
> typically have a static USE flag rather than static-libs. QEMU is a good |
28 |
> example with its static and static-user USE flags. You could force a |
29 |
> package to build static or partially static binaries through toolchain |
30 |
> flags but then it's down to the user to ensure that all the dependent |
31 |
> static libs are in place. |
32 |
> |
33 |
> If the above paragraph is wrong, someone please correct me. :) |
34 |
|
35 |
Damn, I realised just as I hit send that there's a caveat here and |
36 |
that's sub-dependencies. If you're building a partially static binary |
37 |
then I think you're okay. A fully static binary obviously needs all its |
38 |
dependencies to be static and that includes any sub-dependencies. If |
39 |
an executable statically links libwebp.a with JPEG support but you |
40 |
don't have libjpeg.a then you'll end up with undefined references. That |
41 |
probably explains why the ceph dependencies are as they are but the |
42 |
resulting headache makes me think it's not worth the hassle. This is a |
43 |
power user case and I'd leave the users to figure it out. |
44 |
|
45 |
-- |
46 |
James Le Cuirot (chewi) |
47 |
Gentoo Linux Developer |