You are not logged in.
Pages: 1
I'm curious why parallel builds fail. There are a couple of programs that I know of (gpac, sword) that fail to build when MAKEFLAGS passes a value for -j greater than 1. They're easy to track when it happens (always failing with ld* and never complaining), but I simply want to know why.
Offline
I imagine that the deps in the Makefile aren't quite set correctly, so it tries to link before everything's properly built, but that's just a guess.
Offline
you have to remember, some code are not friendly with more than one job server due to inherent design. and of course, you have to understand what a job server is, besides just being a parallel make.
In a normal, serial invocation GNU make will invoke a command script, then wait for it to complete before proceeding with the next command. In a parallel invocation, we usually need to wait on one of two different events: either a job we already invoked completes, or a new token is made available on the jobserver pipe.
http://make.paulandlesley.org/jobserver.html
Other apps will tell you honestly that they need -j1 to compile. Some don't, but after one failure you would know already.
Last edited by schivmeister (2008-01-28 21:58:13)
I need real, proper pen and paper for this.
Offline
Thanks schivmeister, that was a excellent explanation; Much better than any I found when searching.
Offline
Pages: 1