Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2588 - xfree won't compile with tdfx (Voodoo) support
Summary: xfree won't compile with tdfx (Voodoo) support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-08 14:36 UTC by James A. Stangler
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James A. Stangler 2002-05-08 14:36:50 UTC
While building a Gentoo linux system (emerge system), I encountered a compile 
error in xfree.

My USE line is:
USE="3dnow 3dfx nocardbus -mmx cups slp x dga opengl xv fbcon directfb kde qt 
qtmt artsgif jpeg png tiff avi avi mpeg quicktime alsa dvd xmms oggvorbis pam 
ssl crypt socks5 mozilla truetype xml xml2 pdflib java perl python mysql 
postgres samba doc"

while in:
/var/tmp/portage/xfree-4.2.0-r9/work/xc/lib/GL/mesa/src/drv/tdfx

executing:
gcc -c -mcpu=i686 -O3 -pipe  -ansi  -I../../../../../../exports/include/X11 
-I../../../../../../include/extensions -I../../../../../../extras/Mesa/src 
-I../../../../../../lib/GL/mesa/src/drv/common               
-I../../../../../../lib/GL/mesa/src/drv/tdfx -I../../../../../../lib/GL/dri 
-I../../../../../../lib/GL/glx          -I../../../../../../exports/include 
-I../../../../../../exports/include/GL          
-I../../../../../../lib/GL/mesa/dri             
-I../../../../../../programs/Xserver/GL/dri             
-I../../../../../../programs/Xserver/hw/xfree86/os-support          
-I../../../../../../programs/Xserver/hw/xfree86/drivers/tdfx            
-I../../../../../../lib/GL/dri/drm          -I/usr/include/glide3  
-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_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_KATMAI_ASM   tdfx_context.c
In file included from tdfx_context.c:39:
dri_glide.h:42: glide.h: No such file or directory
<snip errors because it couldn't find glide.h>

tdfx support (for Voodoo cards) requires DRI from XFree86 at 
<http://www.xfree86.org/4.2.0/DRIcomp.html>.

Workaround:
Check out the Glide code per the instructions from xfree86.org (I checked it 
out to /opt/cvs/XFree86.
After 'emerge xfree' unpacks the source, execute:
cd /var/tmp/portage/xfree-4.2.0-r9/work/xc/lib/GL/mesa/src/drv/tdfx
ln -s /opt/cvs/XFree86/Glide3/h5/glide3/src/glide.h glide.h
ln -s /opt/cvs/XFree86/Glide3/h5/glide3/src/glidesys.h glidesys.h
ln -s /opt/cvs/XFree86/Glide3/h5/glide3/src/glideutl.h glideutl.h
ln -s /opt/cvs/XFree86/Glide3/h5/glide3/src/g3ext.h g3ext.h

I'm not enough of a C programmer to know the right way to correct it, but it 
finished compiling xfree with the workaround.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-10 14:50:13 UTC
Do you have media-libs/glide-v3 installed ?
Comment 2 James A. Stangler 2002-05-10 15:52:51 UTC
It's currently installed, but I didn't explicitly install it.  It may have been 
installed as a dependency by another ebuild after xfree completed.  The error 
occurred while executing 'emerge system', so unless xfree had glide-v3 as a 
dependency, it would not have been installed.

On a related issue (not to overload a bug report), my understanding is that the 
tdfx.o from the xfree tree is more up-to-date than the tdfx.o produced when 
compiling DRI support with the kernel.  However, it doesn't seem to install 
tdfx.o from the xfree build into the /lib/modules/... directory, and the xfree 
tree is deleted once the build finishes.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-10 16:21:13 UTC
To be honest, I have mainly been doing the tdfx stuff with help from
tdfx users, as I do not have such an card myself.  For them, and others
it has worked fine, so I am wondering why this all of a sudden.

It should not be that difficult to fix the symlink issue, but I will
need your help, and as it is nearly midnight, and I still have work
tomorrow, I will only be able to get to it tomorrow night.

On a side note .. why do you disable mmx ?  An athlon cpu do support
mmx, and you could be turning off speed improvements that your
athlon/duron could have taken advantage of ....

Then lastly, if I remember correctly, DRI was updated in kernel 2.4.17 to
that used in xfree-4.2.0.

Btw .. did you try to do just: emerge xfree
yet ?
Comment 4 James A. Stangler 2002-05-10 17:00:48 UTC
Don't kill yourself resolving it.  I'm switching to Gentoo from Redhat and I'm 
building it on a spare partition that I chroot into, so it's not an urgent 
problem, especially if everyone else seems to be using tdfx without problems.

When 'emerge system' errored, I tried 'emerge xfree' and received the same 
error.

I'll help with whatever I can.  I'm not overly knowledgeable about anything 
c/c++ related, but I'm hoping to become more familiar with my linux system 
(hence the reason to switch to Gentoo).  I haven't done any c programming for 
over 10 years.

As far as disabling mmx, that was a mistake.  I was originally playing around 
with Gentoo in VMWare, and it probably got switched there.

As far as using DRI from xfree instead of the kernel, I read that the kernel 
tends to lag behind xfree DRI changes and I wanted to have the latest.  I 
wasn't aware that the latest changes were merged into 2.4.17.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-10 17:24:06 UTC
Ill try not to do permanet harm to myself :)

