[xorg-server] autogen.sh fails after last update.

Adam Jackson ajax at nwnk.net
Mon Oct 3 12:25:52 PDT 2005


On Monday 03 October 2005 11:41, Alan Coopersmith wrote:
> Thanks for catching both these mistakes - I've committed the fixes for them
> now.
>
> As for the SUBDIRS, there are dependencies between some of them that
> require certain ordering - I know for instance scanpci, dummy & os-support
> all have to come before utils since some of the utils link with them (which
> is one of the reasons they still live in the xserver/xorg module instead of
> being broken out).   I don't know all the other inter-dependencies though.

We shouldn't have to know.  That's what make is for.

As I mentioned in bug #4190, this is just a case of recursive make considered 
harmful.  There's a classic paper on the subject, but basically the principle 
is that your dependency tree is a digraph, and by cutting make invocations at 
directory boundaries you reduce each invocation's view of the digraph, such 
that they can not figure out how to update the needed dependencies.  The best 
you can do is move the most-dependended-on objects as early as possible in 
their respective SUBDIRS= line and hope that they get built in time, which 
_will_ fail when you get a sufficiently parallel system.

And it still won't get the dependencies actually right.  Like #4190 says, 
'touch dix/dispatch.c' will rebuild libdix but won't re-link any of the 
servers.  Hooray!

It's a real shame that automake actively encourages this kind of broken 
design.  The real fix (again I'm ripping off Peter Miller's paper here) is to 
do Makefile fragments in each subdir and include them from the parent 
directory's Makefile fragment, terminating at the top-level Makefile.  That 
way the top-level make gets a full view of the dependency tree, and can 
actually get build order correct.  And the build process will get much 
faster, because it will parallelize correctly and you won't be forking 7000 
make instances.  Subtree makes will still need some care but will be no worse 
off than under imake or recursive automake.

Which we should probably have done from the start, but which I don't feel we 
have time to do before 7.0.  Fortunately we can do that transformation 
"outside-in", ie start at the leaf nodes and work our way to the root.  I 
highly encourage us to look at doing that in the 7.1 timeframe.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-modular/attachments/20051003/9f37b9ec/attachment.pgp


More information about the xorg-modular mailing list