Commit 77a650c
Add a "nocc + mdns" distributed compile mode
nocc gained mDNS discovery, so it can now match what "distcc + zeroconf" does:
pick a mode in Settings -> Developer and the board finds its compile helpers on
the LAN instead of being handed a host list.
setup_nocc_host.sh turns advertising on when it sets a box up as a helper. The
nocc package ships with it off -- a server that answers anything on the network
should be a decision rather than a default -- and running that script IS the
decision, since it is what makes the box a helper in the first place. NOCC_MDNS=0
opts out, and re-running with it takes advertising back off.
That script now always restarts nocc-server rather than using "enable --now".
On a host where the helper was already running, --now is a no-op, so the options
it had just edited (the port, and now the mDNS flag) would sit in the env file
while the running server kept serving with its old ones. The nocc package has
the same trap on upgrade, which is why an upgraded helper needs an explicit
restart to actually be running the new binary.
DiscoverNoccHosts asks nocc itself ("nocc-daemon -print-discovered-servers")
instead of browsing with avahi-browse the way the distcc path does. A helper
with more than one interface announces more than one address: a raw browse lists
it twice, which hands that machine a double share of the build (nocc shards
files across the server list by index), and it may pick the address on a subnet
the board cannot reach. Both helpers here announce on two subnets, so that is
the normal case. nocc already resolves each helper to one routable address.
Verified on real boards: a 32-bit client discovered both helpers, sized -j from
them, and compiled through them, producing a correct 32-bit object with no local
fallback. A client whose nocc predates the flag falls back to a local build with
a clear message rather than misparsing anything.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 6ecdcd2 commit 77a650c
3 files changed
Lines changed: 86 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
318 | 343 | | |
319 | | - | |
| 344 | + | |
320 | 345 | | |
321 | 346 | | |
322 | 347 | | |
| |||
369 | 394 | | |
370 | 395 | | |
371 | 396 | | |
372 | | - | |
373 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
374 | 405 | | |
375 | 406 | | |
376 | 407 | | |
| |||
398 | 429 | | |
399 | 430 | | |
400 | 431 | | |
401 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
402 | 437 | | |
403 | 438 | | |
404 | 439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
97 | 124 | | |
98 | 125 | | |
99 | 126 | | |
| |||
120 | 147 | | |
121 | 148 | | |
122 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
123 | 153 | | |
124 | 154 | | |
125 | | - | |
| 155 | + | |
| 156 | + | |
126 | 157 | | |
127 | 158 | | |
128 | 159 | | |
| |||
134 | 165 | | |
135 | 166 | | |
136 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
137 | 171 | | |
138 | 172 | | |
139 | 173 | | |
| |||
160 | 194 | | |
161 | 195 | | |
162 | 196 | | |
163 | | - | |
164 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
165 | 202 | | |
166 | 203 | | |
167 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1714 | 1714 | | |
1715 | 1715 | | |
1716 | 1716 | | |
1717 | | - | |
| 1717 | + | |
1718 | 1718 | | |
1719 | 1719 | | |
1720 | 1720 | | |
| |||
1724 | 1724 | | |
1725 | 1725 | | |
1726 | 1726 | | |
1727 | | - | |
| 1727 | + | |
| 1728 | + | |
1728 | 1729 | | |
1729 | 1730 | | |
1730 | 1731 | | |
| |||
1738 | 1739 | | |
1739 | 1740 | | |
1740 | 1741 | | |
1741 | | - | |
| 1742 | + | |
1742 | 1743 | | |
1743 | 1744 | | |
1744 | 1745 | | |
| |||
0 commit comments