IRC channel logs

2020-05-30.log

back to list of logs

<marusich>In Guix, to add support for building packages for powerpc64-linux-gnu systems, we are thinking of changing how libstdc++-boot0 is built. Specifically, instead of using gcc-4.9, we would use gcc-7 on this platform only. Does anyone know of any problems this might cause, with respect to bootstrappability?
<marusich>The change would be similar or identical to this: https://gitlab.com/lle-bout/guix/-/commit/77bf6c6685
<fossy>marusich: i dont think there's a probelm, just as long as gcc 4.7 is kept.
<marusich>You mean, kept around as a package? It'd still be used by the other system types.
<fossy>no, the bootstrap needs gcc *4.7*. it's the only way to do it at the moment.
<fossy>not 4.9 :)
<fossy>um, if i remember correctly
<marusich>BTW, I'm asking here because I know gcc-4.9 is kind of special for bootstrapping purposes, and I don't yet have a full mental model of how all the difference parts of the bootstrap path fit together, so it's possible I'm missing info.
<marusich>Not sure. It recall it was 4 something, I think, but I don't know all the details. Something about it being the last version that can be built without C++?
<fossy>ahha https://github.com/oriansj/talk-notes/blob/master/Current%20bootstrap%20map.pdf
<marusich>The reason why gcc 7 is required for bootstrapping on powerpc64-linux-gnu, apparently, is a floating point problem that was fixed only recently, in a gcc 7 version.
<fossy>anything below gash and mescc is irrelevant for guix.
<marusich>For details, search for "float changes" here: http://logs.guix.gnu.org/guix/2020-05-29.log
<fossy>it is 4.7 - it's the last bversion that can be built without c++.
<marusich>Thank you for the link!
<fossy>so, in guix, mescc -> tinycc -> gcc 2 -> gcc 4.7 -> gcc 4.9 -> gcc 9/10/newest, iirc.
<fossy>no probelm!
<fossy>now, the problem with powerpc, is that um.......... tinycc dosen't support powerpc
<fossy>there is still a lot of work to do to get a bootstrap done on powerpc* - most of the low level stuff dosen't support it at all - my recommendation would be not to worry too much about bootstrapping stuff right now, on powerpc* on guix, as there's development in mescc and tinycc that needs doing if you want a full powerpc bootstrap
<fossy>i think guix can cross-compile? so, from the architectures that can be bootstrapped, guix should be able to cross-compile a toolchain that is bootstrapped, which can then be used natively
<fossy>i'm not a guix expert though
<marusich>Yes, that is what we are doing.
<fossy>oh, you are cross-compiling?
<marusich>For the first set of bootstrap binaries, that's how it will be, yes.
<fossy>well, in that case, why even is gcc 7 being used?
<marusich>I'm not sure, actually.
<fossy>why not just jump to gcc 9 or 10, whatever the latest is on guix
<marusich>I was able to cross-compile bootstrap binaries just fine without that commit - i.e., while still using gcc 4.
<marusich>I believe the person mentioned that it becomes an issue when you try to build more packages later.
<fossy>hm, i see
<marusich>I just don't really understand when this package - the libstdc++-boot0 package - is used.
<fossy>is there a problem with going gcc 4.7 -> gcc 7 -> gcc 9?
<marusich>So I'm asking here, to understand a little more about the purpose of the libstdc++-boot0 package, and see what implications there are, if any, for using gcc-7 instead of gcc-4.9 at that point.
<fossy>i'm not sure either, i don't know the intracies of guix's bootstrap system... sorry.
<marusich>Supposedly Guix used to build everything using gcc 7, but I don't know
<fossy>janneke: ping
<marusich>Sorry, I spoke too broadly; supposedly libstdc++-boot0 used to be built using gcc 7, but I don't know for sure.
<marusich>I just want to make sure that if we have to make a change like that, to libstdc++-boot0, that it will not pose a problem for bootstrapping later. It seems like it won't, since it's possible to cross-build the bootstrap binaries for powerpc64-linux-gnu with a 1 line change to the current master branch: https://gitlab.com/lle-bout/guix/-/commits/wip-marusich-be1
<marusich>I think the reason Leo Le Bouter made that change was because they encountered problems later on, while trying to build other packages, using the bootstrap binaries as a base. So we might re-encounter the same issue, and we might need to make the same change. He did this work a year ago, and I am helping him now to merge it into Guix proper.
<marusich>But at this point, to be clear, it is not necessary to modify the package definition of libstdc++-boot0 in order to cross-build bootstrap binaries of powerpc64-linux-gnu from an x86_64-linux Guix installation.
<marusich>I suppose that makes sense, since it's a package in (gnu packages commencement), which is concerned with building stuff after the bootstrap binaries exist.
<marusich>I'm not an expert in the "float issue" I mentioned, but I understand that it is a problem which causes certain pieces of software to fail to build or to malfunction, since the software makes assumptions that are false because of this issue. Anyway, it has been fixed in recent builds of GCC, I hear, apparently gcc-7 and later.
<marusich>Some relevant docs are these, I'm told: https://www.talospace.com/2018/12/the-saga-of-power-isa-128-bit-long.html https://fedoraproject.org/wiki/Changes/PPC64LE_Float128_Transition https://invidious.snopyta.org/watch?v=4FnXpJhmciA https://gcc.gnu.org/wiki/Ieee128PowerPC
<janneke>marusich: yes, like fossy says: <fossy> [03:19:58] is there a problem with going gcc 4.7 -> gcc 7 -> gcc 9?
<janneke>marusich: i guess that for powerpc the inital route would be to "just start" from gcc-7 (gcc-6?)
<janneke>as a more bootstrappable option, i'm hoping that we might backport ppc support to gcc 4.6
<marusich>That makes sense.
<marusich>I don't have a good feel for how difficult it would be to backport the work which was done on gcc 7 for this "double float" problem, to gcc 4. Theoretically, I suppose it might not be even necessary if the software needed to bootstrap from gcc 4 to gcc 7 doesn't suffer from the problem...but it sounds like backporting will be needed.
<janneke>marusich: yes, that would be my hope, that we can bootstrap from gcc-4.x-without-float -> gcc-7
<fossy>it sounds plausible
<janneke>it would be great to get gcc developers on board, creating a bootstrap story for gcc
<marusich>What I found confusing was this: if we define libstdc++-boot0 by passing use gcc-7 to the 'make-libstdc++' procedure, as done in https://gitlab.com/lle-bout/guix/-/commit/77bf6c6685 , then how does gcc-7 even get built...?
<marusich>I guess this package definition isn't using gcc-7 as an input, so maybe that's how.
<marusich>The code here is defining the libstdc++-boot0 package, and it uses the gcc-7 package as its model, by passing it to the make-libstdc++ procedure and inheriting the resultant package... I think I mistakenly assumed that we would need to build gcc-7 in order to build libstdc++-boot0.
<janneke>yeah, it's using its SOURCE only
<janneke>yes, maybe that too
<janneke>that's bootstrapping for you -- circles/loops all the way down
<marusich>So this is basically saying: during commencement, when building the %final-inputs from the bootstrap binaries, instead of using the source etc. for gcc-4.9 to build libstdc++-boot0, use the source etc. from gcc-7
<janneke>and trying to break circles into spirals :-)
<marusich>haha yeah
<marusich>sometimes it makes me feel like my head is going loopy
<janneke>yes (and/or possibly --haven't checked-- some of the recipe/arguments)
<janneke>yes, i have that too :-)
<marusich>I still don't quite understand the implications of using gcc-7 here. Leo only had to make this change here. I don't think he switched to using gcc7 for compiling, for example.
<marusich>but....he did modify the patch files a bit, so maybe it is altering more stuff after all. It's confusing. I'll have to chat with him about this more.
<marusich>I think maybe it will be easier to understand if I am looking at the problem he was solving at the time.
<marusich>So for now...I will postpone thinking about it until it becomes an issue again
<marusich>By the way, it's good to see you again, janneke! I hope you're well.
<janneke>yes, i'm pretty sure that %bootstrap-gcc is gcc-7 and that's what's used
<janneke>marusich: yes thanks! i'm doing very well
<janneke>i'm working with dannym on the arm bootstrap right now (mescc)
<marusich>glad to hear it :)
<janneke>how are you?
<marusich>I am also doing very well, actually
<janneke>it's great to see (you make) powerpc moving forward
<marusich>I finally have a little more time to work on Guix!
<janneke>oh, good!
<marusich>Well, I pulled the trigger and ordered a Blackbird mainboard from Raptor Computing Systems, so now I have more incentive to work on it ;)
<rain1>how is it going?
<marusich>Very excited to put together that machine when it comes
<janneke>good :-)
<marusich>I'm a little scared of all the work I will probably spend tinkering with it, but I hope it'll be a great learning experience, too, since there's a lot of fun looking stuff to help with. For example this bootstrapping stuff.
<marusich>And then someday, I will be able to make yogurt with my power9 pc...someday
<janneke>yes...you can probably imagine that i had no idea whatsoever what i was getting myself into when i started mes 4 years ago
<janneke>but it's been so much fun, learned so much, and made friends
<marusich>That's great! There's definitely a lot to learn. Sometimes it's intimidating to learn about this stuff on my own, so I enjoy being able to speak with people who know more than me about these things. I will probably be asking more questions... :-)
<marusich>I have to go away for the evening - it's nearly 2 am here - but I will see you later!
<janneke>ah, nearly 11am over here, see you!
<OriansJ>vagrantc: sorry for taking so long to react, life has been busy. your fixes have been merged. thank you for your time.