Bug 4349

Summary: Xorg fails to build...
Product: xorg Reporter: Adam K Kirchhoff <akirchhoff135014>
Component: ReleaseAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: high CC: alexdeucher, dberkholz, drac, eta, joe.kappus, matthieu.herrb
Version: git   
Hardware: x86 (IA32)   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
proposed patch
none
New patch, including Alex's patches on dri-devel none

Description Adam K Kirchhoff 2005-09-04 12:15:52 UTC
For a few days now, I've been getting the following error when building Xorg
from CVS:

cc -c -O2 -fno-strict-aliasing  -ansi -pedantic -Wno-system-headers -Dasm=__asm
        -Wall -Wpointer-arith -Wstrict-prototypes                    
-Wmissing-prototypes -Wmissing-declarations                    
-Wredundant-decls -Wnested-externs -Wundef  -I../../../../../exports/include/X11
-I../../../../../include/extensions -I../../../../../extras/Mesa/src/mesa      
     -I../../../../../extras/Mesa/src/mesa/glapi            
-I../../../../../extras/Mesa/src/mesa/shader               
-I../../../../../extras/Mesa/src/mesa/main             
-I../../../../../extras/Mesa/include                
-I../../../../../lib/GL/include  -I../../../../..
-I../../../../../exports/include   -DCSRG_BASED  -DFUNCPROTO=15 -DNARROWPROTO
-DXTHREADS  -D_THREAD_SAFE -DXUSE_MTSAFE_API    -DMALLOC_0_RETURNS_NULL     
-fPIC driverfuncs.c
make: don't know how to make grammar_mesa.o. Stop
*** Error code 2

And then the build dies.
Comment 1 Alan Coopersmith 2005-09-04 14:08:55 UTC
I've been seeing those as well since this change went in:

  2005-09-02  Eric Anholt  <anholt@FreeBSD.org>

        * lib/GL/mesa/shader/grammar/Imakefile.inc:
        * lib/GL/mesa/shader/slang/Imakefile.inc:
        Fix the build from the last Mesa import.  Patch obtained from ajax.

Removing the directory names from the .o files broke my build where it was
working before.
Comment 2 Matthieu Herrb 2005-09-04 23:04:52 UTC
*** Bug 4167 has been marked as a duplicate of this bug. ***
Comment 3 Matthieu Herrb 2005-09-05 06:39:59 UTC
Created attachment 3174 [details] [review]
proposed patch

This patch fixes the remaining build problems for me.
Comment 4 Adam K Kirchhoff 2005-09-05 09:25:44 UTC
Unfortunately, that doesn't solve the build problem for me.  It's still dying,
complaining that it doesn't know how to make grammar_mesa.o

Adam
Comment 5 Colin Harrison 2005-09-06 02:20:52 UTC
Patch fixes build for me when compiling for Xming with Mesa

i.e.

make World CROSSCOMPILEDIR=/usr/local/cross-tools/i386-mingw32msvc/bin 
LOCAL_LDFLAGS=-mwindows

with host.def containing #define GlxUseWindows NO

Thanks
Comment 6 Samuli Suominen 2005-09-06 06:05:06 UTC
*** Bug 4364 has been marked as a duplicate of this bug. ***
Comment 7 Matthieu Herrb 2005-09-06 06:29:51 UTC
Ok my patch was missing the DRI sub-dirs. I can patch the remaining 13 or 14
Imakefiles in lib/GL/mesa/drivers/dri/ that need the mesa_gramma.o and the
slang_*.o objects.  
But I wonder why does the new Mesa insist on duplicating these object files in
each driver. Having them once in libGL should be enough, no?
Comment 8 Alex Deucher 2005-09-07 05:49:31 UTC
Dave committed a fix for this last night:
http://lists.freedesktop.org/archives/xorg-commit/2005-September/005019.html
Re-open if that doesn't do it.
Comment 9 Samuli Suominen 2005-09-07 05:59:43 UTC
I just checkouted CVS, and:

making all in lib/GL/mesa/shader/grammar...
make[7]: Entering directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL/
mesa/shader/grammar'
rm -f ../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.o unshared/../../..
/../../lib/GL/mesa/shader/grammar/grammar_mesa.o
i686-pc-linux-gnu-gcc -c -ansi -Wno-return-type -w  -I../../../../../extras/
Mesa/src/mesa/main          -I../../../../../extras/Mesa/src/mesa/math           
  -I../../../../../extras/Mesa/src/mesa/glapi                 -I../../../../../
