IRC channel logs

2021-01-13.log

back to list of logs

<fossy>mihi: i did successfully build coreutils for mes c library previously, however a few tools had to be omitted
<fossy>and a large number of patches were needed
<mihi>fossy, ok thanks. So I assume for busybox/toybox you would just need an extra number of patches :)
<mihi>s/extra number/extra large number/
<fossy>mihi: i am guessing it would be a very complex job and it would be mostly disfunctional
<mihi>I was toying with it yesterday and my first approach was to stub out all unsupported functions in libbb/platform.c. But when I reached stuff like rename and ctime (used by ls), I would agree that it would be mostly disfunctional.
<mihi>I also tried some things with normal glibc (e.g. stubbing poll to always return 0) and at least for the shells it works. :)
<mihi>not sure if bash also wants poll.
<stikonas>fossy, mihi: do we actually need coreutils this early? I thought we can build gcc 2.95, glibc and then coreutils
<stikonas>anyway, for now we have a few clear candidates that we need to build...
<stikonas>patch, make, bash and try to get autotools
<fossy>stikonas: we need coreutils for configure scripts....
<fossy>and for makrfiles
<fossy>for things like install
<stikonas>oh I see...
<stikonas>well, for manual makefiles we can avoid those, but for autogenerated ones I guess you are right
<stikonas>anyway, let's get patch/make/bash first :)
<OriansJ>mihi: I will add any required primitives to M2libc with the hope that it solves the MesCC and M2-Planet libc problem.
<OriansJ>It is just an incremental process; where something is discovered as being needed and then we add it.
<OriansJ>yt: just to warn you I am going to do a force push to fixup the parallel make in a little bit. Sorry for the inconvience.
<siraben>OriansJ: thanks for the merge, looks like blynn-compiler builds properly again
<Hagfish>nice
<OriansJ>good we probably need to do some tweaks in the Haskell code when I pull out --bootstrap-mode to get you better performance but yt and I need to discuss #if defined to ensure M2-Planet work arounds are isolated and have a clean future elimination path.
<OriansJ>I'm thinking variables like __M2_v1.x or _M2_Pointer_Arith but I'm sure yt has a better idea
***mephista is now known as spicy_icecream
***mephista is now known as spicy_icecream
<siraben>pder: I just realized the prelude blynn uses is here https://crypto.stanford.edu/~blynn/compiler/ , if you click show prelude
<pder>siraben: i think i saw that too, however I think it is for crossly, and wont work with precisely. I think copying a good portion of precisely.hs up to that same point might be a good start for a prelude.
<siraben>I see.
<pder>Do you know of a good way to automatically include the prelude?
<siraben>pder: Hm, looks like we'd need to expose some basic file primitives to Haskell so that we can read the prelude, then adjust the parser to add an includePrelude directive
<pder>Do you know what the bottom part of precisely.hs is for? Starting with the line data CPP = CPPPass...
<gforce_de1977>fossy, pullrequest 9 IMHO breaks it AND breaks my pullrequest: https://github.com/fosslinux/live-bootstrap/pull/9
<siraben>pder: oh it's a preprocessor!
<siraben>if you look at the cpp function it actually does the IO
<gforce_de1977>fossy: updated my pullrequest without the 'echo' statements
<fossy>gforce_de1977: yeah I realised how I broke it
<fossy>how it
<fossy>I have a fix queued, ill push ur PR after I push bash
<gforce_de1977>dumb question: kaem - i dont get the joke: how is the word formed/why? km?
<gforce_de1977>or ist it playing with the chars ok 'make'?
<gforce_de1977>(good morning to everyone!)
<bauen1>if you need a more complete libc before you can build gcc / glibc, you could try building musl with tinycc
<bauen1>of course complex numbers won't work and you will need to patch around a few assembly instructions, but it is possible
<stikonas[m]>musl doesn't build with tinycc...
<stikonas[m]>But maybe you can patch out like you said
<bauen1>stikonas[m]: i'm using musl build using tinycc for myunix :D you do need to patch a number of big components out (like complex numbers) and some minor patches
<gforce_de1977>bauen1: sounds good, can you point us to a patchset or something alike?
<stikonas[m]>I tried and tcc complained about jecxz
<bauen1>gforce_de1977: for myunix v3 currently only exit() works :D i'll take a look at my earlier attempts that went further
<gforce_de1977>bauen1: are you aware of, that 'bauen' means 'to build' in german? 8-)
<stikonas[m]>I tried musl 0.7.9
<bauen1>gforce_de1977: yes, the story behind my name actually goes back to my very first user name "on the internet" when i bought minecraft (which eventually lead to cpu building, then assembly and java)
<bauen1>i'm actually from germany \o/
<gforce_de1977>\O/ 8-)
<bauen1>stikonas[m]: https://github.com/bauen1/myunix/blob/master/toolchain/patches/musl.patch it compiles but is not pretty and i would do so many things differently
<bauen1>stikonas[m]: i'm pretty sure there's bugs in there too, best to start over
<bauen1>stikonas[m]: in any case it boils down to: remove complex numbers (and maybe some other math related things), then rewrite some of the assembly that uses opcodes unsupported by tinycc (or implement them)
<bauen1>stikonas[m]: keep in mind that myunix2 loaded raw binaries not elf files, leading to some pretty terrible things
<bauen1>stikonas[m]: the new musl "port" to myunix v3 is here: https://gitlab.com/myunix/libc/-/compare/v1.2.1...myunix3-libc but currently only the exit syscall is implemented as an example
<fossy>GRR PATCH I HATE YOU
<fossy>keeps dying making temp files
<fossy>i dont get it
<fossy>luckily i've found an alternative solution for now
<fossy>for make
<fossy>but we will need patch for linux kernel
<stikonas>is patch also struggling with mes libc?
<stikonas>fossy: you mentioned that you will fix misplaced asterisk. or should I make a new PR?
<stikonas>ok, thanks for pushing the fix!
<fossy>stikonas: i'm almost 100% it's a missing macro, because guix compiles this successfully
<fossy> https://github.com/fosslinux/live-bootstrap/pull/10 <-- that's my work on patch
<fossy>make builds now, but needs testing
<fossy>spend too long on patch lol
<stikonas>well, you can push it too if it builds
<stikonas>if it doesn't work, it can be fixed in a followon patch
<stikonas>hmm, patch tarball has very strange permissions too...
<gforce_de1977>fossy: question: "catm config.h" ist just the same like 'touch config.h' ?
<stikonas>gforce_de1977: yes, this is just my hack since we don't have touch
<fossy>yes
<fossy>lol
<stikonas>actually, you don't need touch on normal system either
<stikonas>you just do ">config.h"
<fossy>stikonas: i don't really like pushing things im not sure work to master, but i'll push it to a branch once this build finishes
<gforce_de1977>stikonas: that is great and a nice hack!
<gforce_de1977>stikonas: we have no normal system yet 8-)
<stikonas>fossy: util.c also doesn't compile here
<stikonas>(from patch)
<stikonas>oh, maybe because I'm missing something in dev environment
<stikonas>(but the error was error: macro 'geteuid' used with too many args)
<fossy>stikonas: oh what
<fossy>oh
<fossy>whoops
<stikonas>maybe that's why patch is not working?
<fossy>no it's not, it's just something i added in dev environm,ent but not to the kaem script
<stikonas>oh ok...
<fossy>oh not even, a typo lol
<fossy>and..... boom, pushed to patch branch typo fix
<stikonas>yeah, it works
<stikonas>once you said typo, I spotted it too and already tested
<stikonas>fossy: also whitespace, please remove it
<stikonas>in the other command
<stikonas>after dirname.c
<stikonas>version.c:27: error: 'PACKAGE_VERSION' undeclared
<stikonas>need -DPACKAGE_VERSION=\"2.5.9\"
<stikonas>there are more typos in xmalloc.c
<stikonas>-DHAVE_MACLLOC -> -DHAVE_MALLOC
<stikonas>fossy: https://paste.debian.net/1180917/
<stikonas>should have all typos fixed
<fossy>gosh, i must be very tired tonight
<fossy>i did fix version.c too, but i didn't commit that change either
<fossy>fwiw, PATCH_VERSION is not required
<stikonas>with those changes it seems to at least run
<stikonas>oh
<stikonas>only PACKAGE_VERSOIN?
<stikonas>ok
<fossy>ya
<fossy>what did you run?
<stikonas>I ran kaem but outside live environment
<stikonas>with tcc built externally
<fossy>yeah --version works, but when you try to use it to apply a patch it fails (at least inside live env)
<stikonas>it usually finds most of the issues
<fossy>ya
<stikonas>oh ok...
<fossy>it shoudl
<stikonas>yeah ./patch: **** Can't create file /tmp/poizubgaerror 02:
<stikonas>maybe open call fails?
<stikonas>on L203 of util.c
<fossy>I think so
<fossy>But idk why
<stikonas>fossy: it's some define
<stikonas>it works with configure
<stikonas>I can look in more details later
<stikonas>this evening
<stikonas>(my evening, probably very early morning for you)
<fossy>stikonas: yeah thats what I think too
<pder>fossy, is patch possibly failing because it it attempting to write to /tmp within the chroot and that directory doesnt exist?
<stikonas>pder: no, I fixed the problem
<stikonas>fossy: passed the wrong definitions
<stikonas>I had something similar in some of tar/gz/sed/diffutils
<stikonas>pder: you need -DHAVE_FCNTL_H
<stikonas>I had to use it to to get creat function working
<stikonas>pder: in any case patch should be able to create folders
<stikonas>mes libc has mkdir call
<pder>stikonas: that's great, thanks
<stikonas>pder: the fix is on github review suggestions
<stikonas>if you want to try...
<stikonas> https://github.com/fosslinux/live-bootstrap/pull/10#discussion_r556528206 and https://github.com/fosslinux/live-bootstrap/pull/10#discussion_r556526947
<stikonas>pder: and I've got bzip2 (conditional on pder work, so untested in live environment but it should work)
<stikonas>conditional on fossy's work
<stikonas>bzip2 is very easy
<stikonas>and it's newer than bzip2 that I have on my current Gentoo system
<stikonas>so I think we need to do patch -> make -> bzip2 and then we can do bash
<stikonas>or maybe patch -> rebuild tcc with static patch -> make -> bzip2 -> bash
<bauen1>&11
<bauen1>&11
<stikonas>&11?
<stikonas>I've just answered question on SO how GCC is bootstrapped :D https://stackoverflow.com/questions/9429491/how-are-gcc-and-g-bootstrapped/65708958#65708958
<bauen1>stikonas: that's what happens when you have the us keyboard layout selected on a macbook air and try to switch to window 11 in irssi
<stikonas>oh I see...
<bauen1>stikonas: the second time is when you can't believe that you're at fault
<xentrac>stikonas: awesome :)
<xentrac>bauen1: alt-q is &11?
<fossy>stikonas: ahhhh, thanks!!!
<stikonas>fossy: yeah, I've seen something similar before
<stikonas>in some of gzip/tar/sed/diff
<bauen1>xentrac: well, on this keyboard with the german layout when i want to type "/11", i use shift-7 to get the / which is & with the american layout apparently
<fossy>I see
<stikonas>probably tar...
<bauen1>xentrac: alt-number only works for 0-9 :/
<stikonas>fossy: and I'm mostly done with bzip
<stikonas>fossy: assuming you push make...
<stikonas>bzip2 already ships with hand-written makefile and only a small patch is needed to build with tcc
<stikonas>and I tested my patch binary, it managed to apply necessary patch
<fossy>stikonas: you made bzip using make or kaem?
<stikonas>fossy: make, so I'm not making PR yet
<stikonas>I used my system make for now
<stikonas>but I think the one you are bootstrapping will work
<stikonas>that's why adding bzip2 will be just a few-liner
<stikonas>fossy: but maybe once we have patch we can rebuild tcc first?
<stikonas>or maybe after patch+make.... not sure what is easier
<fossy>stikonas: right after patch, i have it queued up
<fossy>stikonas: with that suggested change, it works fine, right?
<stikonas>patch? yes, I tried to apply my multi-file bzip2 patch
<stikonas>and it worked
<fossy>cool, cool
<stikonas>(and one of those files is actually created)
<stikonas>so you can switch back to patching make too
<stikonas>instead of I guess sed'ing it
<stikonas>so, putting up WIP patches up for review works quite well
<fossy>if you want to push your bzip2 to a branch and make a wip pr go ahead
<stikonas>well, I can wait a bit, otherwise it will conflict with your changes to after.kaem.run
<fossy>ah eyah
<stikonas>it's a minor patch anywya
<stikonas>then we can also start downloading tar.bz2
<xentrac>bauen1: on my irssi, alt-qwertyuio are the next 9 windows
<bauen1>xentrac: thanks, that's good to know
<xentrac>bauen1: does it work for you?
<xentrac>or is it some weird thing with my setup?
<stikonas>fossy: this is my untested bzip2 patch https://github.com/stikonas/live-bootstrap/commit/fa3a8b6ee0d4957aa939f44df553bfddfbe2900c
<ericonr>stikonas: you have a typo
<ericonr>get_flie
<stikonas>ericonr: thanks...
<stikonas>like I said it's untested (can't test until make is there)
<stikonas>ok, fixed https://github.com/stikonas/live-bootstrap/commit/bzip2
<stikonas>(and I suspect that it needs rebuilt tcc because I didn't specify "tcc -static". Or alternatively I need to patch CFLAGS further...