Bug 16358 - Mesa from git fails with -j3
Summary: Mesa from git fails with -j3
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-15 03:17 UTC by Mikko C.
Modified: 2009-08-24 12:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
make -j3 with debug (2 bytes, text/plain)
2008-06-22 09:10 UTC, Mikko C.
Details
make -j3 with debug (121.86 KB, text/plain)
2008-06-22 09:11 UTC, Mikko C.
Details

Description Mikko C. 2008-06-15 03:17:37 UTC
Mesa from git fails to install with -j3
It works fine with -j1


make -j3 DESTDIR=/var/tmp/paludis/media-libs-mesa-9999/image/ install                                                        
make[1]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src'                                       
gmake[2]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/glx/x11'                              
gmake -C ../../../src/mesa install-libgl                                                                                     
gmake[3]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa'                                 
sed -e 's,@INSTALL_DIR@,/usr,' -e 's,@LIB_DIR@,lib64,' -e 's,@VERSION@,7.1.0,' gl.pc.in > gl.pc                              
../../bin/minstall -d /var/tmp/paludis/media-libs-mesa-9999/image//usr/include/GL                                            
mklib: Making Linux static library:  libmesa.a                                                                               
../../bin/minstall -m 644 ../../include/GL/*.h \                                                                             
                /var/tmp/paludis/media-libs-mesa-9999/image//usr/include/GL                                                  
mklib: Making Linux static library:  libglapi.a                                                                              
ar: creating libglapi.a                                                                                                      
ar: creating libmesa.a                                                                                                       
(cd drivers && gmake)                                                                                                        
gmake[4]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers'                         
gmake[5]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri'                     
gmake[6]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/swrast'              
../../../../../bin/mklib -ldflags '' -noprefix -o swrast_dri.so \                                                            
                ../../common/driverfuncs.o ../common/utils.o swrast.o swrast_span.o   ../../../../../src/mesa/libmesa.a    -ldrm   -lexpat -lm -lpthread -ldl                                                                                             
mklib: Making Linux shared library:  swrast_dri.so                                                                           
../../../../../bin/minstall swrast_dri.so ../../../../../lib64                                                               
gmake[6]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/swrast'               
gmake[6]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/radeon'              
../../../../../bin/mklib -ldflags '' -noprefix -o radeon_dri.so \                                                            
                ../common/utils.o ../common/texmem.o ../common/vblank.o ../common/dri_util.o ../common/xmlconfig.o ../common/drirenderbuffer.o radeon_context.o radeon_ioctl.o radeon_lock.o radeon_screen.o radeon_state.o radeon_state_init.o radeon_tex.o radeon_texmem.o radeon_texstate.o radeon_tcl.o radeon_swtcl.o radeon_span.o radeon_maos.o radeon_sanity.o   ../../../../../src/mesa/libmesa.a    -ldrm   -lexpat -lm -lpthread -ldl                                                                    
mklib: Making Linux shared library:  radeon_dri.so                                                                           
../../../../../bin/minstall radeon_dri.so ../../../../../lib64                                                               
gmake[6]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/radeon'               
gmake[6]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/r200'                
../../../../../bin/mklib -ldflags '' -noprefix -o r200_dri.so \                                                              
                ../common/utils.o ../common/texmem.o ../common/vblank.o ../common/dri_util.o ../common/xmlconfig.o ../common/drirenderbuffer.o r200_context.o r200_ioctl.o r200_lock.o r200_state.o r200_state_init.o r200_cmdbuf.o r200_pixel.o r200_tex.o r200_texmem.o r200_texstate.o r200_tcl.o r200_swtcl.o r200_span.o r200_maos.o r200_sanity.o r200_fragshader.o r200_vertprog.o radeon_screen.o   ../../../../../src/mesa/libmesa.a    -ldrm   -lexpat -lm -lpthread -ldl                                 
mklib: Making Linux shared library:  r200_dri.so                                                                             
../../../../../bin/minstall r200_dri.so ../../../../../lib64                                                                 
gmake[6]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/r200'                 
gmake[6]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/r300'                
../../../../../bin/mklib -ldflags '' -noprefix -o r300_dri.so \                                                              
                ../common/utils.o ../common/texmem.o ../common/vblank.o ../common/dri_util.o ../common/xmlconfig.o ../common/drirenderbuffer.o radeon_screen.o radeon_context.o radeon_ioctl.o radeon_lock.o radeon_span.o radeon_state.o r300_mem.o r300_context.o r300_ioctl.o r300_cmdbuf.o r300_state.o r300_render.o r300_texmem.o r300_tex.o r300_texstate.o radeon_program.o radeon_program_alu.o r300_vertprog.o r300_fragprog.o r300_fragprog_emit.o r500_fragprog.o r500_fragprog_emit.o r300_shader.o r300_emit.o r300_swtcl.o   ../../../../../src/mesa/libmesa.a    -ldrm   -lexpat -lm -lpthread -ldl                              
mklib: Making Linux shared library:  r300_dri.so                                                                             
../../../../../bin/minstall r300_dri.so ../../../../../lib64                                                                 
gmake[6]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/r300'                 
gmake[5]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri'                      
gmake[4]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers'                          
../../bin/minstall -d /var/tmp/paludis/media-libs-mesa-9999/image//usr/lib64                                                 
../../bin/minstall -d /var/tmp/paludis/media-libs-mesa-9999/image//usr/lib64/pkgconfig                                       
../../bin/minstall ../../lib64/libGL.so* \                                                                                   
                /var/tmp/paludis/media-libs-mesa-9999/image//usr/lib64                                                       
../../bin/minstall -m 644 gl.pc /var/tmp/paludis/media-libs-mesa-9999/image//usr/lib64/pkgconfig                             
gmake[3]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa'                                  
gmake[2]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/glx/x11'                               
gmake[2]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa'                                 
mklib: Making Linux static library:  libglapi.a                                                                              
ar: creating libglapi.a                                                                                                      
mklib: Making Linux static library:  libmesa.a                                                                               
ar: creating libmesa.a                                                                                                       
(cd drivers && gmake)                                                                                                        
gmake[3]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers'                         
gmake[4]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri'                     
gmake[5]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/swrast'              
../../../../../bin/mklib -ldflags '' -noprefix -o swrast_dri.so \                                                            
                ../../common/driverfuncs.o ../common/utils.o swrast.o swrast_span.o   ../../../../../src/mesa/libmesa.a    -ldrm   -lexpat -lm -lpthread -ldl                                                                                             
mklib: Making Linux shared library:  swrast_dri.so                                                                           
../../../../../bin/minstall swrast_dri.so ../../../../../lib64                                                               
gmake[5]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/swrast'               
gmake[5]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/radeon'              
../../../../../bin/mklib -ldflags '' -noprefix -o radeon_dri.so \                                                            
                ../common/utils.o ../common/texmem.o ../common/vblank.o ../common/dri_util.o ../common/xmlconfig.o ../common/drirenderbuffer.o radeon_context.o radeon_ioctl.o radeon_lock.o radeon_screen.o radeon_state.o radeon_state_init.o radeon_tex.o radeon_texmem.o radeon_texstate.o radeon_tcl.o radeon_swtcl.o radeon_span.o radeon_maos.o radeon_sanity.o   ../../../../../src/mesa/libmesa.a    -ldrm   -lexpat -lm -lpthread -ldl                                                                    
mklib: Making Linux shared library:  radeon_dri.so                                                                           
../../../../../bin/minstall radeon_dri.so ../../../../../lib64                                                               
gmake[5]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/radeon'               
gmake[5]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/r200'                
../../../../../bin/mklib -ldflags '' -noprefix -o r200_dri.so \                                                              
                ../common/utils.o ../common/texmem.o ../common/vblank.o ../common/dri_util.o ../common/xmlconfig.o ../common/drirenderbuffer.o r200_context.o r200_ioctl.o r200_lock.o r200_state.o r200_state_init.o r200_cmdbuf.o r200_pixel.o r200_tex.o r200_texmem.o r200_texstate.o r200_tcl.o r200_swtcl.o r200_span.o r200_maos.o r200_sanity.o r200_fragshader.o r200_vertprog.o radeon_screen.o   ../../../../../src/mesa/libmesa.a    -ldrm   -lexpat -lm -lpthread -ldl                                 
mklib: Making Linux shared library:  r200_dri.so                                                                             
../../../../../bin/minstall r200_dri.so ../../../../../lib64                                                                 
gmake[5]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/r200'                 
gmake[5]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/r300'                
../../../../../bin/mklib -ldflags '' -noprefix -o r300_dri.so \                                                              
                ../common/utils.o ../common/texmem.o ../common/vblank.o ../common/dri_util.o ../common/xmlconfig.o ../common/drirenderbuffer.o radeon_screen.o radeon_context.o radeon_ioctl.o radeon_lock.o radeon_span.o radeon_state.o r300_mem.o r300_context.o r300_ioctl.o r300_cmdbuf.o r300_state.o r300_render.o r300_texmem.o r300_tex.o r300_texstate.o radeon_program.o radeon_program_alu.o r300_vertprog.o r300_fragprog.o r300_fragprog_emit.o r500_fragprog.o r500_fragprog_emit.o r300_shader.o r300_emit.o r300_swtcl.o   ../../../../../src/mesa/libmesa.a    -ldrm   -lexpat -lm -lpthread -ldl                              
mklib: Making Linux shared library:  r300_dri.so                                                                             
../../../../../bin/minstall r300_dri.so ../../../../../lib64                                                                 
gmake[5]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/r300'                 
gmake[4]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri'                      
gmake[3]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers'                          
gmake[3]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa'                                 
../../bin/minstall -d /var/tmp/paludis/media-libs-mesa-9999/image//usr/include/GL                                            
cd drivers/dri && gmake install                                                                                              
gmake[4]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri'                     
../../bin/minstall -m 644 ../../include/GL/*.h \                                                                             
                /var/tmp/paludis/media-libs-mesa-9999/image//usr/include/GL                                                  
mklib: Making Linux static library:  libmesa.a                                                                               
gmake[5]: Entering directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/swrast'              
gmake[5]: *** No rule to make target `../../../../../src/mesa/libmesa.a', needed by `swrast_dri.so'.  Stop.                  
gmake[5]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri/swrast'               
gmake[4]: *** [install] Error 1                                                                                              
gmake[4]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa/drivers/dri'                      
gmake[3]: *** [install-dri] Error 2                                                                                          
gmake[3]: *** Waiting for unfinished jobs....                                                                                
ar: creating libmesa.a                                                                                                       
gmake[3]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa'                                  
gmake[2]: *** [install] Error 1                                                                                              
gmake[2]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src/mesa'                                  
make[1]: *** [install] Error 1                                                                                               
make[1]: Leaving directory `/var/tmp/paludis/media-libs-mesa-9999/work/Mesa-9999/src'                                        
make: *** [install] Error 1
Comment 1 Dan Nicholson 2008-06-16 05:43:47 UTC
For some reason it's continuously recreating the static libraries (libmesa.a and libglapi.a), and swrast_dri.so happens to be relinked while one of the libraries is missing.

Does this happen if you run make first before make install? Can you build with the -d option and attach the log? I think there must just be some missing prerequisites, but I can't figure out where.
Comment 2 Brian Paul 2008-06-16 07:45:08 UTC
I think we may have a number of makefile glitches that will be exposed with parallel builds.

If we have a rule like this:

Comment 3 Brian Paul 2008-06-16 07:57:32 UTC
Ignore previous/incomplete comment.

I _thought_ I found the problem but didn't.
Comment 4 Dan Nicholson 2008-06-16 08:02:54 UTC
I agree that there's more than one place where the rules aren't quite parallel safe. But I do -j3 builds all the time, and I never have issues (actually I had one yesterday, but it's in a different spot than the reporter). I think I can determine where the issue is, though, if I see make debug output. But if you beat me to it, great :)
Comment 5 Mikko C. 2008-06-20 09:59:22 UTC
Apparently I'm not able to reproduce this anymore...
You can close the bug. I'll reopen if I can reproduce it again, and attach the debug output.
Comment 6 Mikko C. 2008-06-22 09:09:20 UTC
ok, it failed again... this time I had debug enabled, so it's more detailed.

I hope it's enough as I couldn't go past that in the console.

Also, *if* it succeeds building with -j3, it often happens that either r300_dri.so or swrast_dri.so are damaged/not complete (notice the that both sizes vary, -j1 is the good one):

(with -j1) $ ls -la
total 9480
drwxr-xr-x  2 root root    4096 2008-06-22 17:52 .
drwxr-xr-x 81 root root   69632 2008-06-22 17:52 ..
-rwxr-xr-x  1 root root 2485352 2008-06-22 17:52 r200_dri.so
-rwxr-xr-x  1 root root 2466984 2008-06-22 17:52 r300_dri.so
-rwxr-xr-x  1 root root 2440008 2008-06-22 17:52 radeon_dri.so
-rwxr-xr-x  1 root root 2215144 2008-06-22 17:52 swrast_dri.so


(with -j3) $ ls -la
total 7416
drwxr-xr-x  2 root root    4096 2008-06-22 17:49 .
drwxr-xr-x 81 root root   69632 2008-06-22 17:49 ..
-rwxr-xr-x  1 root root 2485352 2008-06-22 17:49 r200_dri.so
-rwxr-xr-x  1 root root 2466984 2008-06-22 17:49 r300_dri.so
-rwxr-xr-x  1 root root 2440008 2008-06-22 17:49 radeon_dri.so
-rwxr-xr-x  1 root root  101040 2008-06-22 17:49 swrast_dri.so

(with -j3) $ ls -la
total 7064                        
drwxr-xr-x  2 root root    4096 2008-06-22 17:28 .
drwxr-xr-x 81 root root   69632 2008-06-22 17:38 ..
-rwxr-xr-x  1 root root 2485352 2008-06-22 17:28 r200_dri.so
-rwxr-xr-x  1 root root       0 2008-06-22 17:28 r300_dri.so
-rwxr-xr-x  1 root root 2440008 2008-06-22 17:28 radeon_dri.so
-rwxr-xr-x  1 root root 2215144 2008-06-22 17:28 swrast_dri.so
Comment 7 Mikko C. 2008-06-22 09:10:00 UTC
Created attachment 17295 [details]
make -j3 with debug
Comment 8 Mikko C. 2008-06-22 09:11:34 UTC
Created attachment 17296 [details]
make -j3 with debug

i didn't save the previous file, it was empty  :P
Comment 9 Dan Nicholson 2008-06-22 20:35:21 UTC
OK. I found a couple bugs in the Makefiles. The problem here was that libmesa.a was depending on a virtual target, asm_subdirs. Since there was no file created for asm_subdirs, make always thought that libmesa.a needed to be rebuilt. This was causing race conditions, as you found out.

Can you try pulling again? This should be fixed by 5aa4d5a87d3edea6503a7b9853a318e71718af7c.
Comment 10 Mikko C. 2008-06-23 03:19:58 UTC
I recompiled mesa twice and it seems fine so far :)
Comment 11 Adam Jackson 2009-08-24 12:30:23 UTC
Mass version move, cvs -> git
Comment 12 Mikko C. 2009-08-24 12:33:05 UTC
closing, 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.