Gentoo Archives: gentoo-alt

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-alt] 'Continuous Integration' for Gentoo Prefix? Sam Pfeiffer <sammypfeiffer@×××××.com>