extras/Mesa/src/mesa/shader/grammar                 -I../../../../../extras/
Mesa/src/mesa           -I../../../../../extras/Mesa/src/mesa/x86               
-I../../../../../extras/Mesa/include            -I../../../include -I../../../..
/../exports/include/X11 -I../../../dri -I../../../glx -I../../dri -I..          
-I../../../../../exports/include/GL -I../../../../../programs/Xserver/hw/
xfree86/os-support -I../../../../../programs/Xserver/GL/dri  -I../../../../.. -
I../../../../../exports/include   -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L   
              -D_POSIX_SOURCE -D_XOPEN_SOURCE                          -
D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE                             -DFUNCPROTO=15 
-DNARROWPROTO -DXTHREADS  -D_REENTRANT -DXUSE_MTSAFE_API    -
DMALLOC_0_RETURNS_NULL -DGLXEXT -DXF86DRI -DGLX_DIRECT_RENDERING -
DGLX_USE_DLOPEN -DGLX_USE_MESA -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -
DUSE_SSE_ASM        -march=athlon-xp -O2 -pipe -fomit-frame-pointer -fno-strict-
aliasing   ../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.c -o unshared
/../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.o
Assembler messages:
FATAL: can't create unshared/../../../../../lib/GL/mesa/shader/grammar/
grammar_mesa.o: No such file or directory
make[7]: *** [../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.o] Error 2
make[7]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL/
mesa/shader/grammar'
make[6]: *** [all] Error 2
make[6]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL/
mesa/shader'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL/
mesa'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc'
make[1]: *** [World] Error 2
make[1]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc'
make: *** [World] Error 2

!!! ERROR: x11-base/xorg-x11-20101010 failed.
!!! Function build, Line 974, Exitcode 2
!!! make World failed
!!! If you need support, post the topmost build error, NOT this status message.

drac ~ #

Comment 10 Alex Deucher 2005-09-07 10:30:39 UTC
try this new patch:
http://marc.theaimsgroup.com/?l=dri-devel&m=112611410931267&w=2
Comment 11 Joe Kappus 2005-09-07 12:56:29 UTC
patch didn't fix it here...

making all in lib/GL/mesa/shader/grammar...
make[7]: Entering directory
`/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL/mesa/shader/grammar'
rm -f ../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.o
unshared/../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.o
i686-pc-linux-gnu-gcc -c -ansi -Wno-return-type -w 
-I../../../../../extras/Mesa/src/mesa/main         
-I../../../../../extras/Mesa/src/mesa/math            
-I../../../../../extras/Mesa/src/mesa/glapi                
-I../../../../../extras/Mesa/src/mesa/shader/grammar                
-I../../../../../extras/Mesa/src/mesa          
-I../../../../../extras/Mesa/src/mesa/x86              
-I../../../../../extras/Mesa/include            -I../../../include
-I../../../../../exports/include/X11 -I../../../dri -I../../../glx -I../../dri
-I..          -I../../../../../exports/include/GL
-I../../../../../programs/Xserver/hw/xfree86/os-support
-I../../../../../programs/Xserver/GL/dri  -I../../../../..
-I../../../../../exports/include   -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L
                -D_POSIX_SOURCE -D_XOPEN_SOURCE                         
-D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64  -D_GNU_SOURCE                            -DFUNCPROTO=15
-DNARROWPROTO -DXTHREADS  -D_REENTRANT -DXUSE_MTSAFE_API   
-DMALLOC_0_RETURNS_NULL -DGLXEXT -DXF86DRI -DGLX_DIRECT_RENDERING
-DGLX_USE_DLOPEN -DGLX_USE_MESA -DUSE_X86_ASM -DUSE_MMX_ASM  -DUSE_SSE_ASM     
 -march=pentium4 -O2 -fomit-frame-pointer -pipe -fno-strict-aliasing  
../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.c -o
unshared/../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.o
Assembler messages:
FATAL: can't create
unshared/../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.o: No such file
or directory
make[7]: *** [../../../../../lib/GL/mesa/shader/grammar/grammar_mesa.o] Error 2
make[7]: Leaving directory
`/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL/mesa/shader/grammar'
make[6]: *** [all] Error 2
make[6]: Leaving directory
`/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL/mesa/shader'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL/mesa'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib/GL'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc'
make[1]: *** [World] Error 2
make[1]: Leaving directory `/var/tmp/portage/xorg-x11-20101010/work/xc'
make: *** [World] Error 2
Comment 12 Matthieu Herrb 2005-09-07 13:17:51 UTC
Created attachment 3197 [details] [review]
New patch, including Alex's patches on dri-devel

It seems a few definitions where still overlooked.
Comment 13 Matthieu Herrb 2005-09-07 15:06:27 UTC
Patch commited.

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.