IRC channel logs

2023-03-06.log

back to list of logs

<rickmasters>stikonas: I got the bash 5 checksums to match but then autoconf-2.69 fails on Fiwix as part of the automake-1.15.1 build.
<rickmasters>stikonas: autoconf-2.69 complains that the shell is not modern enough but the error message is vague.
<rickmasters>stikonas: I'm trying to figure it out but autotools problems are difficult to track down.
<stikonas[m]>Hmm, bash 5 was added exactly to address that shell is too old problem, strange....
<alethkit>Have you been made aware of guile steel?
<stikonas[m]>rickmasters: also regarding that ext2 image, why do you say it all needs to be in builder-hex0 memory?
<alethkit>It turns out that is now a thing.
<stikonas[m]>It's fiwix ram that we might be running out
<stikonas[m]>That can't be ext2, can it?
<rickmasters>stikonas: builder-hex0 only implements syscalls for the memory file system which is where the ext2 image is created.
<stikonas[m]>Yes, but ext2 image is small
<stikonas[m]>We are not increasing that
<stikonas[m]>Or maybe I and fossy are missing something
<stikonas[m]>Say ext image is 500MiB that fiwix boots with
<rickmasters>It's 1152MB.
<stikonas[m]>Does it mean fiwix will be limited to 1152 MB ram?
<stikonas[m]>Rather than 3 GiB
<stikonas[m]>alethkit: no, haven't heard about guile steel, though I'm not sure why would we need it?
<stikonas[m]>Guile us a soft dependency of GCC, so we need it
<rickmasters>stikonas: Fiwix does have RAM limits but it's not limited by that.
<stikonas[m]>rickmasters: yeah, so we are fine then
<stikonas[m]>Fossy was saying we can have more space in fiwix stage for compikation
<rickmasters>fossy said that Fiwix would eliminate the problem with compilation of large packages like Linux
<stikonas[m]>Right now we are hitting 3GiB limit there
<stikonas[m]>We won't need much more in builder-hex0
<rickmasters>But the ext2 image size limits compilation size and that is limited by what builder-hex0 can squeeze in memory but its already at its limit.
<rickmasters>So, we can handle Linux compilation right now. But adding more packages to sysa could be a problem.
<stikonas[m]>Yes, that's different limit
<stikonas[m]>Fossy said we couldn't add Linux binary package
<stikonas[m]>That wouldn't increase image size
<rickmasters>He said 'However, in the current state, we also need to have disk space available for the compilation process - this is where compiling large packages such as the Linux kernel can become very problematic. With Fiwix it seems we should be able to eliminate this problem.'
<rickmasters>Fiwix can probably use additional partitions and disks yes and that eliminates the problem.
<rickmasters>But if your trying to compile in the sysa ext2 image then the problem is not eliminated because thats limited by builder-hex0 memory.
<rickmasters>His statement was somewhat vague. Compiling large packages such as Linux can be done in various phases.
<alethkit>stikonas[m]: I think it's a scheme that aims to compile to bare metal, so if one could go from hex0 to guile steel, it might be a good idea?
<rickmasters>We may be thinking off different things and talking bas each other.
<alethkit>I was going to work on something like that, but it turns out there's other yaks to shave first.
<rickmasters>change /bas/past
<stikonas[m]>alethkit: hmm, keep in mind it might be hard to go from hex0 to guile steel
<stikonas[m]>At least normal guile is not so simple to build, needs GCC...
<alethkit>it aims to be a low level version
<alethkit>as in: manual memory management, limited TCO
<alethkit>"low-level enough to bootstrap a runtime" is the description given, so...
<stikonas[m]>Maybe then...
<rickmasters>stikonas: I guess I just don't understand exactly what fossy meant that Fiwix would eliminate the problem with available disk space.
<alethkit>And they seem to have not even tried to spread it widely beyond word of mouth
<stikonas[m]>Though you'll find it hard to beat builder-hex0
<stikonas[m]>builder-hex0 is maybe 3KiB in size and already written in hex0
<rickmasters>I guess I need the ELI5 explanation of how Fiwix gets more disk space for compilation beyond the 1152MB that builder-hex0 can prepare for it.
<rickmasters>stikonas: Looks like the autoconf-2.69 failure comes down to a 'test -x /' command failing on Fiwix.
<rickmasters>stikonas: It's classic autotools. This test has nothing to do with the shell, produces no output, and results in a misleading message.
<rickmasters>stikonas: I'll need to track down why that fails. It could be a bash built-in not working right or maybe Fiwix is returning the wrong mode for the root directory
<stikonas[m]>rickmasters: we were thinking that fiwix can create a new ext2 image and boot into it
<rickmasters>stikonas: It could just format it on disk and mount it.
<stikonas[m]>Yes, or that
<stikonas[m]>But it is after builder-hex0
<rickmasters>stikonas: Right- as I commented in the Issue, if Fiwix is formatting another partition or disk then it can go beyond the builder-hex0 ext2 image size.
<rickmasters>It just wasn't clear that fossy was talking about creating a new partition. It was a suggested that you brought up earlier but he didn't make it clear he was talking about that method.
<stikonas[m]>I think that's what he meant
<stikonas[m]>(Based on limitations we are hitting)
<stikonas[m]>As for ext2 size, we can cut it down quite a bit
<stikonas[m]>Just need to install linux-headers from the same tarball as linux
<stikonas[m]>That's the biggest tarball in sysa/distfiles
<rickmasters>Yes, that would reduce memory requirements for builder-hex0 quite a bit but to beat a dead horse, mes uses multiples of that so if memory is the concern we'd need to look at that enevntually.
<rickmasters>Just to reiterate: if we write the builder-hex0 created ext2 image to disk and boot Fiwix off disk, it would need to format a second partition or disk to get more space.
<rickmasters>If we use the ext2 image as a ram drive then it can just format one partition on the disk.
<rickmasters>It's a tradeoff between the complexity of a large ram drive on Fiwix or multiple partitions.
<rickmasters>It seems like multiple partitions is probably the way to go as I'm not comfortable with the large ram drive mods I made to Fiwix.
<rickmasters>I should note that Fiwix would still need to build a lot of stuff to be able to format and mount a disk but it wouldn't need to build Linux for that.
<stikonas[m]>Yeah, I agree, let's not make ram drive too large
<stikonas[m]>And formatting ext2 file system on disk would still allow to compile Linux
<stikonas[m]>Which needs over 1GiB right now
<pder>Regarding the disk space issues in sysa, would it be helpful to have earlier xz decompression, perhaps right after building tcc?
<stikonas>pder: while it would help a tiny bit, it wouldn't be significant gain
<stikonas>we could probably build xz embedded much earlier
<stikonas>but most of the memory is not used by tarballs
<stikonas>pder: actually, in the current case, it might not be helpful at all
<stikonas>because as a hack, we do delete all tarballs from /sysa/distfiles before building the kernel
<pder>ah ok, that makes sense
<stikonas>anyway, it seems we have a various somewhat indepent limits
<stikonas>which was causing some confusion between rickmasters fossy and me
<stikonas>so I think 1. there is a limit of how large builder-hex0 memory usage can be
<stikonas>2. there is a limit on how large fiwix initial ram disk can be (without additional hacks)
<stikonas>3. right now when we run on seed Linux, there is also a 3 GiB limit of memory
<stikonas>so having xz earlier would not help with 3
<stikonas>might even make it worse (additional binary)
<stikonas>though it might help with 1 or 2 (fewer distfiles)
<stikonas>pder: what might actually help and is not too hard is to check where the memory goes to
<stikonas>at least in case 3
<stikonas>I guess in case 1. the biggest offender is mes
<pder>thanks for the explanation. I'm not clear where the sticking point is though, since rickmasters' branch can build all the way to the linux kernel
<pder>Once linux boots either with kexec or through a reboot, aren't we home free in terms of RAM and disk space?
<stikonas>well, 2. is patched out in rickmasters branch
<stikonas>pder: once linux boots we use hard drive extensively for fs, so it's less of an issue
<stikonas>there is still 3GiB RAM limit, but that's only needed to store memory of current processes
<stikonas>rather than all the data
<stikonas>and I think fossy also wanted to "backport" disk usage to fiwix
<stikonas>so that we can stop keeping everything in memory earlier
<rickmasters>There were two issues being mixed together: large compilations impact memory requirements for builder-hex0 and moving compilations to disk allows for even larger compilations but as pder points out that's more theoretical future
<stikonas>and hence all this discussion with some confusions
<stikonas>even on linux we e.g. can't bootstrap rust with mrustc
<stikonas>(as it uses loads of memory and hence needs 64-bit)
<stikonas>rickmasters: still, that example of compiling linux is where limit 3. might matter without affecting 1 and 2
<stikonas>i.e. we could build kernel with more features enabled, etc...
<stikonas>(also create binary linux package)
<rickmasters>stikonas: I don't understand what 3 means. Does compiling Linux get anywhere near 3GB ram limit?
<stikonas>rickmasters: it does
<stikonas>(at least together with all /sysa files that we also keep in memory)
<stikonas>rickmasters: in fact first attempts were taking us over 3 GB RAM limit, so we had to make configuration leaner
<stikonas>which means we are fairly close to the limit
<rickmasters>hmm, Fiwix can build it with 1152MB RAM drive and a 1GB general memory pool, I think -- so were the memory requirements reduced?
<stikonas>rickmasters: compiling linux (including storage of all object files used for linking) needs quite a bit over 1 GiB
<stikonas>hmm, interesting
<stikonas>so on fiwix you use just over 2 GB
<stikonas>rickmasters: unless we actually get less than 3 GB on linux
<rickmasters>stikonas: I think so. I mean Mikaku could answer more about how much memory is available but I thought it was only 1GB
<stikonas>I don't think it's that much runtime memory
<stikonas>my thinking was that it's mostly files
<rickmasters>Right, it fits in 1152 * 1024 * 1024 ram drive