<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>134604</bug_id>
          
          <creation_ts>2006-05-28 03:30 0000</creation_ts>
          <short_desc>xorg-6.9.0-r1 fails on insecure-drivers</short_desc>
          <delta_ts>2006-06-20 22:35:31 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P4</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>eggie@pointpro.nl</reporter>
          <assigned_to>x11@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>eggie@pointpro.nl</who>
            <bug_when>2006-05-28 03:30:28 0000</bug_when>
            <thetext>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&apos;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 &apos;patch -p0 xorg.patch&apos;


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];</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eggie@pointpro.nl</who>
            <bug_when>2006-05-28 04:32:20 0000</bug_when>
            <thetext>Right, apperently that doesn&apos;t fix it. Don&apos;t know what&apos;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&apos;t that great.

Still, I need this ebuild to compile so I&apos;ll continue fiddling.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>joshuabaergen@gentoo.org</who>
            <bug_when>2006-05-28 08:45:16 0000</bug_when>
            <thetext>Any reason you&apos;re not using 7.0?

Also, posting the error and your &apos;emerge --info&apos; here would be helpful.  If you want to post the whole compile log, please attach it rather than pasting it inline ;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eggie@pointpro.nl</who>
            <bug_when>2006-05-28 10:11:12 0000</bug_when>
            <thetext>The reason I&apos;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&apos;
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&apos;
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 </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>eggie@pointpro.nl</who>
            <bug_when>2006-05-28 10:11:12 0000</bug_when>
            <thetext>The reason I&apos;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&apos;
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&apos;
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&apos;t available at all for X86, maybe it&apos;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 &quot;#define DevelDRIDrivers unichrome&quot; &gt;&gt; {$HOSTCONF}

That disabled all DevelDRIDrivers except for unichrome. This doesn&apos;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 
&quot;#define DevelDRIDrivers mach64 unichrome savage&quot; to prevent sunffb to 
build to get around it. I&apos;m not sure why sunffb is built at all on x86.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>joshuabaergen@gentoo.org</who>
            <bug_when>2006-06-11 09:52:33 0000</bug_when>
            <thetext>Are you using the testing tree?  X7 has been out of mask for a while now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dberkholz@gentoo.org</who>
            <bug_when>2006-06-20 22:35:31 0000</bug_when>
            <thetext>Fixed in xorg-x11-6.9.0-r2</thetext>
          </long_desc>
      
    </bug>

</bugzilla>