Gentoo Archives: gentoo-dev

From: justin <jlec@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: new eclass - pkgconfig.eclass
Date: Thu, 29 Nov 2012 17:01:39
Message-Id: 50B794C8.30203@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: new eclass - pkgconfig.eclass by Gilles Dartiguelongue
1 On 29/11/12 17:54, Gilles Dartiguelongue wrote:
2 > Le jeudi 29 novembre 2012 à 10:07 +0100, justin a écrit :
3 >> On 29/11/12 09:48, Gilles Dartiguelongue wrote:
4 >>> Le jeudi 29 novembre 2012 à 08:52 +0100, justin a écrit :
5 >>>> Currently we have an eselect module to switch between different
6 >>>> implementations by setting /usr/lib/lib[blas,lapack].so to the selected
7 >>>> implementation.
8 >>>>
9 >>>> This has two drawbacks, which some of you might already of hit:
10 >>>> 1. They seem to be not completely API/ABI compatible (I don't which one
11 >>>> is correct here. And please don't be nitpicking on this point). So
12 >>>> switching would mean recompilation of all packages linked against it
13 >>>> before, otherwise you might get runtime errors. This takes time and
14 >>>> triggers point 2.
15 >>>>
16 >>>> 2. As andy showed we should stick with specific implementations for
17 >>>> specific tasks. The current way flattens this out to be optimal for some
18 >>>> and suboptimal for others.
19 >>>>
20 >>>> Now, there has been a lot of effort around Andy and Sebastien to solve
21 >>>> this problem. The solution is simple: don't install any libblas.so or
22 >>>> liblapack.so in libdir, but instead make the pkg-config module
23 >>>> eselectable and force packages to used pkg-config. Nearly (I think its
24 >>>> 100%) of the packages in the tree already use pkg-config to detect
25 >>>> blas/lapack.
26 >>>
27 >>> I think I understand the problem now. You should not patch/generate .pc
28 >>> files but install them to an implementation specific subdirectory.
29 >>>
30 >>
31 >> If I get you correctly you are assuming that we have pkgconfig files for
32 >> all implementations coming from upstreams. That's not correct, we have
33 >> nearly none. So we need to generate them our own. And yes this need to
34 >> be sent upstream.
35 >>
36 >> That's the reason for the eclass.
37 >>
38 >>> That way, you just have to append that path to PKGCONFIG_PATH when
39 >>> configuring your package using blas and you should be able to
40 >>> transparently select which implementation to get without further
41 >>> patching of either upstream or downstream packages.
42 >>>
43 >>
44 >> This would mean that the pkg maintainer decides the implementation. But
45 >> we leave this choice to the user which works fine. And we have a working
46 >> eselect based solution.
47 >
48 > No, this means you can then use USE flags to select it which is package
49 > manager controlled and usually easier to deal with than eselected stuff.
50 >
51
52 So you mean adding a USE for each implementation to each package which
53 is using one fo blas/cblas/lapack/clapack/lapacke and all the others
54 which I forgot?
55
56 And in the end, we still would need pc files, because version A of
57 implementation X could have different library names then version B.

Attachments

File name MIME type
signature.asc application/pgp-signature