1 |
Hi, |
2 |
|
3 |
In Gentoo Prefix on amd64 host with a no-multilib profile, for |
4 |
packages that inherit multilib multilib-minimal, the multilib-build |
5 |
eclass wraps headers as if multilib were enabled. |
6 |
|
7 |
One example is mpi.h header in sys-cluster/openmpi. I am using a custom |
8 |
modified ebuild, but the differences shouldn't be relevant to this issue. |
9 |
|
10 |
The wrapper is causing problems for me, for reasons that are not |
11 |
relevant here [1]. This question here is whether the wrapping should |
12 |
takes place at all with no-multilib profile. |
13 |
|
14 |
Wrapping happens on amd64 with this profile: |
15 |
gentoo:default/linux/amd64/17.1/no-multilib/prefix/kernel-3.2+ |
16 |
|
17 |
For reference, as expected, no wrapping happens on ppc64le with: |
18 |
gentoo:default/linux/ppc64le/17.0/prefix/kernel-3.2+ |
19 |
|
20 |
The above profile is a parent of my custom profile but this shouldn't be |
21 |
relevant, the custom profile is simple, it just sets compiler flags, |
22 |
package lists, use flags. |
23 |
|
24 |
Diagnosis: multilib-build.eclass wrapps the headers because it is |
25 |
detecting the "abi_flag" as set. So, as far as I understand, it |
26 |
(wrongly?) ends up on the code path for yes-multilib instead of |
27 |
no-multilib: |
28 |
|
29 |
multilib_prepare_wrappers() |
30 |
... |
31 |
if [[ ${MULTILIB_WRAPPED_HEADERS[@]} ]]; then |
32 |
# If abi_flag is unset, then header wrapping is unsupported on |
33 |
# this ABI. This means the arch doesn't support multilib at all |
34 |
# -- in this case, the headers are not wrapped and everything |
35 |
# works as expected. |
36 |
^ I want the case described in this comment, but not happening |
37 |
if [[ ${MULTILIB_ABI_FLAG} ]]; then |
38 |
^ this is set to abi_x86_64.amd64... |
39 |
|
40 |
...because MULTIBUILD_VARIANT is set |
41 |
...because MULTIBUILD_VARIANTS contains the flag |
42 |
...because multilib_get_enabled_abi_pairs() adds it there |
43 |
...because 'use abi_x86_64' evaluates to true |
44 |
...presumably because in gentoo/profies/sarch/amd64/ |
45 |
A. use.force contains abi_x86_64, and/or |
46 |
B. make.defaults sets IUSE_IMPLICIT="abi_x86_64" |
47 |
|
48 |
Workaround: override in my derived profile: |
49 |
1. in make.defaults: USE="-abi_x86_64" |
50 |
2. in use.force: -abi_x86_64 |
51 |
Then, 'use abi_x86_64' evals to false and the header is not wrapped. |
52 |
|
53 |
Before digging deeper, I figured I'd ask whether this is by design to |
54 |
end up doing multilib things with no-multilib profile, or if it's some |
55 |
issue with the way the ebuild is using multilib eclasses. What is |
56 |
the correct way to disable multilib for good? Thanks for any insights. |
57 |
|
58 |
[1] The wrapper does not cover the case when Clang is passed -target |
59 |
le64-unknown-unkown-unknown, which doesn't set the macros for x86_64 |
60 |
that the wrapper checks. I'm not faulting the wrapper, though. |