Gentoo Archives: gentoo-alt

From: Sam Pfeiffer <sammypfeiffer@×××××.com>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] 'Continuous Integration' for Gentoo Prefix?
Date: Tue, 27 Nov 2018 08:38:15
Message-Id: CABVqfw_TZqr0=VQAhpie33cK0swY2fymAnBW21a17ODx_=FRsw@mail.gmail.com
In Reply to: Re: [gentoo-alt] 'Continuous Integration' for Gentoo Prefix? by Fabian Groffen
1 On Tue, Nov 27, 2018 at 7:20 PM Fabian Groffen <grobian@g.o> wrote:
2
3 > I don't want to depress this entire discussion, but it would be really
4 > nice if we could somehow interact with special machines people have at
5 > their company or at home. Prefix needs testing on many different
6 > machines (non-Linux) which usually don't exist in docker images.
7 >
8
9 That's alright, we can use QEMU for some more esoteric hardware platforms,
10 if it's an OS that runs on a normal amd64/x86 computer a Docker image can
11 be built (I'm not an expert but there are images to learn how to do it). Or
12 in the worst case we can create an old-school VM for those weird OS and
13 automate the interaction with it (I did it for a robot by dumping all disk
14 once and creating a VM from it, it worked ok).
15
16
17 >
18 > That said, focussing on the (usually fast) boxes like this to catch
19 > dependency problems and more is useful. In the case below it looks like
20 > the ld-wrapper is having issues. Would it be possible to enter the
21 > environment for that failed run?
22 >
23
24 Glad you see the use of it :) Yeah as I mentioned in the previous mail,
25 having docker installed in your machine, to access that exact environment
26 after the failed bootstrap just do:
27
28 # This will download the image to your machine (it may take a bit of time
29 if its the first time you use docker its around 1GB of data I think)
30 docker pull awesomebytes/gentoo_prefix_latest_image
31 # This will drop you into a shell in that environment, ready to play!
32 docker run -it awesomebytes/gentoo_prefix_latest_image /bin/bash
33
34 When you are done you can just type exit.
35
36
37 >
38 > Thanks,
39 > Fabian
40 >
41 > On 27-11-2018 17:14:19 +1100, Sam Pfeiffer wrote:
42 > > Hello all,
43 > >
44 > > Another little update on my test, it took me a while to find the actual
45 > way to
46 > > increase the timeout to the maximum (or in other words, get out of the
47 > default
48 > > of 60minutes), but I finally found how.
49 > >
50 > > Now I have a job that just tries to bootstrap Gentoo Prefix, the last
51 > run I made
52 > > can be found
53 > > here: [1]
54 > https://dev.azure.com/12719821/12719821/_build/results?buildId=21&view=logs
55 > >
56 > > You can see all the log. In this case it failed after 1h35min. It failed
57 > > compiling GCC 8.2.0-r4.
58 > >
59 > > The error was:
60 > >
61 > > 2018-11-27T03:20:31.7540250Z
62 > >
63 > /tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/./prev-gcc/xg++
64 > >
65 > -B/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/./prev-gcc/
66 > > -B/tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ -nostdinc++
67 > >
68 > -B/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
69 > >
70 > -B/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
71 > > -isystem
72 > >
73 > /tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
74 > > -isystem
75 > >
76 > /tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include
77 > > -isystem
78 > >
79 > /tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/gcc-8.2.0/libstdc++-v3/libsupc++
80 > >
81 > -L/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
82 > >
83 > -L/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
84 > > -no-pie -fno-PIE -m64 -O2 -pipe -O2 -pipe -gtoggle -DIN_GCC
85 > > -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
86 > -Wno-narrowing
87 > > -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
88 > -Woverloaded-virtual
89 > > -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
90 > > -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc gcov.o \
91 > >
92 > > 2018-11-27T03:20:31.7545947Z hash-table.o ggc-none.o libcommon.a
93 > > ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a
94 > > ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -o gcov
95 > >
96 > > 2018-11-27T03:20:31.7670930Z
97 > >
98 > /tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build/./prev-gcc/collect-ld:
99 > > 106: exec: /tmp/gentoo/usr/x86_64-pc-linux-gnu/bin/ld: Invalid argument
100 > >
101 > > 2018-11-27T03:20:31.8025313Z collect2: error: ld returned 2 exit status
102 > >
103 > > 2018-11-27T03:20:31.8026192Z Makefile:2935: recipe for target 'gcov'
104 > failed
105 > >
106 > > In the end of the log we get the usual:
107 > >
108 > > 2018-11-27T03:23:00.8458538Z * ERROR: sys-devel/gcc-8.2.0-r4::gentoo
109 > failed
110 > > (compile phase):
111 > >
112 > > 2018-11-27T03:23:00.8480853Z * emake failed
113 > >
114 > > 2018-11-27T03:23:00.8501574Z *
115 > >
116 > > 2018-11-27T03:23:00.8524914Z * If you need support, post the output of
117 > `emerge
118 > > --info '=sys-devel/gcc-8.2.0-r4::gentoo'`,
119 > >
120 > > 2018-11-27T03:23:00.8550010Z * the complete build log and the output of
121 > `emerge
122 > > -pqv '=sys-devel/gcc-8.2.0-r4::gentoo'`.
123 > >
124 > > 2018-11-27T03:23:00.8572142Z * The complete build log is located at
125 > > '/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/temp/build.log'.
126 > >
127 > > 2018-11-27T03:23:00.8593188Z * The ebuild environment file is located at
128 > > '/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/temp/environment'.
129 > >
130 > > 2018-11-27T03:23:00.8622509Z * Working directory:
131 > > '/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/build'
132 > >
133 > > 2018-11-27T03:23:00.8642956Z * S:
134 > > '/tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/gcc-8.2.0'
135 > >
136 > > 2018-11-27T03:23:02.9054285Z *
137 > >
138 > > 2018-11-27T03:23:02.9078678Z * Please include
139 > >
140 > /tmp/gentoo/var/tmp/portage/sys-devel/gcc-8.2.0-r4/work/gcc-build-logs.tar.bz2
141 > > in your bug report.
142 > >
143 > > The cool thing comes now, how do you actually execute those commands to
144 > fill up
145 > > a bug report?
146 > >
147 > > Easy, in the job I upload a Docker image with the system exactly as it
148 > was after
149 > > the boostrap-prefix.sh command.
150 > >
151 > > So, if anyone wants to debug what is going on, they just need to do
152 > (this works
153 > > right now):
154 > >
155 > > docker pull awesomebytes/gentoo_prefix_latest_image
156 > >
157 > > docker run -it awesomebytes/gentoo_prefix_latest_image /bin/bash
158 > >
159 > > And you are inside of the box:
160 > >
161 > > > user@b70d59ff9703:~$ ls
162 > >
163 > > > bootstrap-prefix.sh start_bootstrap_date.txt
164 > >
165 > > > user@b70d59ff9703:~$ cat start_bootstrap_date.txt
166 > >
167 > > > Tue Nov 27 01:52:20 UTC 2018
168 > >
169 > > > user@b70d59ff9703:~$ ls /tmp/gentoo
170 > >
171 > > > bin etc lib lib64 run sbin stage1.log stage2.log stage3.log
172 > tmp usr
173 > > > var
174 > >
175 > > So you can do those commands suggested by emerge:
176 > >
177 > > /tmp/gentoo/tmp/usr/bin/emerge --info '=sys-devel/gcc-8.2.0-r4::gentoo'
178 > -->
179 > > [2]https://pastebin.com/LWS3Bb7S
180 > >
181 > > /tmp/gentoo/tmp/usr/bin/emerge -pqv '=sys-devel/gcc-8.2.0-r4::gentoo'
182 > > --> [3]https://pastebin.com/gipspmnD
183 > >
184 > > etc.
185 > >
186 > > Or... we could even generate a new bug report automatically from this
187 > will all
188 > > the necessary information, including the instructions on how to get into
189 > this
190 > > box with exactly that state for anyone to help on fixing it.
191 > >
192 > > I'll try to dig further in with things that I find useful (and I hope
193 > you also
194 > > find useful).
195 > >
196 > > Have a nice day!
197 > >
198 > > P.S.: With this I created a bug report easily: [4]
199 > https://bugs.gentoo.org/672042
200 > >
201 > > On Tue, Nov 27, 2018 at 2:07 AM Sam Pfeiffer <[5]sammypfeiffer@×××××.com>
202 > wrote:
203 > >
204 > > > Little update: The full build log is viewable to anyone with the link,
205 > so here
206 > > > you can see the progress of the current job:
207 > >
208 > > > [6]
209 > https://dev.azure.com/12719821/12719821/_build/results?buildId=17&view=logs
210 > >
211 > > > (Or I should say, the log of it, for whenever you open the link).
212 > >
213 > > > On Tue, Nov 27, 2018 at 2:02 AM Sam Pfeiffer <[7]
214 > sammypfeiffer@×××××.com>
215 > > > wrote:
216 > >
217 > > >> Hello everyone,
218 > >
219 > > >> I'm very excited to see you are interested in adding continuous
220 > integration!
221 > >
222 > > >> I don't know that much about continuous integration, I've only used
223 > it (with
224 > > >> systems already setup for me) with in-house Jenkins servers and with
225 > the ROS
226 > > >> buildfarm, based on Travis CI on Github. Also a little bit of Gitlab
227 > CI in my
228 > > >> lab.
229 > >
230 > > >> I did a bit of research/testing.
231 > >
232 > > >> Given it's quite a hassle to maintain custom machines, I'd try to use
233 > some of
234 > > >> the free for opensource CI services. I've checked the conditions of a
235 > few to
236 > > >> see which could fit better:
237 > >
238 > > >> * Gitlab CI: 2000 minutes / month
239 > >
240 > > >> * Travis CI: Unlimited minutes / month. But only 50 minutes long per
241 > step
242 > > >> (like per script executed).
243 > >
244 > > >> * Azure pipelines: Unlimited minutes / month. 360 minutes long per
245 > step (like
246 > > >> per script executed).
247 > >
248 > > >> There are probably many more, but those are the ones I knew about.
249 > >
250 > > >> Given that I wanted to give a try to Azure pipelines. And I did!
251 > >
252 > > >> I created this repo: [8]
253 > https://github.com/awesomebytes/gentoo_prefix_ci_test
254 > >
255 > > >> Where I activated Azure pipelines on it. After around 15min of
256 > reading the
257 > > >> docs and playing around with the web-gui I got my first pipeline
258 > running.
259 > >
260 > > >> As an initial setup I thought I would create a Docker image where I
261 > bootstrap
262 > > >> Gentoo Prefix from a Ubuntu 16.04 (as I'm familiar with it with my
263 > projects).
264 > >
265 > > >> The repo contains two important things:
266 > >
267 > > >> 1) The Dockerfile where I mainly trigger the
268 > > >> bootstrap: [9]
269 > https://github.com/awesomebytes/gentoo_prefix_ci_test/blob/master/Dockerfile
270 > >
271 > > >> 2) The configuration file for Azure pipelines on what to
272 > > >> do: [10]
273 > https://github.com/awesomebytes/gentoo_prefix_ci_test/blob/master/azure-pipelines.yml
274 > >
275 > > >> I've implemented here that it tries to build Gentoo Prefix, and
276 > whatever the
277 > > >> result, it uploads a Docker image to my DockerHub account with the
278 > results.
279 > > >> This implies that:
280 > >
281 > > >> If the bootstrap is successful, one can just [docker pull] and
282 > [docker run]
283 > > >> the image to play with Gentoo Prefix.
284 > >
285 > > >> If the bootstrap is unsuccessful, one can just [docker pull] and
286 > [docker run]
287 > > >> to find oneself in the exact state of the system after the bootstrap
288 > command.
289 > > >> And one can recover the full console log from the Azure pipelines web
290 > > >> interface (even tho it would be nice to find out how to post it
291 > publicly
292 > > >> straight away).
293 > >
294 > > >> If all goes well in a few hours anyone will be able to find in my
295 > DockerHub
296 > > >> account said image (most probably the failed one), just doing:
297 > >
298 > > >> docker pull awesomebytes/gentoo_prefix_latest_image:latest
299 > >
300 > > >> docker run -it gentoo_prefix_latest_image /bin/bash
301 > >
302 > > >> You'll be inside of a Ubuntu 16.04 box with a user called 'user' and
303 > with all
304 > > >> the bootstrapped stuff in /tmp/gentoo.
305 > >
306 > > >> As curiosity, I checked the machines I got served as 'agents' to run
307 > my jobs,
308 > > >> and they were of the kind:
309 > >
310 > > >> CPUs: 2x Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
311 > >
312 > > >> RAM: 7GB
313 > >
314 > > >> Disk: 94GB free disk space
315 > >
316 > > >> More than enough to bootstrap Gentoo Prefix!
317 > >
318 > > >> I don't know if this is the way to go. But at least is interesting to
319 > have it
320 > > >> in mind.
321 > >
322 > > >> On Tue, Nov 27, 2018 at 12:01 AM Benda Xu <[11]heroxbd@g.o>
323 > wrote:
324 > >
325 > > >>> Hi Sam,
326 > >
327 > > >>> Sam Pfeiffer <[12]sammypfeiffer@×××××.com> writes:
328 > >
329 > > >>> > With Azure announcing unlimited minutes on CI/CD for open source
330 > > >>> > projects:
331 > > >>> >
332 > > >>> [13]
333 > https://azure.microsoft.com/en-us/blog/announcing-azure-pipelines-with-unlimited-ci-cd-minutes-for-open-source/
334 > > >>> >
335 > > >>> > Even bootstrapping Gentoo prefix, with pieces of software like gcc
336 > > >>> > taking very long to compile, is possible.
337 > > >>> >
338 > > >>> > The point is: I have been trying to build Gentoo Prefix during the
339 > > >>> > last days after a few months of break since the last time I touched
340 > > >>> > the system. And it's failing. I haven't managed yet to bootstrap it
341 > > >>> > completely. I feel there is no CI/CD setup to catch these issues
342 > and
343 > > >>> > be able to offer a working version of Gentoo Prefix at any time.
344 > >
345 > > >>> I completely agree with you. I hope you can carry on this project to
346 > > >>> setup proper CI for Gentoo Prefix. I am all in for help,
347 > portage/ebuild
348 > > >>> mentoring and coorperation.
349 > >
350 > > >>> A CI for Gentoo Prefix has been on my list for ages. Thank you for
351 > > >>> triggering this.
352 > >
353 > > >>> Yours,
354 > > >>> Benda
355 > >
356 > > >> --
357 > >
358 > > >> Sammy Pfeiffer
359 > > >> PhD Candidate at The Magic Lab within UTS.
360 > >
361 > > > --
362 > >
363 > > > Sammy Pfeiffer
364 > > > PhD Candidate at The Magic Lab within UTS.
365 > >
366 > > --
367 > >
368 > > Sammy Pfeiffer
369 > > PhD Candidate at The Magic Lab within UTS.
370 > >
371 > >
372 > >
373 > > References:
374 > > 1.
375 > https://dev.azure.com/12719821/12719821/_build/results?buildId=21&amp;view=logs
376 > > 2. https://pastebin.com/LWS3Bb7S
377 > > 3. https://pastebin.com/gipspmnD
378 > > 4. https://bugs.gentoo.org/672042
379 > > 5. mailto:sammypfeiffer@×××××.com
380 > > 6.
381 > https://dev.azure.com/12719821/12719821/_build/results?buildId=17&amp;view=logs
382 > > 7. mailto:sammypfeiffer@×××××.com
383 > > 8. https://github.com/awesomebytes/gentoo_prefix_ci_test
384 > > 9.
385 > https://github.com/awesomebytes/gentoo_prefix_ci_test/blob/master/Dockerfile
386 > > 10.
387 > https://github.com/awesomebytes/gentoo_prefix_ci_test/blob/master/azure-pipelines.yml
388 > > 11. mailto:heroxbd@g.o
389 > > 12. mailto:sammypfeiffer@×××××.com
390 > > 13.
391 > https://azure.microsoft.com/en-us/blog/announcing-azure-pipelines-with-unlimited-ci-cd-minutes-for-open-source/
392 > >
393 > > read_char: errno==EILSEQ; invalid byte sequence for UTF-8:
394 > --
395 > Fabian Groffen
396 > Gentoo on a different level
397 >
398
399
400 --
401
402 *Sammy Pfeiffer*
403 PhD Candidate at The Magic Lab within UTS.

Replies

Subject Author
[gentoo-alt] Re: 'Continuous Integration' for Gentoo Prefix? Michael Haubenwallner <haubi@g.o>