IRC channel logs
2023-01-18.log
back to list of logs
<fossy>stikonas, is there a reason apart from "it didnt work" why we manually go through the autoreconf steps for each subdirectory in gcc 4.7.4? <fossy>i remember that there was a reason, but i can't remember what <fossy>oh- yeah; (i also forgot autoreconf does subdirectories automatically :P) <stikonas[m]>It was a bit annoying to regenerate all those subdirectories but it is what it is... <fossy>it seems we should be able to replace 95% of it with the one autoreconf invocation which is lovely <stikonas>but still progressing to build newer python versions <stikonas>we do have a lot of old python stuff left on sysc filesystem... <fossy>yeah, same thing applies to other packages <fossy>its not too hard to remove if we wish though <stikonas>well, yeah, we could always extend build function to remove some previous package <fossy>yes, disk space is cheap and we use little of it comparatively <fossy>i think sysc is only about 4G at the current end <fossy>i guess it uses more in intermediate stages, but that's irrelevant <stikonas>fossy: hmm, I'm a bit confused python 3.3.7 does not launch if I try to run it mid-build <stikonas>yeah Python 3.4 build seems to be progressing <stikonas>Fatal Python error: Failed to read bytes from /dev/urandom <fossy>it should work, i ahve invoked all of them manually before <fossy>that failed to read bytes may be a bwrap thing, given its using a device <stikonas>yes, but I'm surprised that it 3.4 built <stikonas>we should probably understand this before merging <stikonas>(and I need to do a bit more reviewing anyway, perhaps over weekend there will be more time) <stikonas>I unpacked tarball to my Gentoo system and ir runs fine <stikonas>but bwrap does bind-mount /dev/urandom inside filesystem namespace <fossy>hmm, i'll try running a bwrap build too <fossy>what happens if you cat /dev/urandom > /dev/null <stikonas>(not the build, the build just finished, cat is stuck) <stikonas>and I'm still not sure if we should keep it uppercase Python <stikonas>I unpacked python3.3 package after bootstrap is complete <stikonas>(just unpacked package tarball into random subdir <stikonas>I chrooted into the system while it was running <stikonas>instead I must be doing bwrap with bind mounts <fossy>oh, yeah, uppercase python - i'm ok with changing it. i'll make that change now <ekaitz>fossy: wanna talk via IRC better? <fossy>ekaitz: oh hey! i do not know how i missed you in this channel, i was looking for your IRC handle <ekaitz>fossy: I'm not always connected, that's why you might have issues to find me <stikonas>yes, ekaitz has been here for a while, probably close to 2 years <ekaitz>the name is not a common one lol <stikonas>(before I did the rest of stage0-posix steps) <fossy>i will be tuning into your fosdem talk, ekaitz <fossy>one day i'll go to an in person fosdem, but it would be very expensive for me haha <fossy>(australia flights to europe are Not cheap) <ekaitz>fossy: it's a virtual one, I won't visit fosdem either <ekaitz>you are located in australia! OMG <fossy>oh that's cool, didn't realise they opened up to virtual talks, although i don't follow fosdem very closely apart from the talks <ekaitz>anyway, as a summary stage0-posix -> mes -> tinycc (mes) -> tinycc -> gcc 4.6.4 -> gcc 7.5 -> modern gcc <fossy>7.5 is first gcc w/ upstream riscv? <ekaitz>i backported the 4.6.4 and the tinycc (mes) <ekaitz>but we need to package everything <fossy>reading through your blog, i was unsuprised to see you spent lots of time bashing with build systems <stikonas>somehow I had trouble getting anything newer than gcc 4.0.4 in live-bootstrap <fossy>build systems often cause more strife than the actual code in my experience :P <ekaitz>stikonas: i've been told it can but i still don't believe it <fossy>stikonas: wasn't there something binutils related? <ekaitz>build systems are my limit here, that's why I'm involving more people in the process to help make the chain <ekaitz>also in gcc 4.6.4 there are some things missing surely <stikonas>well gcc 4.6.4 -> gcc 7.5 -> modern gcc should be simple enough <stikonas>it's tinycc -> gcc 4.6.4 step that I'm worried about <ekaitz>we had 2.95 in the middle before <janneke>ekaitz: that's right, but we aren't there yet, notably building the first glibc-2.16 using gcc-4.6.4 still needs work <ekaitz>janneke: these guys in live-bootstrap went with musl maybe that is interesting for us too? <janneke>ekaitz: yes, i've been using musl for debugging mostly <janneke>iwbn if we could do without musl, we need glibc anyways <stikonas>in the worst case you could build glibc later <janneke>and as a prototype bootstrap, certainly <fossy>irc logs indicate that 4.1.2+ was discounted as an option for *some* reason but that reason wasn't elaborated at the time <janneke>yeah, before settling on 2.9.3 and 4.6.4, i tried *many* gcc-3/gcc-4 and glibc versions <stikonas>the 2 reason why we tried to use musl is 1. very simple build system that does not need autoconf/automake (live-bootstrap tries not to use pre-generated files including configure before autoconf/automake are available) 2. You immediately get to resonably new libc and don't need long chain of ancinet->old->new versions <janneke>we would want a minimum of "ancient" packages in the bootstrap <stikonas>though it adds a jump from musl to glibc later on but in guix that should be fairly simple <stikonas>due to installation into /gnu/store prefixes <fossy>yeah, retracing historical steps is not particularly ideal, but is often much faster than custom solutions <stikonas>on a simimar note about ancient packages, at some point I briefly looked at whether we could update some other packages. In particular I looked at tar 1.12 -> 1.13. meslibc is currently unable to build 1.13 though it is only missing a couple of functions <stikonas>but then I got busy with other things, so haven't implemented those <fossy>i think there are many versions that are a bit arbitarily chosen because the time/benefit ratio is quite low to determining the best versions <janneke>there's possibly some patches on wip-gcc4 on my gitlab that could be useful <janneke>stikonas: what benefit does 1.13 bring? <fossy>eg. linux kernel, i chose 4.9.10 out of the 4.9 series almost arbitarily - i knew 4.9.10 worked, 4.9.200 didn't, choose one that works <fossy>could bisect it but it would take a looong time <stikonas>probably nothing critical but let me look at changelog <stikonas>(I possibly wanted to reach the version that understands bz2 without --use-compress-program=bzip2 <fossy>hrm, has compiling tcc mob been investigated before? <fossy>i wonder if that would unlock GCC versions <fossy>although, tcc code is kinda gross, not sure if i would want that can of worms <stikonas>hmm, yes, perhaps 1.13 brings better bzip2 support but anyway, that's a minor thing, it works with --use-compress-program anyway <janneke>a couple of years ago, i tried the bootstrappable-tcc patches on latest tcc git but couldn't get it to work <stikonas>tcc mob might be better for building gcc <fossy>by bootstrappable-tcc patches, the ones applied to 0.9.26? <janneke>you prolly mean bootstrappable-tcc -> tcc-mob (instead of tcc-0.9.27) <fossy>yea or even bootstrappable-tcc -> tcc-0.9.27 -> tcc-mob <stikonas>and it would also be good to long term improve amd64 support <stikonas>otherwise we'll have a problem in 15 years <ekaitz>didn't you guys experience tcc-mob being a little bit... unreliable <stikonas>some ancient stuff is gets broken when clock resets <janneke>yeah, iwbn though to have bootstrappable-tcc patches on latest tcc... <fossy>stikonas: including musl 1.1 series <ekaitz>fossy: lately it didn't pass its own tests in guix <ekaitz>and I have to choose another older commit <fossy>it's the weirdest development model constantly breaking <fossy>that is why i am not sure if i like the option very much <fossy>anyway, i am off to bed, thanks for chatting everyone <ekaitz>i've also had issues with the main dev there being an asshole to me <ekaitz>i wish we had another reasonable c compiler to use instead of tcc tbh <stikonas[m]>Though the problem is of course building the compiler with mescc <ekaitz>i know the project but never payed too much attention to it <ekaitz>> I wrote this code not for me but for first-time readers. <ekaitz>i'll take a look to the code to see if this is actually true :) <ekaitz>it also says the book was supposed to be published in 2021 <ekaitz>lcc is also interesting but probably not for our goals. I bought the book a year ago or so and it's cool but it's focused only in the compilation step (no preprocessor or stuff like that) and it's also focused in speed more than anything else <stikonas>no idea about the book or chibicc, I just found it online <stikonas>you are more familiar with mescc capabilities than me <stikonas>and even if we can go from mescc to chibicc, we still need to find bootstrap path to gcc <ekaitz>probably we won't be able to build gcc with it <ekaitz>unless we go for a 2.95 or something like that <stikonas>doras: yes, I think on x86 there is a bug <stikonas>possibly crashes are not handled correctly <stikonas>might need to investigate it when i have some time <stikonas>doras: could you describe your issue a bit more? <doras>stikonas: we see that build failures in live-bootstrap are detected since "ABORTING HARD" is printed, but we exit code 0 from `kaem-optional-seed`. <stikonas>doras: I could try to take a look but might not have time this weekend <stikonas>doras: any chance you can find out what's the exit status of full kaem? <doras>stikonas: what do we need to use it? <doras>Well, what do we need to change to use it?* <stikonas>so right now we have a proces tree in live-bootstrap <stikonas>there is kaem-optional-seed, that at some point in bootstrap runs full <stikonas>though I think full kaem later execs directly into bash <stikonas>basically what I want, is to get the exit status of child process <stikonas>that kaem-optional processed incorrectly <stikonas>I could try to reproduce it with exec -w <doras>You can see "ABORTING HARD" twice in the outputs. <doras>The first after "Subprocess error 2", which I would guess means the exit status is 2. Though I'm not certain about this one. <doras>The second says "Subprocess error" without 2, which means we lost the exit code somehow? <stikonas>yes, that is because kaem-optional-seed launches full kaem as child process that then launches other stuff <stikonas>"./bootstrap-seeds/POSIX/x86/kaem-optional-seed test.kaem" exits with 0 where test.kaem contains exec -w <stikonas>doras: running live-bootstrap with "./bootstrap-seeds/POSIX/AMD64/kaem-optional-seed kaem.x86" is likely to workaround your issue <stikonas>I'm still not that familiar with aarch64 <doras>stikonas: will running with the AMD64 seed change the hashes of live-bootstrap build products? <stikonas>not a single output hash will be changed, not even intermediate x86 artifacts <doras>stikonas: great. We'll try it. Thanks! :) <doras>Finding bugs in seeds is always fun. <stikonas>oh I was already aware that there is something wrong in x86 result parsing, but I thought it's only triggered on crashes <stikonas>we briefly discussed it with oriansj a couple of weeks ago <pder>fossy, stikonas: I created a pull request for live-bootstrap that eliminates the need for make 3.80 and uses make 3.82 which we use later instead <stikonas>that was on my todo list for some time but never got to it <stikonas>actually make is one of those things that really benefit from newer versions earlier <pder>i havent investigated much yet, but make 3.82 created a slightly different util-linux, which appears to be more correct that with 3.80 <pder>make 3.80 generated an extra file in /usr/share/man/man8 named simply .8 <pder>with make 3.82 that strange file is no longer created <stikonas>hopefully make 3.82 wouldn't cause any new problem for fiwix <stikonas>but given that we run it at the end of bootstrap, it should be fine <pder>is any of the code that builds fiwix pushed anywhere? <stikonas>it's more of a case of live-bootstrap running on fiwix rather than building fiwix at the moment <stikonas>so at this point probably don't worry about fiwix <stikonas>pder: just out of curiousity, have you tried removing second build of make? <stikonas>most likely we want to keep it, but I'm wondering how accurate is that second description in parts.rst <pder>I didn't try eliminating it. The first make build would be with tcc and mes libc, whereas the next make build is with gcc and musl <stikonas>yes, I know, which is it's best to keep it <stikonas>it's also built with autotools and configure, so likely to have more features <pder>Not sure what the random segfaults with make would be, but could be related to memory leaks, especially building something as large as the linux kernel <pder>cool, thanks. now that we have python, what does that unlock? <fossy>stikonas, pder: we do need second make 3.82 build for Linux kernel, for some reason mes version segfaults in dependency resolution <stikonas[m]>fossy: and do you remember what was preventing newer kernel? Binutils? <fossy>stikonas[m]: tbh, i'm not completely sure; i think it was binutils, but it may have been something else <fossy>i am having a lot of difficulty verifying this claim, does anyone know what the story is here? <fossy>we don't bootstrap it in live-bootstrap <sam_>(and needed glib, or bundled it) <sam_>it has no dependencies other than for tests <sam_>i honestly am very confused by that post. he wrote one a few weeks ago about SDL, where he encouraged using sdl2-config. didn't mention pkg-config except in a throwaway line. now he writes a pkg-config impl? <fossy>hm, perhaps we replace pkg-config with pkgconf in live-bootstrap, i'm not a fan of the bundled glib either <sam_>we dropped fd.o pkg-config entirely from gentoo maybe 2 years ago. nobody complained. fixed a bunch of bugs in the process. <sam_>i think debian is finally moving now too <sam_>(we defaulted to pkgconf for years before) <fossy>well, if debian is moving, then i think that's a sign that something's time is finalyl up :P <fossy>hm, do we enable pie/ssp for GCC 10 in live-bootstrap? that would move it in line with modern standards, but i have a feeling mixing pie/non-pie has a fair chance to break things, and 32-bit takes a significant performance hit from ssp - maybe ssp/pie is something we leave for later/to distributions? <stikonas>pkg-config can be built without pkg-config as proven in live-bootstrap <stikonas>we just had to use embedded glib as proper one does need pkg-config <stikonas>fossy: why does mixing pie/non-pie cause problems? <stikonas>I guess the final binary is non position independent <stikonas>as live-bootstrap is not a end-user distro <stikonas>but it only a tool to bootstrap other stuff <sam_>stikonas: yes, the page is nonsense <sam_>i don't think they know much about pkg-config <sam_>my impression is they learned about it in the last week <sam_>(I'm not saying that to be mean, but given they barely mentioned it in the post last week (and promoted an inferior tool) and now this..)