1 |
> On 19 Jan 2022, at 06:35, Mike Frysinger <vapier@g.o> wrote: |
2 |
> |
3 |
> On 17 Jan 2022 11:09, Sam James wrote: |
4 |
>> When -I${SYSROOT} is injected, it'll override the default of -Im4, which |
5 |
>> results in trying to install macros to ${SYSROOT} (a sandbox violation) |
6 |
>> when they can't be found. |
7 |
>> |
8 |
>> From aclocal(1): |
9 |
>> ``` |
10 |
>> -I DIR add directory to search list for .m4 files |
11 |
>> |
12 |
>> --install |
13 |
>> copy third-party files to the first -I directory |
14 |
>> ``` |
15 |
>> |
16 |
>> The first directry is normally -Im4 if anything, whereas when injected |
17 |
>> (when ${SYSROOT} is defined), it ends up being ${SYSROOT}, not m4 (so |
18 |
>> we try to copy macros to somewhere outside of the build directory). |
19 |
> |
20 |
> we should define the semantics we want and bring it upstream to get into |
21 |
> automake. although it seems like ACLOCAL_PATH might work well enough |
22 |
> for us now to switch to that. |
23 |
> |
24 |
> as a stop gap, it seems like the use of --install is pretty low ? we're |
25 |
> cross-compiling about ~2.5k packages in CrOS every day and never seen a |
26 |
> failure here. so the few packages which are running into troubles can |
27 |
> workaround it by setting AT_SYS_M4DIR right ? |
28 |
|
29 |
I've only seen it in the wild with: |
30 |
- app-crypt/tpm2-tss (https://bugs.gentoo.org/756211 <https://bugs.gentoo.org/756211>) |
31 |
- another package which I hit during "normal" use but I'm afraid I can't |
32 |
recall what. I suspect I hit it before Python grew a BDEPEND on autoconf-archive |
33 |
so we're less likely to hit it now. |
34 |
|
35 |
But I accept it's niche. See below though, I think we agree that AT_SYS_M4DIR / |
36 |
system acdir should be satisfactory here. |
37 |
|
38 |
I don't mind keeping the old logic for < EAPI 7 if that'll help you in CrOS though. |
39 |
|
40 |
> |
41 |
>> In EAPI 7+, this is almost always the case! We don't generally expect |
42 |
>> to find macros (particularly things like autoconf-archive) in ${SYSROOT} |
43 |
>> because that's for DEPEND-class dependencies, then they end up being |
44 |
>> copied in unnecessarily and wrongly. |
45 |
> |
46 |
> i think this optimism is misplaced. libraries often install m4 files |
47 |
> which is precisely why this logic is in here. |
48 |
> https://bugs.gentoo.org/677002#c10 <https://bugs.gentoo.org/677002#c10> |
49 |
> |
50 |
> deleting this check will break things. prob more than we're fixing. |
51 |
|
52 |
Sorry, you're absolutely right here! |
53 |
|
54 |
But I think it's addressed by the system-acdir commit that follows it up. |
55 |
|
56 |
i.e. the commit message is totally wrong (and I'll fix this), but the change is correct |
57 |
given we follow it up with seemingly a better way of handling |
58 |
the original case. |
59 |
|
60 |
Does that sound right? |
61 |
|
62 |
Best, |
63 |
sam |