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