Hello folks,
I'd like to build chdk with parallel make (e.g.: make -j 4 batch-zip), to reduce build time. Juciphox autobuild is set up on a root server with an AMD Opteron dual core CPU, so parallel processing would probably reduce the time quite a bit. (18 minutes at the moment).
Unfortunately it doesnt work right away. First, it didnt work at all as the makefiles in loader/$cam werent suitable for parallel processing, i had to add the line:
$(RESET_FILE): all-recursive
otherwise it would have complained about a missing rule for resetcode/main.bin
Now i'm stuck with irregularly occuring errors like:
setjmp.o lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o
lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o
lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o ltablib.o lmathlib.o loadlib.o linit.o -> liblua.a
arm-elf-ar: setjmp.o: No such file or directory
make[3]: *** [liblua.a] Error 1
Or
../../../../tools/finsig.c:3:20: stdint.h: No such file or directory
../../../../tools/finsig.c:5:20: unistd.h: No such file or directory
../../../../tools/finsig.c:10: error: syntax error before "uint32_t"
../../../../tools/finsig.c:10: warning: no semicolon at end of struct or union
../../../../tools/finsig.c:11: warning: type defaults to `int' in declaration of `fail'
../../../../tools/finsig.c:11: warning: data definition has no type or storage class
../../../../tools/finsig.c:12: error: syntax error before "success"
[.. lot more like that ..]
And sometimes gcc complains about missing gensig.o (I guess that happens when "Cleaning tools/" happens right after compiling gensig.c, so the object file gets removed before the gensig programm gets generated)
Odd thing is, those errors dont happen everytime, and they dont happen for the same cams
if they happen. They just seem to occur randomly. So, overall there seem to be a few of race conditions or missing dependencies. I never wrote or modified a makefile before today, so my skills are quite limited.
Still, i'd like to make it possible to build chdk with parallel make, first to make CHDK compile faster on multi-core platforms, and second.. just for the sake of it.
Some opinions and a little assistance would be really welcome.
Regards,
hacki