Kernel compiling with -j2+ parameter ends prematurely with no error message or output bzImage

0

I've noticed quite a while ago that compiling a kernel with the parameter -j set to 1 or more doesn't produce a bzImage. Instead, it ends prematurely without any advice. I have reproduced the same behavior in both my netbook and home server.

As far as I'm aware, the point where the compilation stops is random - Compiling twice with the same parameters will probably stop at different files. However, when I run make with no -j* parameter the compilation ends just fine and outputs a working bzImage.

Both machines run Intel Atom (N270 on the netbook and 330 on the server) and I've compiled for these processors. If I recall correctly, I've tried compiling both with Atom and with generic x86_64 options.

The kernel version I'm building is 2.6.34.1

I've always compiled normally with those options in my Core2Duo and Pentium Dual Core machines.

Has anyone experienced this issue? Any ideas why does this happens? Is there a fix or workaround?

YI-78

Posted 2010-07-18T13:53:03.883

Reputation: 3

Answers

0

Premature termination of a parallelized make is almost always caused by insufficient specification of dependencies. Unfortunately the only ways to fix it are to either analyze all the dependencies listed in the Makefile, or to pore over the make output looking for the causes of termination.

Ignacio Vazquez-Abrams

Posted 2010-07-18T13:53:03.883

Reputation: 100 516

The kernel compiles just fine without -j*. I don't belive this is due missing dependencies or anything like it. Maybe some bug in gcc or make, I don't know... No log message is issued - the compiling just stops before finishing. Also, it seems to be intermitent. Today I was able to compile successfully twice with the -j4 option. After the first success, I tried it again and the compiling stopped prematurely and went fine after I removed the -j4 parameter, as usual. – YI-78 – 2010-07-19T13:39:51.607

Of course it's intermittent. How far it gets overall depends on the exact timing between the job runners. – Ignacio Vazquez-Abrams – 2010-07-19T14:25:46.617

3 years later - Thank you for your response. Reading my response, it seems that I didn't quite understand what the -j* option did, but it makes perfect sense now (although it's been more than two years since I last compiled a kernel). I completely forgot about my SuperUser account, sorry for the delay. – YI-78 – 2013-07-01T19:41:55.083