1 |
Just a few practical notes on this... |
2 |
|
3 |
On Wed, Mar 12, 2014 at 9:06 AM, Alexandre Rostovtsev |
4 |
<tetromino@g.o>wrote: |
5 |
|
6 |
> > Now, SYSROOT is chosen from multiple conditions. When emerging a |
7 |
> > package, that happens to be "/" and thus results in: |
8 |
> > "//usr/lib/pkgconfig://usr/share/pkgconfig" |
9 |
> |
10 |
|
11 |
Bleh. This is where I obligatorily remind everyone that // != /. POSIX, |
12 |
cygwin, blahblahblah. In short, paths matching the regex "^//[^/]" are |
13 |
trouble, and will eventually force me to fix your code once I get back to |
14 |
gentoo-cygwin hacking. |
15 |
|
16 |
|
17 |
> > Build systems like autotools will pick the crossdev provided |
18 |
> > "i686-pc-linux-gnu-pkg-config" for the 32bit ABI which will in turn |
19 |
> > override the eclass-exported PKG_CONFIG_LIBDIR and now effectively |
20 |
> > find the pkg-config files in /usr/lib64/... |
21 |
> |
22 |
|
23 |
So do Gentoo's own toolchain*.eclasses, breaking many $(tc-getFOO) |
24 |
invocations in non-best multilib-build ABIS for which a matching crossdev |
25 |
target is installed (substituting ${FOO:-$(tc-getFOO)} works-around these |
26 |
problems in every instance I've seen; it probably wouldn't hurt to make |
27 |
such substitutions systematically, when multilib-utizing ebuilds and |
28 |
eclasses). |
29 |
|
30 |
|
31 |
> > This is not a problem most of the time if the package just wants to |
32 |
> > get the libs to link against |
33 |
> |
34 |
|
35 |
lots of "ignoring blahlib.so 'cause it's for the wrong ABI"-type warnings |
36 |
are a good sign your ebuild may have fallen into this rabbit-hole. |
37 |
|
38 |
|
39 |
> |
40 |
> |
41 |
> However, every package that tries to access variables that are |
42 |
> > different between /usr/lib32/pkgconfig/foo.pc and |
43 |
> > /usr/lib64/pkgconfig/foo.pc like "libdir" will fail or produce |
44 |
> > unexpected results. |
45 |
> > |
46 |
> > That already happens for |
47 |
> > x11-libs/libva-vdpau-driver |
48 |
> > x11-libs/libva (https://bugs.gentoo.org/show_bug.cgi?id=500338) |
49 |
> > |
50 |
> > and there are probably more. |
51 |
> |
52 |
|
53 |
"Every" might be too strong, but... yeah, tons. |
54 |
|
55 |
cmake-multilib.eclass, for example, breaks in mind-warpingly subtle and |
56 |
confusing ways on USE="abi_x86_{32,64}" multilib hosts with |
57 |
i686-pc-linux-gnu crossdev installed (when combined with some other issues |
58 |
in that eclass, this results in correct qawarns about ignored ldflags on |
59 |
devel profiles -- an ugly work-around is in my overlay, but I'm not happy |
60 |
with it, so it's been languishing in my rainy-day todo queue. I'd be |
61 |
thrilled to see a solution to the underlying problem, so I don't feel |
62 |
compelled to salvage the ugly parts). |
63 |
|
64 |
As for how to fix it, if foo-bar-baz-quux crossdev targets are at |
65 |
${EROOT}/usr/foo-bar-baz-quux, putting wrappers in |
66 |
${EROOT}/usr/foo-bar-baz-quux/cross-wrappers, or something like that, seems |
67 |
perfectly reasonable... heck, pure speculation, but it might even |
68 |
noticeably speed up day-to-day $PATH searching on systems with lots of |
69 |
crossdev targets installed. |