[PATCH] Xgl doesn't compile with Mesa HEAD > 0821
Dan Nicholson
dbn.lists at gmail.com
Tue Aug 29 19:14:46 PDT 2006
On 8/28/06, Brian Paul <brian.paul at tungstengraphics.com> wrote:
> Dan Nicholson wrote:
> >
> > I took a quick hack at this. Immediately, the problem is that Xorg
> > needs to symlink a lot of header files that aren't listed in
> > src/mesa/sources.
>
> We could add the .h files to 'sources'. Let me know if you want that.
I went in another direction after I found there wasn't much
correlation between the listing in Mesa's sources file and the way
that xserver creates the tree. Instead, I just decided to use a for
loop to link all the C files in the Mesa directory. It turns out that
it was only missing a few anyway.
$ diff -qr -x symlink-mesa.sh xserver{.orig,}
Only in xserver/GL/mesa/main: dispatch.c
Only in xserver/GL/mesa/shader/grammar: grammar_crt.c
Only in xserver/GL/mesa/shader/grammar: grammar_crt.h
Only in xserver/GL/mesa/shader: programopt.c
Only in xserver/GL/mesa/shader: programopt.h
Only in xserver/GL/mesa/shader/slang/library: gc_to_bin.c
Only in xserver/GL/mesa/shader/slang/library: slang_builtin_vec4_gc.h
Only in xserver/GL/mesa/shader/slang/library: syn_to_c.c
I left alone the special hacks to handle GL/glx and GL/X. The nice
thing is that the script doesn't overwrite existing files, so using
the blind for loop still wouldn't be a problem if there was a
preferred local file in the xserver tree.
The only drawback is that it's a lot slower due to repeated use of
`basename'. It could be a lot faster using bash parameter expansion,
but I'm sure `basename' is a much more portable. Here's the timing on
my crawling PIII 500.
$ cat time1
Creating destination directories for mesa module ... DONE
Creating destination directories for glx module ... DONE
Checking that the source files exist for mesa module ... DONE
Checking that the source files exist for glx module ... DONE
Deleting existing files for mesa module ... DONE
Deleting existing files for glx module ... DONE
Linking files for mesa module ... DONE
Linking files for glx module ... DONE
real 0m4.384s
user 0m2.516s
sys 0m1.668s
$ cat time2
Creating destination directories for mesa module ... DONE
Creating destination directories for glx module ... DONE
Checking that the source files exist for mesa module ... DONE
Checking that the source files exist for glx module ... DONE
Deleting existing files for mesa module ... DONE
Deleting existing files for glx module ... DONE
Linking files for mesa module ... DONE
Linking files for glx module ... DONE
real 0m11.227s
user 0m4.880s
sys 0m5.868s
Patch is attached. I tested this on the xgl-0-0-1 branch and it built
fine. If you want to use this with xgl, you also need to apply this
commit from master first:
http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commit;h=b29b236d88789fd45d823a55dbedb393bb134c5b
--
Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: symlink.diff
Type: text/x-patch
Size: 11284 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20060829/49ea5c46/attachment.bin>
More information about the xorg
mailing list