KallistiOS icon indicating copy to clipboard operation
KallistiOS copied to clipboard

Some examples will not build with multiple jobs

Open darcagn opened this issue 7 months ago • 3 comments

2ndmix and library seem to frequently error out if examples are built with -j2 or higher. Maybe others too.

For example, with 2ndmix, bin2c errors out:

/opt/toolchains/dc/kos/utils/bin2c/bin2c romdisk.img romdisk_tmp.c romdisk
error: can't open input or output file

causing the project to fail to build:

/opt/toolchains/dc/toolchains/stable/lib/gcc/sh-elf/13.2.0/../../../../sh-elf/bin/ld: romdisk.o:/opt/toolchains/dc/kos/kernel/romdisk/romdiskbase.c:11:(.data.__kos_romdisk+0x0): undefined reference to `romdisk_data'

For library, it fails to build its dependencies in order.

darcagn avatar May 20 '25 17:05 darcagn

@darcagn I can't seem to reproduce...

pcercuei avatar May 22 '25 14:05 pcercuei

#1038 wouldn't fix this issue. bin2c is definitely built before trying to build 2ndmix. The error is that bin2c can't seem to open either romdisk.img or romdisk_tmp.c.

When I build the examples as a whole it mostly seems to happen with 2ndmix, which seemed weird, so I tried with png alone and it's happening there too. It doesn't happen with -j2 but it does happen with -j4. If I go into these dirs and do a make clean && make -j4 repeatedly it's a coin toss if it'll build correctly or not.

I'm thinking it's something like genromfs hasn't finished with romdisk.img before bin2c fires or something, but I haven't dived into it yet.

darcagn avatar May 22 '25 15:05 darcagn

I know, that's why I switched it back to draft (It's probably still a good idea to have it).

The problem is more nasty and I'm working on it.

pcercuei avatar May 22 '25 15:05 pcercuei