You dont have to be eligible in c/c++, but will just have to be willing
to test a ebuild or 3 :)
Comment 6 James A. Stangler 2002-05-10 18:26:46 UTC
I can test as many ebuilds as you send and any other instructions you have.
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-12 13:48:35 UTC
Hi, try xfree-4.2.0-r10 (masked).  Just make sure it is the one I commited ...
the $Header: $ line should have "azarah" in it ...
Comment 8 James A. Stangler 2002-05-16 08:37:29 UTC
Ok, I created a completely new installation in VMWare using the same USE   variable.  Everything up to the emerge of xfree went fine.  I tried 'emerge   xfree' with the original ebuild and it failed as before.  I unmasked the new   xfree ebuild and did 'emerge xfree-4.2.0-r10.ebuild'.  The header line didn't   have 'azarah' as you indicated, but it appeared to have the other changes to   add the symlinks.  It successfully merged opengl-update and then began xfree.      It failed again.  I looked in /var/tmp/portage/xfree-4.2.0-r10 and the   symlinks were created.  I followed the links and looked in /usr/include/glide3   and saw that the files they were linking to weren't there.  I chedked for   glide-v3 with 'emerge -s glide-v3' and it reported that 3.10-r3 was installed.    I re-emerged it and had the following:      <snip build stuff>   gcc -DX11 -fomit-frame-pointer -funroll-loops -fexpensive-optimizations   -ffast-math -DBIG_OPT -Wall -I../../../h5/glide3/src -I../../h5/incsrc   -I../../../h5/incsrc -I../../../h5/minihwc -I. -I../../../swlibs/fxmemmap   -I../../../swlibs/fxmisc -I../../../swlibs/newpci/pcilib   -I../../../swlibs/texus2/lib -O6 -m486 -Wp,-MD,.deps/linhwc.pp -c   ../../../h5/minihwc/linhwc.c  -fPIC -DPIC -o .libs/linhwc.lo   ../../../h5/minihwc/linhwc.c:64: X11/Xlib.h: No such file or directory   ../../../h5/minihwc/linhwc.c:65: X11/extensions/xf86dga.h: No such file or   directory   ../../../h5/minihwc/linhwc.c:66: X11/extensions/xf86vmode.h: No such file or   directory   make[2]: *** [linhwc.lo] Error 1   make[2]: Leaving directory   `/var/tmp/portage/glide-v3-3.10-r3/work/glide3x/build/h5/minihwc'   make[1]: *** [all-recursive] Error 1   make[1]: Leaving directory   `/var/tmp/portage/glide-v3-3.10-r3/work/glide3x/build/h5'   make: *** [all-recursive] Error 1   Filesystem           1K-blocks      Used Available Use% Mounted on   /dev/hdd1              2015604   1264840    648376  67% /var   Time Elapsed: 0 Years, 0 Days, 0 Hours, 1 Minutes, 9 Seconds   Disk usage: 1.456 Mb      >>> Install glide-v3-3.10-r3 into /var/tmp/portage/glide-v3-3.10-r3/image/   category media-libs   <snip install which fails with same error>   >>> Completed installing into /var/tmp/portage/glide-v3-3.10-r3/image/       ...done!   <snip emerging of failed install to />      glide-v3 failed to build and failed to install but the emerge completed   successfully and recorded a successful installation.  When I was originally   building the system, I played with the glide DRI pulled from CVS on   sourceforge and must have successfully installed it - that must be why I could   create the symlinks and have xfree install.  Sorry for being a poor bug   reporter and uninformed user trying to build stuff he doesn't really  understand - I'll get better.      Anyway, I copied the 4 files that were symlinked against to  /usr/include/glide3 to simulate a successful glide-v3 install and did an  'emerge xfree-4.2.0-r10.ebuild' again. It built and installed successfully.  
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2002-05-26 14:20:55 UTC
Ok, I guess the only thing I can think, is that you are not supposed to
use 3dfx drivers under vmware, but the vmware driver that comes with xfree.

I am marking this as resolved ... if you have problems using the 3dfx stuff
and are not running it inside vmware, reopen this bug.