I can’t figure out how to set the -j
flag for building blender.
When run from a cron job to rebuild it, it keeps returning to -j 12
(maximum number of cores).
Any suggestions would be really appreciated.
UPDATE: It turned out there was another schduled job on the system rebuilding blender that was causing this issue.
This doesn’t does work:
/home/user/bin/cron/rebuild-blender-git.sh
#!/usr/bin/env sh
cd /home/user/src/blender-git/blender
make update
cd /home/user/src/blender-git/build_linux
make -j3
NPROCS=3 make
should do the trick, it’s documented in make help
1 Like
Thank you. Sorry, but the cause of the issue turned out to be my oversight. 3 months ago I created another “cron job” (systemd timer) that run make update
and make
without either -j
flag or the environment variable you mentioned. I believe that removing it will solve the issue. I completely forgot about it and it only activated itself after I rebuild blender (in the same directory).
In other word both the script above and your answer should be correct.
yeah it can be a bit confusing, running make in the source folder will need NPROCS to be set, while if you run make in your build folder -j should be used.
1 Like