Re: Toybox make root no longer works as expected

Rob Landley <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <[email protected]>
On 4/30/26 01:57, John Paul Adrian Glaubitz wrote:
> Hi,
> 
> On Wed, 2026-04-29 at 09:46 +0200, John Paul Adrian Glaubitz wrote:
>> I'm trying to build a new root image after updating Toybox but that no longer works:
>>
>> glaubitz@node54:/data/home/glaubitz/toybox> make root CROSS=sh2eb-linux-muslfdpic- LINUX=/data/home/glaubitz/sh-linux
>> mkroot/mkroot.sh  -- LINUX=/data/home/glaubitz/sh-linux CROSS=sh2eb-linux-muslfdpic-
>> No ccc symlink to compiler directory.
>> make: *** [Makefile:108: root] Error 1
>> glaubitz@node54:/data/home/glaubitz/toybox>
>>
>> It asks me to create a "ccc" symlink but I have no clue where that link is supposed
>> to point to. The FAQ says the link is supposed to »pointing at a directory full of
>> cross compilers« but I don't have that and that's not my personal setup. I have the
>> cross compilers installed in my home directory and their bin directories added to
>> the PATH variable which has always worked in the past without any problems.
>>
>> Can you explain how that "ccc" symlink works?
> 
> OK, for some reason it works now. Unfortunately, the toolchain doesn't like the current kernel:

The last one I tested was 6.17. I keep meaning to poke at newer but if 
the OS age discrimination stuff takes effect without anybody but me 
fighting back, I'm out.

(Government permission required to reinstall your own devices, with 
$7500 fines per download if you dare post a noncompliant image, modeled 
on texas abortion bounties? That is not a "fun hobby" to participate in. 
China can supply us operating systems along with the hardware. But that 
is Gavin "spyware" Newsom's current law going into effect Jan 1, which I 
100% expect to get wired up to Palantir's Persona/Clear and UEFI Secure 
Boot as soon as this round gets appealed to and re-approved by the 
Roberts supreme court. Because people anonymously organizing against ICE 
via signal made the billionaires uncomfortable.)

>    CC      net/ipv4/inetpeer.o
> during RTL pass: final
> In file included from kernel/nstree.c:8:
> kernel/nstree.c: In function '__se_sys_listns':
> ./include/linux/syscalls.h:261:9: internal compiler error: in change_address_1, at emit-rtl.c:2275
>    261 |         }                                                               \
>        |         ^
> ./include/linux/syscalls.h:236:9: note: in expansion of macro '__SYSCALL_DEFINEx'
>    236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
>        |         ^~~~~~~~~~~~~~~~~
> ./include/linux/syscalls.h:228:36: note: in expansion of macro 'SYSCALL_DEFINEx'
>    228 | #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
>        |                                    ^~~~~~~~~~~~~~~
> kernel/nstree.c:763:1: note: in expansion of macro 'SYSCALL_DEFINE4'
>    763 | SYSCALL_DEFINE4(listns, const struct ns_id_req __user *, req,
>        | ^~~~~~~~~~~~~~~
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <https://gcc.gnu.org/bugs/> for instructions.
> {standard input}: Assembler messages:
> {standard input}: Warning: end of file not at end of a line; newline inserted
> {standard input}:1592: Error: missing operand
> {standard input}:1592: Error: invalid operands for opcode
> {standard input}:976: Error: displacement to undefined symbol .L339 overflows 12-bit field
> {standard input}:1014: Error: displacement to undefined symbol .L459 overflows 12-bit field
> {standard input}:1028: Error: displacement to undefined symbol .L340 overflows 12-bit field
> {standard input}:1040: Error: displacement to undefined symbol .L461 overflows 12-bit field
> {standard input}:1060: Error: displacement to undefined symbol .L462 overflows 12-bit field
> {standard input}:1082: Error: displacement to undefined symbol .L463 overflows 12-bit field
> {standard input}:1100: Error: displacement to undefined symbol .L252 overflows 12-bit field
> {standard input}:1201: Error: displacement to undefined symbol .L286 overflows 12-bit field
> {standard input}:1211: Error: displacement to undefined symbol .L468 overflows 12-bit field
> {standard input}:1221: Error: displacement to undefined symbol .L298 overflows 12-bit field
> {standard input}:1234: Error: displacement to undefined symbol .L469 overflows 12-bit field
> {standard input}:1256: Error: displacement to undefined symbol .L349 overflows 12-bit field
> {standard input}:1341: Error: displacement to undefined symbol .L314 overflows 12-bit field
> {standard input}:1488: Error: displacement to undefined symbol .L454 overflows 8-bit field
> {standard input}:1498: Error: displacement to undefined symbol .L471 overflows 8-bit field
> make[3]: *** [scripts/Makefile.build:289: kernel/nstree.o] Error 1
> make[3]: *** Waiting for unfinished jobs....

You can always bisect that sort of thing to a specific commit, which 
then doesn't always need a root cause or proper fix to avoid 
_triggering_ the problem that didn't used to trigger.

You don't even need mkroot to do it, on most targets the initramfs is 
external (qemu -initrd option) rather than static, and even when it's 
static you can build it ahead of time and feed it in from a fixed 
location. (And almost never need to because about the only thing that 
would change at compile time is offsets, and overflows are RELATIVE 
offsets with a translation unit not long jumps between units. Module 
that --whole-tree stuff which I didn't think the kernel was using 
because it would make module support a huge pain?)

I _think_ I built 7.0 when it came out and it at least compiled for sh4? 
So probably something since then. (Sigh, I should cut a toybox release 
before 
https://osselcna2026.sched.com/event/2JQxw/building-the-simplest-possible-linux-system-rob-landley-hobbyist?iframe=no 
just so I'm providing the simplest explanation, which means I should 
ship 7.0 binaries. Seems kinda pointless if I have to delete it all 
before new year's, but I committed to giving the talk...)

> Adrian

Rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.