Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 134604
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo X packagers <x11@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Egbert van der Wal <eggie@pointpro.nl>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 134604 depends on: Show dependency tree
Bug 134604 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-05-28 03:30 0000
Xorg emerge fails on insecure drivers because of a syntax-error in
xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h

This can be fixed by applying the following patch to the Xorg-6.9.0-r1
base-directory. I'm not too good at generating patches but this one seems to
work when executed from /var/tmp/portage/xorg-6.9.0-r1/work/ by using 'patch
-p0 xorg.patch'


This is the content of the patch, I named it xorg.patch:

--- xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h2004-04-23
21:48:16.000000000 +0200
+++ xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h2006-05-28
12:14:39.000000000 +0200
@@ -318,7 +318,7 @@
 unsigned int eiap;
 } ffb_dac_hwstate_t;

-typedef struct {
+typedef struct ffb_wid_info {
 BoolInUse;

 /* The following fields are undefined unless InUse is TRUE. */
@@ -335,7 +335,7 @@
 } ffb_wid_info_t;

 #define FFB_MAX_PWIDS64
-typedef struct {
+typedef struct ffb_wid_pool {
 intnum_wids;
 intwid_shift;/* To get X channel value*/
 ffb_wid_info_twid_pool[FFB_MAX_PWIDS];

------- Comment #1 From Egbert van der Wal 2006-05-28 04:32:20 0000 -------
Right, apperently that doesn't fix it. Don't know what's wrong, but now trying
to see if changing Bool to bool helps a bit...
But I might be better of leaving it as my C-skills aren't that great.

Still, I need this ebuild to compile so I'll continue fiddling.

------- Comment #2 From Joshua Baergen (RETIRED) 2006-05-28 08:45:16 0000 -------
Any reason you're not using 7.0?

Also, posting the error and your 'emerge --info' here would be helpful.  If you
want to post the whole compile log, please attach it rather than pasting it
inline ;)

------- Comment #3 From Egbert van der Wal 2006-05-28 10:11:12 0000 -------
The reason I'm not using 7.0 is that(as far as I know) that one is modular and
thus I need to unmask a dozen of ebuilds, while for this one I only had to
unmask one ebuild.

The error it stops on is:

/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../i686-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.
rm -f tdfx_dri.so tdfx_dri.so.map
mv -f tdfx_dri.so~ tdfx_dri.so
rm -f ../../../../../../exports/lib/modules/dri/tdfx_dri.so
+ cd ../../../../../../exports/lib/modules/dri
+ ln -s ../../../../lib/GL/mesa/drivers/dri/tdfx/tdfx_dri.so .
make[6]: Leaving directory
`/var/tmp/portage/xorg-x11-6.9_pre20051030/work/xc/lib/GL/mesa/drivers/dri/tdfx'
making all in lib/GL/mesa/drivers/dri/ffb...
make[6]: Entering directory
`/var/tmp/portage/xorg-x11-6.9_pre20051030/work/xc/lib/GL/mesa/drivers/dri/ffb'
rm -f ffb_bitmap.o
i686-pc-linux-gnu-gcc -c -march=athlon-xp -O3 -pipe -fomit-frame-pointer
-fno-strict-aliasing  -ansi -Wno-return-type -w 
-I../../../../../../exports/include/X11 -I../../../../../../include/extensions
-I../../../../../../extras/Mesa/src/mesa              
-I../../../../../../extras/Mesa/src/mesa/main          
-I../../../../../../extras/Mesa/src/mesa/glapi         
-I../../../../../../extras/Mesa/src/mesa/shader                
-I../../../../../../extras/Mesa/include       
-I../../../../../../extras/Mesa/src/mesa/drivers/dri/common             
-I../../../../../../extras/Mesa/src/mesa/drivers/dri/ffb
-I../../../../../../lib/GL/dri-I../../../../../../exports/include/X11         
-I../../../../../../lib/GL/glx -I../../../../../../lib/GL/include              
-I../../../../../../programs/Xserver/GL/dri            
-I../../../../../../programs/Xserver/hw/xfree86/os-support             
-I../../../../../../extras/drm/shared-core             
-I../../../../../../lib/GL/dri/drm             
-I../../../../../../programs/Xserver/hw/xfree86/drivers/sunffb 
-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 
-DX_BYTE_ORDER=X_LITTLE_ENDIAN -DIN_DRI_DRIVER -DUSE_X86_ASM -DUSE_MMX_ASM
-DUSE_3DNOW_ASM -DUSE_SSE_ASM     -fPIC ffb_bitmap.c
In file included from ffb_xmesa.h:11,
                 from ffb_context.h:11,
                 from ffb_bitmap.c:28:
../../../../../../programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h:322:
fout: syntax error before 

------- Comment #4 From Egbert van der Wal 2006-05-28 10:11:12 0000 -------
The reason I'm not using 7.0 is that(as far as I know) that one is modular and
thus I need to unmask a dozen of ebuilds, while for this one I only had to
unmask one ebuild.

The error it stops on is:

/usr/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../i686-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.
rm -f tdfx_dri.so tdfx_dri.so.map
mv -f tdfx_dri.so~ tdfx_dri.so
rm -f ../../../../../../exports/lib/modules/dri/tdfx_dri.so
+ cd ../../../../../../exports/lib/modules/dri
+ ln -s ../../../../lib/GL/mesa/drivers/dri/tdfx/tdfx_dri.so .
make[6]: Leaving directory
`/var/tmp/portage/xorg-x11-6.9_pre20051030/work/xc/lib/GL/mesa/drivers/dri/tdfx'
making all in lib/GL/mesa/drivers/dri/ffb...
make[6]: Entering directory
`/var/tmp/portage/xorg-x11-6.9_pre20051030/work/xc/lib/GL/mesa/drivers/dri/ffb'
rm -f ffb_bitmap.o
i686-pc-linux-gnu-gcc -c -march=athlon-xp -O3 -pipe -fomit-frame-pointer
-fno-strict-aliasing  -ansi -Wno-return-type -w 
-I../../../../../../exports/include/X11 -I../../../../../../include/extensions
-I../../../../../../extras/Mesa/src/mesa              
-I../../../../../../extras/Mesa/src/mesa/main          
-I../../../../../../extras/Mesa/src/mesa/glapi         
-I../../../../../../extras/Mesa/src/mesa/shader                
-I../../../../../../extras/Mesa/include       
-I../../../../../../extras/Mesa/src/mesa/drivers/dri/common             
-I../../../../../../extras/Mesa/src/mesa/drivers/dri/ffb
-I../../../../../../lib/GL/dri-I../../../../../../exports/include/X11         
-I../../../../../../lib/GL/glx -I../../../../../../lib/GL/include              
-I../../../../../../programs/Xserver/GL/dri            
-I../../../../../../programs/Xserver/hw/xfree86/os-support             
-I../../../../../../extras/drm/shared-core             
-I../../../../../../lib/GL/dri/drm             
-I../../../../../../programs/Xserver/hw/xfree86/drivers/sunffb 
-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 
-DX_BYTE_ORDER=X_LITTLE_ENDIAN -DIN_DRI_DRIVER -DUSE_X86_ASM -DUSE_MMX_ASM
-DUSE_3DNOW_ASM -DUSE_SSE_ASM     -fPIC ffb_bitmap.c
In file included from ffb_xmesa.h:11,
                 from ffb_context.h:11,
                 from ffb_bitmap.c:28:
../../../../../../programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h:322:
fout: syntax error before ‘Bool’
../../../../../../programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h:326:
fout: syntax error before ‘canshare’
../../../../../../programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h:335:
fout: syntax error before ‘}’ token
../../../../../../programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h:341:
fout: syntax error before ‘ffb_wid_info_t’
../../../../../../programs/Xserver/hw/xfree86/drivers/sunffb/ffb_dac.h:362:
fout: syntax error before ‘ffb_wid_pool_t’ 


Maybe this is because sunffb isn't available at all for X86, maybe it's a
sparc-only driver or something? Anyway, I finally got it to compile by adding
this on line 747 to xorg-6.9.0-r1.ebuild:

echo "#define DevelDRIDrivers unichrome" >> {$HOSTCONF}

That disabled all DevelDRIDrivers except for unichrome. This doesn't fix the
ffb_dac.h but it does fix the compile and gets me the driver I want.

This suggestion I got from:
http://lists.freedesktop.org/archives/xorg/2005-December/011655.html

where Simon Strandmann says:
I and others on the gentoo forums had the same problem. You have to add 
"#define DevelDRIDrivers mach64 unichrome savage" to prevent sunffb to 
build to get around it. I'm not sure why sunffb is built at all on x86.

------- Comment #5 From Joshua Baergen (RETIRED) 2006-06-11 09:52:33 0000 -------
Are you using the testing tree?  X7 has been out of mask for a while now.

------- Comment #6 From Donnie Berkholz 2006-06-20 22:35:31 0000 -------
Fixed in xorg-x11-6.9.0-r2

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug