1 |
On Thu 13 Mar 2014 09:55:02 Michał Górny wrote: |
2 |
> Dnia 2014-03-12, o godz. 15:46:01 hasufell napisał(a): |
3 |
> > We have a problem where the crossdev pkg-config wrapper scripts |
4 |
> > interfere with multilib. |
5 |
> > |
6 |
> > crossdev for example sets in their pkg-config wrappers: |
7 |
> > |
8 |
> > PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgco |
9 |
> > nfig" |
10 |
> > |
11 |
> > Now, SYSROOT is chosen from multiple conditions. When emerging a |
12 |
> > |
13 |
> > package, that happens to be "/" and thus results in: |
14 |
> > "//usr/lib/pkgconfig://usr/share/pkgconfig" |
15 |
|
16 |
this behavior is more bug than feature. the preference is to utilize SYSROOT |
17 |
in src_* functions first and ROOT in pkg_* functions. i'll have to see if |
18 |
EBUILD_PHASE is exported to shell scripts ... |
19 |
|
20 |
> > Build systems like autotools will pick the crossdev provided |
21 |
> > "i686-pc-linux-gnu-pkg-config" for the 32bit ABI which will in turn |
22 |
> > override the eclass-exported PKG_CONFIG_LIBDIR and now effectively |
23 |
> > find the pkg-config files in /usr/lib64/... |
24 |
> > |
25 |
> > This is not a problem most of the time if the package just wants to |
26 |
> > get the libs to link against. |
27 |
> > |
28 |
> > However, every package that tries to access variables that are |
29 |
> > different between /usr/lib32/pkgconfig/foo.pc and |
30 |
> > /usr/lib64/pkgconfig/foo.pc like "libdir" will fail or produce |
31 |
> > unexpected results. |
32 |
> > |
33 |
> > That already happens for |
34 |
> > x11-libs/libva-vdpau-driver |
35 |
> > x11-libs/libva (https://bugs.gentoo.org/show_bug.cgi?id=500338) |
36 |
> > |
37 |
> > and there are probably more. |
38 |
|
39 |
there have been reports dating back even longer. e.g. people used crossdev to |
40 |
create i686-pc-linux-gnu and then tried to build sandbox. it's just the |
41 |
number of people hitting this was fairly low (like ~1 a year). and for them, |
42 |
it was possible to just use a diff tuple for their i686 compiler. |
43 |
|
44 |
> Another possible workaround is to make pkgconfig true-multilib. Then it |
45 |
> would own i686-pc-linux-gnu-pkgconfig, and that executable would work |
46 |
> correctly. More than that, we could work on killing the PKG_CONFIG_PATH |
47 |
> hack. |
48 |
|
49 |
that by itself doesn't really help. the wrappers are designed to be used with |
50 |
the respective cross-compiler (SYSROOT by default), not default to the host |
51 |
system. |
52 |
|
53 |
when you run `crossdev i686-pc-linux-gnu`, it owns that tuple. that includes |
54 |
i686-pc-linux-gnu-pkg-config. |
55 |
|
56 |
if we're going to have the multilib system lie and use a tuple that doesn't |
57 |
actually exist, we either: |
58 |
|
59 |
(1) override all the vars so they point back to the real toolchain. |
60 |
this doesn't scale when you consider helper tools like the legacy sdl-config |
61 |
or the extended set of tools that binutils/gcc/etc... install. it's mitigated |
62 |
by the fact the set of vars in play most of the time is low. |
63 |
|
64 |
(2) use tuples with loaded vendor fields to reduce the chance of collisions. |
65 |
e.g. having an ABI=amd64 system use i686-gentoo%multilib-linux-gnu instead of |
66 |
i686-pc-linux-gnu would defeat any automatic path searches. |
67 |
-mike |