IRC channel logs
2021-03-28.log
back to list of logs
<stikonas>fossy: oh, I think I found tcc patch to deal with static inside [] <fossy>feel free to add to tcc-patched <Hagfish>OriansJ: you should sell the NFT of that ;) <Hagfish>seriously though, did you have any more inspiration about picking subgraphs of it? <Hagfish>maybe you could use coloured background regions to represent the "build environment" that a build occurs on (if that can be meaningfully separated from the idea of a dependency) <OriansJ>Hagfish: yes however I'm keeping it simple until I get all the steps documented. <Hagfish>i look forward to seeing what you come up with next <OriansJ>up next is the next autotools/autoconf cluster <OriansJ>at this point I am probably missing dependencies and have a few false dependencies but I am close enough to being done that, I'll fix it later unless someone beats me to it. <OriansJ>and finally all 66 steps are recorded (with some possible errors but should be easy to fix) <OriansJ>darn near 1/2 the graph is just dealing with autoconf and automake <OriansJ>Something tells me when I get M3 working, that graph is going to be ripped down into something much smaller. <Hagfish>66 steps, like the books of the bible <Hagfish>but yeah, M3 will have an interesting effect on that graph <OriansJ>stikonas[m]: sorry for the delay (I have merged your pull request) <stikonas>(that patch was useful anyway, since it allows to drop musl patch) <bauen1>I've also wondered if (maybe once you have stow) it would make sense to build components in their own chroot ? that would require some copying or bind mounts and /sbin/chroot but then you have a clear list of dependencies not just "everything so far" <stikonas>chroot is probably easy to add to 2nd build of coreutils <stikonas>(the one that is built with musl rather than meslibc) <bauen1>that would also put additional requirements into the kernel, but from my experience building a proper vfs (with mount support) should make adding chroot support comparatively easy <bauen1>and you can always copy everything over (but at some point memory will become an issue if you continue down that road) <stikonas>yeah, we are already using a fair bit of memory <bauen1>combine that with stow and basically have a package manager with manual dependency resolution lol <bauen1>is there a way i can rerun rootfs and have it restart at the last failed step ? <bauen1>or at least skip the part before "after" ? <stikonas>you have to cherry-pick pder/overlay commit <stikonas>and if step fails, I often chroot inside and do some manual runs of that step <stikonas>something like bash -c 'set -e; export PREFIX=/after; . helpers.sh; build ...' <bauen1>yes that's what i'm trying to do with musls configure <bauen1>but it seems to succeed even if the step inside run.sh fails :D <bauen1>maybe i had my chroot setup in a slightly different way <bauen1>i should try qemu or normal chroot probably <stikonas>at some point it would be good to check if hashes match with 32 bit kernel <bauen1>does rootfs.sh currently target i386 or x86_64 ? <stikonas>well, it shouldn't matter until at least autotools <bauen1>does the chroot require /proc or /sys ? <stikonas>there with configure I tend to specify --build=i386-unknown-linux-gnu but it's possible that I missed it somewhere <stikonas>bauen1: well, "./rootfs chroot" can set up correct chroot <stikonas>there isn't even /proc or /sys folder inside there <stikonas>even /dev is missing, but we mkdir /dev just before musl <bauen1>right, currently i do that before even reaching musl because you can't mknod inside a user ns <bauen1>so that could be part of my issue <bauen1>also doesn't the chroot "leak" the hosts PATH ? <stikonas>I don't think musl actually needs /dev/null <stikonas>it only fails configure step if /dev is missing altogether <bauen1>it does pipe /dev/null into temporary files to create them <bauen1>it's probably gonna be something really simple and stupid <bauen1>and i think musl 1.1.24 just worked <bauen1>OriansJ: perhaps you could also make an svg of the .dot graph available, that is better if you want to zoom in <bauen1>i think it's actually failing `build musl-1.1.24 binutils-rebuild.sh checksums/pass3 patches-pass3` <bauen1>but running that step from my manual chroot compiles successfully ._. <bauen1>in any case i also have it locally so no big issue <OriansJ>built with: cat live-bootstrap.dot | dot -Tsvgz >| live-bootstrap.svg <OriansJ>sxiv doesn't like it either but mirage does <gforce_de1977>stikonas: bauen1: /proc or /sys is not needed, see ./rootfs.sh minikernel <stikonas>even locally, somehow I find it easier to zoom into PDFs with pdf viewer than into svg with image viewers <stikonas>OriansJ: by the way, all perl's are miniperl up to 5.005 <stikonas>In 5.6 I started statically building some modules (I think not all, only those that are needed by automake) <stikonas>hmm, maybe I didn't try browsers, just normal image viewers <stikonas>and okular with pdf worked better for me... <OriansJ>stikonas: thank you, I'll update accordingly <stikonas>gforce_de1977: yeah, it might be lack of space... <stikonas>I just didn't bother with perl modules until we actually needed them <stikonas>they are not too hard to build, but still makefile is significantly longer <stikonas>also, I'm not sure we actually use coreutils 6.10 that much... <stikonas>coreutils 6 only has very few things built, sha256sum, date and mktemp <stikonas>mktemp is probably used during building of bash... <stikonas>date is probably not used, otherwise it would see build hashes change <stikonas>flex 2.5.11 also has bootstrap stage if I recall correctly <stikonas>OriansJ: any reason for bash to be in eliptic box? <stikonas>in general that live-bootstrap.dot is now fairly accurate <stikonas>oh, a few definitely unnecessary dependencies <stikonas>musl 1.1.24 (binutils self-host) and tcc-0.9.27 (musl self-host) don't use autoconf 2.13 <stikonas>binutils 2.14 needs both autoconf 2.13 and 2.12 <stikonas>anyway, accurate dependencies later in the bootsrap are probably too complicated to plot <OriansJ>stikonas: probably because I forgot to give it a box <OriansJ>but accurate dependencies in the later bootstrap are just a question of taking the time to trace them out <bauen1>OriansJ: or building things in chroots then you know exactly what you need <stikonas>yeah, that's true, but it might still look too complicated in the plot <bauen1>it took **too long** for me to release that not musl-1.1.24.sh is failing but binutils-rebuild.sh <stikonas>and maybe build script is a bit confusingly named <bauen1>stikonas: but with a chroot it becomes much easier to figure out what depends on what, though direct and indirect dependencies will overlap <stikonas>we don't have many indirect dependencies... <stikonas>probably perl is the most common indirect dependency (due to autotools) <OriansJ>clarity through bruteforce is sometimes the best approach. <gforce_de1977>stikonas: i do another build now on qemu with 486 cpu enforced and another kernel and will report <stikonas>we are removing pre-generated files from tarball in that step <stikonas>I don't see why would it not work for you... <stikonas>unless some how it was not unpacked properly <bauen1>so while i'm waiting, would the following be useful: a "upkg" utility that is both a rudimentary package manager and chroot build tool ? it maintains the symlinks in / and a /upkg directory using stow and can be used to build more "packages" in a chroot when given a list of packages (with specified version), a source tree and a build script ? <bauen1>that would require chroot support from the kernel, and maybe bind mounts <bauen1>in theory it could also be used to skip various steps in the bootstrap during development more easily <stikonas>well, I guess you can try and see if it works <bauen1>true, getting live-bootstrap to work for me is a bit of a requirement lol <stikonas>so what failed in binutils-rebuild.sh? is that still with user-ns <bauen1>stikonas: i'm not sure it could just be the line that tests / removes /dev/null i'm waiting for the build right now <stikonas>well, nobody tried running live-bootstrap without root before <stikonas>I guess running it in rootless podman would hit the same problems that you see <OriansJ>sourceforge is not returning heirloom-devtools-070527.tar.bz2 <OriansJ>stikonas: thank you but I agree with bauen1 that using software heritage as a fallback mirror if the checksums fail seem like a good idea. <bauen1>OriansJ: i'm not sure if they particularely like that idea, might be worth asking first <OriansJ>That way if someone finds something in the download, we can't be blamed because it isn't something we are hosting. <OriansJ>bauen1: well doing it that way is certainly an option (I know guix was thinking of doing something similiar themselves a while ago) <OriansJ>hmm 498M for everything downloaded (98.2MB for just the downloaded tars; I'm betting IPFS, torrents and other distribution channels are also options <bauen1>so i've figured out that it gets up to the musl rebuild after binutils steps successfully, so next rebuild <stikonas>well, at this stage for distribution we need something where we can easily change the list of downloads <stikonas>oops, I managed to build xz with tcc but it segfaults <stikonas>hopefully fixable by tweaking configure options <gforce_de1977>stikonas: i'am stuck somehow with debugging: i have an interactive BASH session and can run e.g. <stikonas>are you running it with bash or busybox? <stikonas>there is src_compile function defined in stage1.sh <gforce_de1977>yeah.../after/bin/bash = 347208 bytes and when running it it just says "exit" <gforce_de1977>dumb question: why do we use bashisms? the script really should be posix <stikonas>because we don't have interactive bash at that stage yet <stikonas>first bash is compiled against meslibc and so can't have libreadline <stikonas>bash -c 'export PREFIX=/after; set -e; . helpers.sh; build automake-1.6.3 stage1.sh' <stikonas>I don't think we should run it like that <stikonas>you should check why those files are missing <gforce_de1977>good question, will check and report (~30mins, have to do family stuff) <bauen1>what's the easiest way to create a patch for a source tree ? <bauen1>or rather, is there a better way than git init, git add ., git commit, git format-patch ? <bauen1>oh amazing gnu stow is basically one perl file with autotools used to generate documentation and replace a massive 3 macros inside stow.in before installing it lol <gforce_de1977>stikonas: why are you using asterisks when deleting? why not just the real full path? <gforce_de1977>which files do you want to catch with: */Makefile.in */*/Makefile.in <gforce_de1977>is it: lib/Makefile.in tests/Makefile.in lib/Automake/Makefile.in lib/am/Makefile.in ? <bauen1>but version 2.2.2 should work and doesn't miss too many important things, let me try that <gforce_de1977>ok, tomorrow i will tinker why these are missing after untar <bauen1>so now that i have `user namespaces` instead of `sudo` working, would it be ok to PR that to completely replace to usage of sudo ? <bauen1>it requires unprivileged users to have access user namespaces but i think most major distributions have enabled it by default (debian will switch the default to enabled for the 11 release), maybe arch has yet to do that <stikonas>don't you have to pre-create device node with user namespaces <stikonas>if those cases keep working, I guess that's fine <bauen1>for baremetal linux could be made to auto mount /dev as devtmpfs ? <bauen1>but yeah i suppose it might break those <stikonas>I thought it has to be mounted manually... hmm <stikonas>hmm, I guess depends on when we can use too <stikonas>and actually, I'm not sure how well this would work <stikonas>"Automount devtmpfs at /dev, after the kernel mounted the rootfs" <bauen1>stikonas: rootfs is special in the kernel sense <bauen1>we might not even have a linux as kernel :D <stikonas>This option does not affect initramfs based booting, here the devtmpfs filesystem always needs to be mounted manually after the rootfs is mounted. <stikonas>anyway, I'm not opposed to replace sudo... <stikonas>just need to make sure it doesn't break other stuff