Bug 24950 - Build of mesa-git fails sometimes (no rule to make target compiler/libr300compiler.a)
Summary: Build of mesa-git fails sometimes (no rule to make target compiler/libr300com...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r300 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: low minor
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-05 15:44 UTC by Konstantin
Modified: 2009-11-17 10:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Output of failing make (32.93 KB, text/plain)
2009-11-05 15:44 UTC, Konstantin
Details
Complete build.log (235.79 KB, text/plain)
2009-11-06 11:39 UTC, Konstantin
Details
Output of emerge --info =media-libs/mesa-9999 (5.33 KB, text/plain)
2009-11-06 13:48 UTC, Konstantin
Details
Build in subdirs before linking driver (1.12 KB, patch)
2009-11-08 12:49 UTC, Dan Nicholson
Details | Splinter Review
build.log with patch by Dan Nicholson (230.79 KB, text/plain)
2009-11-08 15:21 UTC, Konstantin
Details
Really serialize the linking after the subdirs (1.23 KB, patch)
2009-11-09 05:58 UTC, Dan Nicholson
Details | Splinter Review

Description Konstantin 2009-11-05 15:44:27 UTC
Created attachment 30999 [details]
Output of failing make

Problem:
Compiling Mesa (with gcc option -j8) fails sometimes at:
gmake[5]: *** No rule to make target `compiler/libr300compiler.a', needed by `r300_dri.so'.  Stop.
gmake[5]: *** Waiting for unfinished jobs....
while a few lines later it actually is built:
mklib: Making Linux static library:  libr300compiler.a
ar: creating libr300compiler.a

Solution:
Try again until it works.
Comment 1 Konstantin 2009-11-05 17:21:46 UTC
Just wanted to add: This is using the mesa-9999 ebuild from gentoo's x11 overlay.
Comment 2 Konstantin 2009-11-06 11:39:32 UTC
Created attachment 31017 [details]
Complete build.log

This is the complete build.log (former one was truncated)
Comment 3 Konstantin 2009-11-06 13:48:29 UTC
Created attachment 31019 [details]
Output of emerge --info =media-libs/mesa-9999
Comment 4 Öyvind Saether 2009-11-07 16:43:43 UTC
I get the exact same compile FAiL, also (ab)using Gentoo/mesa-9999, when I compile with FEATURES="distcc" and MAKEOPTS="-j10"

A working solution is to compile the MESA with FEATURES="-distcc" and MAKEOPTS="-j1". This increases compile time from about 1 minute to about 3 minutes.

I assume it is possible to make sure the compiler/libr300compiler.a is done before moving on to doing things which require it. (ab)Use -j1 when compiling the MESA until *they* fix it.
Comment 5 Dan Nicholson 2009-11-08 12:49:54 UTC
Created attachment 31050 [details] [review]
Build in subdirs before linking driver

Can you try the attached patch? It should ensure that the subdirs are done building before the driver is linked.
Comment 6 Konstantin 2009-11-08 15:21:29 UTC
Created attachment 31054 [details]
build.log with patch by Dan Nicholson

Nope, the patch didn't help, see attached build.log.

(I named the patch mesa-build-subdirs-first.patch, which is applied at the beginning - I also checked the code for the change)
Comment 7 Dan Nicholson 2009-11-09 05:58:21 UTC
Created attachment 31066 [details] [review]
Really serialize the linking after the subdirs

Sorry, I can't reproduce this, so it's hard to know if the fix is right. Can you try this patch? It should definitely synchronize things.
Comment 8 Konstantin 2009-11-09 08:24:30 UTC
(In reply to comment #7)
> Created an attachment (id=31066) [details]
> Really serialize the linking after the subdirs
> 
> Sorry, I can't reproduce this, so it's hard to know if the fix is right. Can
> you try this patch? It should definitely synchronize things.
> 

This patch seems to have helped, thanks a lot :)
I recompiled at least 7 times and never ran into the problem again, so I'm quite certain (it failed >50% before).
(I left this as NEW to wait for inclusion in master).
Comment 9 Brian Paul 2009-11-17 10:23:55 UTC
Committed to master:  cf65d81cf1eb031384f7e8bfe849ce59c458f27e
Comment 10 Konstantin 2009-11-17 10:42:22 UTC
Commited to Master -> Status: Fixed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.