Gentoo Archives: gentoo-dev

From: Samuli Suominen <ssuominen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
Date: Mon, 12 Sep 2011 22:33:57
Message-Id: 4E6E88DB.5080204@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs. by Donnie Berkholz
1 On 09/13/2011 12:51 AM, Donnie Berkholz wrote:
2 > On 00:46 Tue 13 Sep , Samuli Suominen wrote:
3 >>> If I understand correctly, this will break for any packages that
4 >>> don't use pkg-config to link. The maintainers will manually need to
5 >>> add pkg-config calls to the ebuilds of anything that could
6 >>> statically link against a library using only libtool and not
7 >>> pkg-config. Is that accurate?
8 >>
9 >> Yes, seems accurate.
10 >>
11 >> I can think of 'export PKG_CONFIG="$($(tc-getPKG_CONFIG) --static)' or
12 >> something like 'export FOO_LIBS="$($(tc-getPKG_CONFIG) --libs --static
13 >> foo)"' to accomplish getting static flags from an ebuild using
14 >> toolchain-funcs.eclass if required.
15 >>
16 >> Or they do it like lvm2 and cryptsetup at upstream level and add
17 >> support for statically linking the tools in the build-system.
18 >>
19 >> The .la files are not helping packages not using libtool in any case,
20 >> for example, those using cmake as build-system.
21 >>
22 >> And I've yet to see a real, in portage residing, example of where this
23 >> would really break anything and when I will, I'll gladly help
24 >> migrating it to the example mentioned above... Overall, corner cases
25 >> that can be easily worked around, yet punting the *harmful* .la files.
26 >
27 > That's rather shocking. All it would take is trying to statically build
28 > a package not using pkg-config that links against anything X11-related
29 > (since all of them have .pc files).
30
31 Those packages that have pkg-config file, like libX11, are meant to be
32 used through pkg-config, so the bug would be in the package not using
33 the .pc, not in the package lacking the .la
34
35 > It's probably more that "nobody" cares about static building than that
36 > there aren't packages that would break.
37
38 I'm looking forward in catching those packages trying to link statically
39 to a package providing valid pkg-config file, yet not using it...