1 |
Thanks for reporting all these ! |
2 |
|
3 |
X dej |
4 |
|
5 |
2017-01-24 23:08 UTC+01:00, François Bissey <francois.bissey@×××××××××××××.nz>: |
6 |
> Hi all, |
7 |
> |
8 |
> I now have a working RAP environment on ppc64. |
9 |
> So here is a bit of recipe to achieve this: |
10 |
> * There is no current ppc64 profile, so one has to be |
11 |
> created during stage 1. |
12 |
> I copied the ppc64 from prefix/linux to prefix/linux-standalone. |
13 |
> Replace make.default inside prefix/linux-standalone/ppc64 |
14 |
> by the one in prefix/linux-standalone/amd64. |
15 |
> Copy the "legacy" folder from prefix/linux-standalone/amd64 |
16 |
> to prefix/linux-standalone/ppc64. |
17 |
> |
18 |
> * Make sure help2man is installed on the host system (for bison). |
19 |
> |
20 |
> * I would like the following patch to be considered |
21 |
> for the bootstrap script |
22 |
> --- bootstrap-rap.sh.orig 2017-01-24 12:20:27.304355158 +1300 |
23 |
> |
24 |
> |
25 |
> +++ bootstrap-rap.sh 2017-01-24 12:34:30.325185905 +1300 |
26 |
> |
27 |
> |
28 |
> @@ -1382,8 +1382,8 @@ |
29 |
> |
30 |
> |
31 |
> sys-libs/ncurses |
32 |
> |
33 |
> |
34 |
> sys-libs/readline |
35 |
> |
36 |
> |
37 |
> app-shells/bash |
38 |
> |
39 |
> |
40 |
> - sys-apps/sed |
41 |
> |
42 |
> |
43 |
> app-arch/xz-utils |
44 |
> |
45 |
> |
46 |
> + sys-apps/sed |
47 |
> |
48 |
> |
49 |
> sys-apps/gentoo-functions |
50 |
> |
51 |
> |
52 |
> sys-apps/baselayout-prefix |
53 |
> |
54 |
> |
55 |
> dev-libs/libffi |
56 |
> |
57 |
> |
58 |
> @@ -1511,10 +1511,12 @@ |
59 |
> |
60 |
> |
61 |
> |
62 |
> |
63 |
> |
64 |
> if is-rap ; then |
65 |
> |
66 |
> |
67 |
> # We need ${ROOT}/usr/bin/perl to merge glibc. |
68 |
> |
69 |
> |
70 |
> + PERL_NOT_INSTALLED=0 |
71 |
> |
72 |
> |
73 |
> if [[ ! -x "${ROOT}"/usr/bin/perl ]]; then |
74 |
> |
75 |
> |
76 |
> # trick "perl -V:apiversion" check of |
77 |
> glibc-2.19. |
78 |
> |
79 |
> echo -e "#!${ROOT}/bin/sh\necho |
80 |
> 'apiversion=9999'" > "${ROOT}"/usr/bin/perl |
81 |
> |
82 |
> chmod +x "${ROOT}"/usr/bin/perl |
83 |
> |
84 |
> |
85 |
> + PERL_NOT_INSTALLED=1 |
86 |
> |
87 |
> |
88 |
> fi |
89 |
> |
90 |
> |
91 |
> # Tell dynamic loader the path of libgcc_s.so of stage2 |
92 |
> |
93 |
> |
94 |
> if [[ ! -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf ]]; |
95 |
> then |
96 |
> |
97 |
> @@ -1532,11 +1534,12 @@ |
98 |
> |
99 |
> |
100 |
> |
101 |
> |
102 |
> |
103 |
> BOOTSTRAP_RAP=yes \ |
104 |
> |
105 |
> |
106 |
> emerge_pkgs --nodeps "${pkgs[@]}" || return 1 |
107 |
> |
108 |
> |
109 |
> - rm "${ROOT}"/usr/bin/perl |
110 |
> |
111 |
> |
112 |
> + # Do not mindlessly remove perl. Only if it wasnt |
113 |
> present in the first place. |
114 |
> |
115 |
> + [[ ${PERL_NOT_INSTALLED} == 1 ]] && rm |
116 |
> "${ROOT}"/usr/bin/perl |
117 |
> |
118 |
> else |
119 |
> |
120 |
> |
121 |
> pkgs=( |
122 |
> |
123 |
> |
124 |
> - sys-apps/sed |
125 |
> |
126 |
> |
127 |
> app-arch/xz-utils |
128 |
> |
129 |
> |
130 |
> + sys-apps/sed |
131 |
> |
132 |
> |
133 |
> sys-apps/gentoo-functions |
134 |
> sys-apps/baselayout-prefix |
135 |
> sys-devel/m4 |
136 |
> |
137 |
> The latest version of sed is compressed with xz which |
138 |
> means the bootstrap will fail if xz-utils is not installed |
139 |
> in /bin or /usr/bin. |
140 |
> Newer distro probably have it but not older ones. |
141 |
> So we should move xz-utils before sed. |
142 |
> |
143 |
> The other part of the patch is specific to RAP and is |
144 |
> vexing. RAP adds a fake perl executable before building |
145 |
> glibc in case perl is not already there - and remove it, |
146 |
> unconditionally. So you are here you had a failure in stage3 |
147 |
> after glibc has been merged and then perl has been merged. |
148 |
> You fixed whatever needs fixing and restart the bootstrap |
149 |
> and it removes your perl binary. And then you spend some |
150 |
> time wondering why autoconf failed while emerging something. |
151 |
> So I added a guard - only remove the perl executable if it is |
152 |
> the fake one. I guess that could be improved by actually |
153 |
> checking the file itself for the content of the fake perl. |
154 |
> |
155 |
> * As per another post the current bits to set the RAP glibc |
156 |
> to be used by gcc are not sufficient for ppc64. My profile.bashrc |
157 |
> has the following |
158 |
> if [[ ${CATEGORY}/${PN} == sys-devel/gcc && ${EBUILD_PHASE} == configure |
159 |
> ]]; then |
160 |
> cd "${S}" |
161 |
> einfo "Prefixifying dynamic linkers..." |
162 |
> for h in gcc/config/*/*linux*.h; do |
163 |
> ebegin " Updating $h" |
164 |
> sed -i -r "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" $h |
165 |
> eend $? |
166 |
> done |
167 |
> |
168 |
> |
169 |
> The only change being to the sed line. |
170 |
> |
171 |
> Francois |
172 |
> |
173 |
> |