Tootfinder

Opt-in global Mastodon full text search. Join the index!

@mgorny@social.treehouse.systems
2025-11-09 17:02:23

Yeah, so the GNU #make jobserver protocol is trivial, which can be a blessing and a curse. It puts the job management entirely on the clients, which means that they must reliably return job tokens, or otherwise the jobserver will be left with no jobs available and everything will hang. The make documentation is clear on this:
> Your tool should be sure to write back the tokens it read, even under error conditions. This includes not only errors in your tool but also outside influences such as interrupts (SIGINT), etc. You may want to install signal handlers to manage this write-back.
#NinjaBuild jobserver implementation may not handle this correctly, but fortunately it does. The irony is, it turns out that GNU make does not…
#Gentoo

@rasterweb@mastodon.social
2025-10-31 02:03:12

Do you ever do that thing where you find an STL that might work, but it's not quite right, so you load it up and make some edits, and it's not quite there, so you end up using it as a template to completely redesign your own version from scratch because... that's just what you do?
Me too.
#3DPrinting

@mgorny@social.treehouse.systems
2025-11-07 16:30:55

Did you know that if you run #Gentoo #Portage under a GNU #make jobserver, then the parallel make processes inside will use it, and therefore avoid spawning exponential number of jobs?
Furthermore, #TIL that #Ninja 1.13 implemented the jobserver protocol.
So you hack stuff like:
```
NINJAOPTS= make -j$(nproc) -f - <<<$'all:\n\t emerge -1v --nodep --ask=n --jobs ...'
```
Then quickly:
```
chown portage:portage /tmp/GMfifo*
```
…and all make/ninja jobs inside will run at most nproc jobs total. Note that you need to set NINJAOPTS to an empty value to ensure that no -j is passed, as otherwise it'll ignore the jobserver. And you probably want some -l anyway, for tools that don't support the jobserver.
There's the old request to add proper jobserver into emerge too: bugs.gentoo.org/692576
Another problem is having one jobserver for all emerge processes… but what if I started Xorg inside make…

@mgorny@pol.social
2025-09-26 10:10:48

1. Masz coś prostego do zrobienia. Wydaje się, że #Makefile będzie w sam raz.
2. W sumie warto zrobić to trochę bardziej przenośnie. Makefile będzie trochę bardziej skomplikowany.
3. Skończyłeś. Okazuje się, że jakaś durnowata wbudowana regułka w GNU Make wskakuje i dodaje `rm` na końcu, które kasuje część plików wyjściowych.
4. Użyj Mesona.
Zwykły dzień w

@mgorny@social.treehouse.systems
2025-09-26 10:08:02

1. Have a simple job to do. Figure out #Makefile will do the job.
2. Think a bit about portability. Makefile becomes slightly more complex.
3. You're finally done. It turns out that some stupid implicit rule in GNU Make fires and adds a `rm` at the end that removes part of the output.
4. Use #Meson.
Just an average #Gentoo day.
[UPDATE: Now I regret using Meson. If you do anything that's not 100% boilerplate, it just keeps throwing obstacles in your way.]