1 |
On 29/11/12 02:14, Mike Frysinger wrote: |
2 |
> On Wednesday 28 November 2012 16:49:14 Justin wrote: |
3 |
>> Problem: |
4 |
>> Some packages aren't lucky and their buildsystem doesn't create |
5 |
>> pkg-config files out of the box. |
6 |
>> |
7 |
>> Solution: |
8 |
>> Create them by hand. |
9 |
> |
10 |
> i agree this is a problem. but i think the only real place to fix this is in |
11 |
> the upstream package. otherwise, the .pc file is largely unused and kind of |
12 |
> pointless. other people have already enumerated more detailed responses, so |
13 |
> i'll just leave it at this. |
14 |
> -mike |
15 |
> |
16 |
|
17 |
Hi, |
18 |
|
19 |
I will respond here, but this also is addressed to all the other |
20 |
negative responses. |
21 |
|
22 |
Let me explain the reason we (sci team) are using manually created .pc |
23 |
files. And as a side note I totally agree with the statement that pc |
24 |
file creation should be upstreams business. |
25 |
|
26 |
Back to the problem. We are mainly using this approach to allow multiple |
27 |
installations of packages providing BLAS and LAPACK implementations, and |
28 |
its derivative. Why this? There is a reference implementation, a closed |
29 |
source intel implementation, optimized versions for speed, a gnu version |
30 |
and so on, from which the user should be able to choose. Still why we |
31 |
need a switchable system? I would like to point [1] you to some great |
32 |
GSOC work from andy which he also present in Praque [2]. He clearly |
33 |
showed, that different implementations are good for different puposes. |
34 |
Therefore we need to have different implementations installed in parallel. |
35 |
|
36 |
Currently we have an eselect module to switch between different |
37 |
implementations by setting /usr/lib/lib[blas,lapack].so to the selected |
38 |
implementation. |
39 |
|
40 |
This has two drawbacks, which some of you might already of hit: |
41 |
1. They seem to be not completely API/ABI compatible (I don't which one |
42 |
is correct here. And please don't be nitpicking on this point). So |
43 |
switching would mean recompilation of all packages linked against it |
44 |
before, otherwise you might get runtime errors. This takes time and |
45 |
triggers point 2. |
46 |
|
47 |
2. As andy showed we should stick with specific implementations for |
48 |
specific tasks. The current way flattens this out to be optimal for some |
49 |
and suboptimal for others. |
50 |
|
51 |
Now, there has been a lot of effort around Andy and Sebastien to solve |
52 |
this problem. The solution is simple: don't install any libblas.so or |
53 |
liblapack.so in libdir, but instead make the pkg-config module |
54 |
eselectable and force packages to used pkg-config. Nearly (I think its |
55 |
100%) of the packages in the tree already use pkg-config to detect |
56 |
blas/lapack. |
57 |
|
58 |
The only remaining problem is on the implementation side. As you can |
59 |
imagine, this effort is nothing in which the upstreams are really |
60 |
interested in. Therefore most of our .pc files are created inside the |
61 |
ebuild. Eventually they will find their way back upstream, but currently |
62 |
this is something gentoo specific, it's about choices. |
63 |
|
64 |
The eclass should just be a reduction of redundant code. And of course |
65 |
its not meant to be a replacement to upstream work on packages with sane |
66 |
buildsystems. Its just a last resort for corner cases like our |
67 |
lapack/blas stuff, which do not have any reasonable option. |
68 |
|
69 |
I hope this clears my intention and makes it reasonable to have this eclass, |
70 |
|
71 |
justin |
72 |
|
73 |
|
74 |
1) |
75 |
https://github.com/andyspiros/numbench/wiki |
76 |
http://andyspiros.wordpress.com/category/google-summer-of-code/ |
77 |
|
78 |
2) |
79 |
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/xml/htdocs/proj/en/miniconf/presentations/miniconf-2012-numbench-spiros.pdf |