IRC channel logs

2023-07-14.log

back to list of logs

<stikonas>janneke: so that patch that I was talking to you about a few days ago https://git.stikonas.eu/andrius/mes/commit/3ea282949cc40cacb00fcee1f9c7975c608a1568 is unfortunately not sufficient to fix 32-bit integers
<stikonas>looks like mescc emits movslq_ instead of movzlq_ (a bit later than the previous problem)
<stikonas>perhaps related to the comment in compile.scm ((wrap-as (as info 'long-signed-r)) ; huh, why not long-r?)
<stikonas>yep, that seems to have fixed it
<stikonas>so I think that fixes those 32-bit o functions in tcc, so a bit less patching is needed
<stikonas>(still we have other asserts/segfaults when building meslibc with tcc)
<stikonas>janneke: I've pushed two commits here https://git.stikonas.eu/andrius/mes/commits/branch/wip-riscv
<stikonas>and possibly to bug-mes mailing list
<stikonas>but might be stuck in moderation
<stikonas>ok, emails are also through
<fossy>pder: i was actually just running a build disabling ssp to test the same thing! thanks, i'll apply the patch shortly
<fossy>stikonas[m], doras: i'm quite happy with the implementation in #309 :)
<fossy>01:31 <doras> stikonas: never mind, I figured it out. I was playing with the `SOURCE_DATE_EPOCH` example, which is already exported globally using `export`. So if you "redefine" an exported variable with a `local` variable inside a function, it does not remove it from the exported list and any command executed from the scope of the function (or nested functions) would inherit this "local"
<fossy>environment variable.
<fossy>^ i guess this isn't unexpected behaviour, but that doesn't mean i like it :P
<fossy>declare -x sounds alright to me
<fossy>doras: i tested concurrency *pretty* thoroughly and i run almost every live-bootstrap with --jobs 6, so i hope that there should be few problems
<fossy>doras: regarding Py2.5, do let me know if you run into that again, it looks a lot like a transient dependency issue i've seen pop up a few times in pythons
<fossy>(but never in 2.5.6)
<fossy>pder: I've been looking rather extensively into pregenerated files in nyacc
<fossy>the situation is really quite problematic. locally i have nyacc mach.d being rebuilt using mes straight from the tarball, but the very very large problem is that nyacc's regenerator for mach.d files uses psyntax.pp, which we remove in live-bootstrap because it is a pregenerated file
<fossy>which is where i am very stuck
<fossy>(it was rather easy to have mach.d rebuild.. i just followed the same pattern for mes-use-module used for the rest of nyacc)
<pder>fossy: that is tricky. Is it at all possible to avoid using psyntax?
<pder>If I grep the nyacc 1.00.2 code I see no reference to the string psyntax
<fossy>pder: it's not a direct use (because guile includes psyntax by default), but mes in https://gitlab.com/janneke/mes/-/blob/master/mes/module/nyacc/lalr.mes#L25 includes psyntax for lalr.scm, which is required for https://git.savannah.nongnu.org/cgit/nyacc.git/tree/module/nyacc/lalr.scm#n127 onwards
<fossy>im guessing that the define-syntaxs might be able to be rewritten somehow else, but that is farrr beyond my scheme knowledge
<janneke>stikonas: thanks, and \o/
<doras>fossy: thanks. I'll update if the python build failure happens again.
<doras>fossy: regarding [#309](https://github.com/fosslinux/live-bootstrap/pull/309), would you mind merging it? I have another MR that removes uses of `export` and it would be a shame to run CI twice.
<doras>Well, this is GitHub, so PR* :)
<muurkha>heh
<doras>pder, fossy, stikonas: I see... definitely less segmentation faults with SSP disabled. It seems that `conftest` is still crashing when building glibc, though. Interestingly, I noticed that `conftest` is also crashing in live-bootstrap's own `gcc-13.1.0` bootstrap. It also crashes in `util-linux-2.19.1`, but I think this one isn't new. I'm not sure if these crashes are problematic, but here's the output from coredumpctl:
<doras> https://gitlab.gnome.org/-/snippets/5926/raw/main/conftest-segmentation-faults.txt
<doras>I'm not sure which tests in gcc-13.1.0 result in the crashes, but this is the one causing it in glibc: https://gitlab.gnome.org/-/snippets/5927/raw/main/glibc-conftest-segmentation-fault.txt
<doras>Presumably "checking for assembler and linker STT_GNU_IFUNC support...".
<doras>This is the source for the crashing conftest: https://gitlab.gnome.org/-/snippets/5927/raw/main/glibc-crashing-configure-test.txt
<doras>Taken from ./configure.
<doras>Actually, it seems that `gawk` (which we build, not live-bootstrap) is also crashing:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/512f4565a91d277ab54e963081c5166ea37cc281>)
<doras>When built with live-bootstrap's gcc-13.1.0 with SSP disabled, that is.
<doras>Also some executables that get executed by `help2man` when building `coreutils` crash with a segmentation fault:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/c1093d1b2081fa92f5c76c7e28d283489e9e304d>)
<doras>Here's the build output for that one: https://gitlab.gnome.org/-/snippets/5928/raw/main/coreutils-segmentation-faults.txt
<doras>fossy, stikonas: ended up creating PR without waiting: https://github.com/fosslinux/live-bootstrap/pull/310
<stikonas[m]>fossy: argh, that is annoying regarding nyacc
<stikonas[m]>Maybe update the bug with your findings
<stikonas[m]>Maybe something similar to what mihi did to bootstrap psyntax on guile could work on mes-m2...
<oriansj>stikonas[m]: porting that to mes.c might be a serious test of the interpreter
<stikonas[m]>Indeed... And it's actually mes-m2 not mes
<doras>stikonas: would you say that live-bootstrap supports passing the number of cores to utilize for the bootstrap using the JOBS environment variable, or only through bootstrap.cfg?
<doras>At least for the bwrap/chroot bootstrap modes.
<doras>I'm not sure if environment variables are even passed to child processes at the early stage0-posix stages.
<doras>The issue I have with JOBS being configured in in bootstrap.cfg is that unlike other parameters, it does not (or rather should not, by design) affect the build products of live-bootstrap.
<stikonas[m]>Dor Askayo: just bootstrap.cfg
<stikonas[m]>We don't support environment variables until full kaem
<doras>BuildStream has a concept of a "cache key", which is effectively a hash that takes all build inputs into account and gives the expected build product a unique ID. Same inputs (sources, system, architecture, environment variables, etc.) -> same outputs. This concept is important to be able to share build artifacts through cache servers. For example, if the official project CI (that is authorized to push build artifacts to cache server)
<doras>already built live-bootstrap in the exact configuration as I'm trying to build it locally, a cache servers allows me to download the live-bootstrap artifacts in a matter of a few minutes instead of having to build it myself for hours. This concept is important at scale, when building hundreds of unique components.
<stikonas[m]>So jobs in bootstrap.cfg break cache?
<doras>The only exception BuildStream offers is the ability to avoid inserting specific environment variables into the cache key, which was essentially made with JOBS-like environment variables in mind.
<stikonas[m]>Well, unfortunately JOBS env variable has no way of propagating to child processes in stage0-posix
<stikonas[m]>Perhaps you shouldn't use jobs other than 1?
<stikonas[m]>Or some other fixed number
<doras>stikonas: I'm currently setting it to 1, but this means building live-bootstrap takes around 4x-5x times more than what the CI hardware is capable of (12 cores).
<doras>I would very much like to set it dynamically based on the number of cores in the current system, and to tell BuildStream to avoid this environment variable.
<doras>Though I understand that this is problematic.
<stikonas[m]>Yes, but we can't use env variables early on...
<stikonas[m]>Can you always use 12?
<stikonas[m]>Rather than it being dynamic...
<doras>Using 12 means my system would choke when building locally (I only have 4 cores), and I don't want to compromise on a magic number.
<doras>I'll try to see if there's anything I can do on the BuildStream side to handle this better.
<stikonas>fossy, oriansj: perhaps it's simpler to rewrite that nyacc generator in C?
<stikonas>or does it need a lot of features that we get from scheme?
<mihi>fossy, do you know if these 1 syntax-case and 5 syntax-rules is all that is needed, or rather only the tip of the iceberg?
<mihi>and btw I am not sure whether mes might even have a syntax-rules implementation without psyntax, so it would only be 1 syntax-case (or when looking closer, only two clauses of it)...
<mihi>none of these should be hard to rewrite as define-macro (just tedious), and when trying to bootstrap psyntax.pp, you would definitely need to rewrite more syntax-cases from psyntax.ss to define-macro. (Assuming they are not exactly the same that Guile also uses, in which case you could copy them from my work)
<mihi>of course, if you think mes will be used for more things in live-bootstrap later, "investing" in bootstrapping its psyntax implementation is probably another factor that may offset what the raw number of lines to port suggest.