1 |
On Thu, 2008-07-31 at 11:45 +0200, Fabian Groffen wrote: |
2 |
> On 31-07-2008 11:29:39 +0200, Michael Haubenwallner wrote: |
3 |
> > > I initially had in mind sort of the same, but with the cache in the back |
4 |
> > > of my head. Given that you require getopt some and other, you just need |
5 |
> > > to get those .o files in a libgnu.a. I don't think a .a file with more |
6 |
> > > than you need is a problem (the linker extracts only what it needs, I |
7 |
> > > guess), which means one can simply create the archive of all .o files |
8 |
> > > available. If we'd just have a directory somewhere, where Portage dumps |
9 |
> > > the .o files to, creating the gnulib.a would be trivial, and the cache |
10 |
> > > would be there immediately. Given that it's probably a zipf |
11 |
> > > distribution, the cache would be highly beneficial right from the start, |
12 |
> > > so why not just do it that way? |
13 |
> > |
14 |
> > It's not that easy: gnulib .o files have dependencies on others. |
15 |
> > Additionally there are some headers, which must match the objects when |
16 |
> > used. And some of these headers hide system headers, or do #include_next |
17 |
> > on them, with some wrappers #defined. |
18 |
> > |
19 |
> > (defining term "libgnu" to "libgnu.a and the headers" here) |
20 |
> > |
21 |
> > We could recreate the cached "libgnu" from scratch each time a package |
22 |
> > requires another gnulib module not in the cache yet. |
23 |
> > But I'm afraid this breaks already-installed packages when remerged, as |
24 |
> > their configure might find another gnulib module available then, while |
25 |
> > they could still work without it. |
26 |
> > The difference to the non-cached libgnu out of gnulib.ebuild compared to |
27 |
> > a cached one is that such problems are reproducible using the non-cached |
28 |
> > one. |
29 |
> > |
30 |
> > This having said, I don't like one single growing _cached_ libgnu. |
31 |
> > Instead I'd cache one libgnu for each used set of gnulib-modules. |
32 |
> > This cache is pruned when reinstalling dev-libs/gnulib. |
33 |
> > |
34 |
> > This would result in something like |
35 |
> > /usr/lib/gnulib/getopt-strcasestr-xvasprintf/{include,lib}/ |
36 |
> > /usr/lib/gnulib/another-getopt-strcasestr-xvasprintf-yetanother/{include,lib}/ |
37 |
> |
38 |
> Why don't we just make sets of commonly used functions then? |
39 |
|
40 |
Eventually we should look first which modules are required among several |
41 |
packages, and add them to the current gnulib.ebuild, which defines the |
42 |
initial set. Then lets see if we really need another set. |
43 |
|
44 |
> How long does it take to build just *all* of them? |
45 |
|
46 |
That does not work. I've tried initially to pass $(gnulib-tool --list), |
47 |
but there must be some bugs in the module-definitions, so that |
48 |
--create-testdir does not work with them. |
49 |
|
50 |
I'd like to look into fixing them only when they actually are required - |
51 |
there are >900 gnulib modules defined ATM. |
52 |
|
53 |
> |
54 |
> > Or we go with the libgnu from gnulib.ebuild as done currently, and have |
55 |
> > this being the growing one, but easier to control. |
56 |
> > |
57 |
> > Btw, seems the solaris patch for portage-utils can be reduced from >20k |
58 |
> > to ~3k using gnulib. |
59 |
> |
60 |
> The largest part of the patch is in the format specifiers, which are not |
61 |
> necessary if you allow warnings. |
62 |
|
63 |
When using GNU getopt, these warnings go away on solaris ;) |
64 |
|
65 |
/haubi/ |
66 |
-- |
67 |
Michael Haubenwallner |
68 |
Gentoo on a different level |