1 |
Hello, |
2 |
|
3 |
On Tue, Nov 7, 2017 at 10:57 PM, Francois Bissey |
4 |
<francois.bissey@×××××××××××××.nz> wrote: |
5 |
> Hi, |
6 |
> |
7 |
>> On 8/11/2017, at 14:47, Benda Xu <heroxbd@g.o> wrote: |
8 |
>> |
9 |
>> Hi François, |
10 |
>> |
11 |
>> Thank you for this detailed report of ppc64 Prefix. The profile of |
12 |
>> ppc64 is not there because we know we donot have support for it. Your |
13 |
>> diagnosis is crucial for us to get ready for it. However, I dont have |
14 |
>> access to ppc64, therefore I will only comment on general issues. |
15 |
>> |
16 |
>> Are you interested in joining our Gentoo Prefix team to support ppc64? |
17 |
>> Your past contributions to Gentoo Science and Prefix are well recognized |
18 |
>> and received. If you would like step up I will be happy to support you |
19 |
>> through the process. |
20 |
>> |
21 |
> |
22 |
> |
23 |
> You are not the first one to try to recruit me :) |
24 |
> I guess I don’t like the interview questions. |
25 |
> I don’t know how long I will have the hardware for. I cannot imagine |
26 |
> having it past June 2018. We probably should look for someone with |
27 |
> power8+ hardware. |
28 |
> |
29 |
>>> 1) baselayout-prefix still doesn't have a suitable ppc64 keyword. This |
30 |
>>> hits fairly early on in stage 2 I think. Vague memories from my |
31 |
>>> previous experience suggested that it wasn't necessary. So I snipped |
32 |
>>> it from the list in bootstrap-rap.sh. Which seemed to be fine until |
33 |
>>> much later, after solving other issues it came back to bite in stage 3 |
34 |
>>> (after I fixed point 3). stage 3 tried to emerge baselayout and it |
35 |
>>> failed. Both variant of baselayout prepare the system for multilib. If |
36 |
>>> installed early enough it will move files around and link {,usr/}lib |
37 |
>>> to {,usr/}lib64 and so on. But it will fail miserably if there is |
38 |
>>> stuff it doesn't know about in {,usr/}lib. Which, at the stage 3 |
39 |
>>> level, is pretty much the case. I manually fixed things and baselayout |
40 |
>>> merged successfully. Should rap use baselayout directly in stage 2? |
41 |
>>> That would solve the keyword problem and match what happens in stage |
42 |
>>> 3. |
43 |
>> |
44 |
>> baselayout-prefix is for prefix-rpath. For prefix-standalone aka. RAP, |
45 |
>> baselayout is used. |
46 |
>> |
47 |
>> Our profiles are no-multilib, which in Gentoo means lib is a symlink to |
48 |
>> lib64. stage 3 baselayout fails if lib already exists and the creation |
49 |
>> of symlink fails. This happens if some package, like gentoo-functions, |
50 |
>> installs into EPREFIX/lib. |
51 |
>> |
52 |
>> The solution is install baselayout in stage3 as early as possible, |
53 |
>> before gentoo-functions. |
54 |
>> |
55 |
> |
56 |
> Well baselayout-prefix is installed at the beginning of stage 2. It is part of |
57 |
> the packages installed by stage 2. I think we should make an exception for it |
58 |
> to be plain baselayout on rap in stage 2 as well as it is in stage 3. |
59 |
> |
60 |
>> https://gitweb.gentoo.org/repo/proj/prefix.git/tree/scripts/bootstrap-prefix.sh#n1614 |
61 |
>> |
62 |
>> |
63 |
>>> 2) gcc 6.4.0 and 5.4.0 failed to bootstrap. Two issues: |
64 |
>>> a) I needed to export LIBRARY_PATH=${EPREFIX}/usr/lib64 |
65 |
>>> (I wonder if it was related to baselayout but I haven't checked) |
66 |
>> |
67 |
>> This does not look good. The logic should have been covered by |
68 |
>> |
69 |
>> export LDFLAGS="-L${ROOT}/usr/$(get_libdir)" |
70 |
>> |
71 |
>> in stage3, |
72 |
>> |
73 |
>> https://gitweb.gentoo.org/repo/proj/prefix.git/tree/scripts/bootstrap-prefix.sh#n1568 |
74 |
>> |
75 |
>>> b) the formula to insert the prefix to the location ld64.so was |
76 |
>>> defeated again by new peculiarity in the gcc/config/rs6000/linux64.h |
77 |
>>> code. I ended up adding the following formula in my own |
78 |
>>> ${EPREFIX}/etc/portage/profile/profile.bashrc |
79 |
>> |
80 |
>>> if [[ ${CATEGORY}/${PN} == sys-devel/gcc && ${EBUILD_PHASE} == |
81 |
>>> configure ]]; then |
82 |
>>> cd "${S}" |
83 |
>>> sed -i |
84 |
>>> "s:%(dynamic_linker_prefix)/lib64/ld64:${EPREFIX}/lib64/ld64:g" \ |
85 |
>>> gcc/config/rs6000/linux64.h |
86 |
>> |
87 |
>>> fi |
88 |
>> |
89 |
>> Yes, this should be fixed. We'd better reuse the DYNAMIC_LINKER_PREFIX |
90 |
>> logic inside rs6000. It was introduced for IBM advanced toolchain. |
91 |
>> |
92 |
> |
93 |
> Funny thing, I tried to use it to my advantage by defining DYNAMIC_LINKER_PREFIX. |
94 |
> And it seemed to do the right thing and was in all the right place that I could think of |
95 |
> in the dump spec but the binaries produced where all lacking the prefix in front |
96 |
> of /lib64/ld64.so. |
97 |
> Which is why I ended doing that particular sed. There must be something more |
98 |
> to do if you want to use DYNAMIC_LINKER_PREFIX. |
99 |
> |
100 |
>>> 3) glibc issues. This is detailed in |
101 |
>>> https://archives.gentoo.org/gentoo-alt/message/1efbc07a12332306715cfaebf38c8897 |
102 |
>> |
103 |
>> I am not sure. Probably glibc has a different set of kernel version |
104 |
>> requirements on ppc64. |
105 |
>> |
106 |
> |
107 |
> I’ll look in the configure script. That seem curious it could ppc only but there |
108 |
> may be a motivation for power8 and over. |
109 |
> |
110 |
>>> The additional issue is that I need also this on ppc: |
111 |
>>> https://patchwork.ozlabs.org/patch/686205/ |
112 |
>> |
113 |
>>> 4) acl/attr not really a prefix issue but I guess it is most likely |
114 |
>>> to show up in that kind of environment. I am sure I complained about |
115 |
>>> other packages doing the same thing before. Those two are a pair because |
116 |
>>> they share the build system. Both identify the primary group with |
117 |
>>> id -g -n |
118 |
>>> which gives you the name of the group instead of the numeric ID. |
119 |
>>> Problem is my group on that system, which is loosely linked to AD is |
120 |
>>> domain users |
121 |
>>> This value is passed to the install command which in turn passes it to |
122 |
>>> the "cp" command which doesn't know what to do with "users". |
123 |
>>> The cure is to use the numeric group ID, either by patching configure |
124 |
>>> (not true autoconf as far as I can tell) to use "id -g" or setting a |
125 |
>>> variable (INSTALL_GROUP I think it was) to that value. |
126 |
>> |
127 |
>> Sorry I don't fully understand why cp fails if supplied with a group |
128 |
>> name. |
129 |
>> |
130 |
> |
131 |
> It is not quoted. If your group name has a space in it, `cp` think the second |
132 |
> part of your group should be a new argument. Can have interesting side effects |
133 |
> depending on the part in question. |
134 |
> Here is what happens: |
135 |
> gmake[1]: Entering directory '/dev/shm/portage/sys-apps/attr-2.4.47-r2/work/attr-2.4.47-abi_ppc_64.ppc64/attr' |
136 |
> ../include/install-sh -o frb15 -g domain users -m 755 -d /shared/work_no_backup/ppc64-prefix/bin |
137 |
> cp: cannot stat 'users': No such file or directory |
138 |
> |
139 |
|
140 |
Thank you for your troubleshooting, I have been trying to set up a RAP |
141 |
installation on GCC's POWER8 machine for some time now. |
142 |
|
143 |
Cheers, |
144 |
R0b0t1 |