Compiling legato framework using make with -j option

It seems that for compiling legato user should use a single job mode (-j1). On my machine I had MAKEFLAGS=-j8 which led to problems like:

Using ninja installed at: /bin/ninja
***ERROR: Bad system file build/localhost/system.localhost.update
Try 'systoimg --help' for usage instructions.
make: *** [Makefile:584: stage_systoimg] Error 1
make: *** Waiting for unfinished jobs....

After running make -j1 it compiled well. Perhaps it should be mentioned in the doc?


“make -j1” means that the whole compilation process is done in one job instead of several, and for me doing “make” or “make -j1” is the same.

Have you installed the Linux software (build-essential) available on

And, this issue is happened with a general “make” or for the specific target "make "

I do have all the essentials - after all it was possible to build.

make is not the same as make -j1, because you may have MAKEFLAGS environment variable set which influence process for example adding -j8 like it was in my case. Try to compile with make -j8 to see what happens.

It seems to me that the makefile is missing some dependencies between targets, so when makefile is instructed to run in many jobs it runs all possible target which it “thinks” can be run in parallel where in fact they should not.

The simple solution is to just mention that make should be run without -j option (neither set explicitly or via MAKEFLAGS).

I agree, and that’s what is mentioned on

@mehdiALL1 - I could not find any place mentioning -j option.
The page says:

Run make to build the framework for the target from your Legato Root Directory:
$ make wp85 # makes an update file for a WP85 series device

which will fail if someone has MAKEFLAGS=-j8 set.



Effectively, what I mean, if the -j option is not mentioned so, you don’t need it for the build most of the time