Peter Hutterer wrote:
>> I just wasted quite some time to get master to actually start.
>> Unresolved
>> symbols all over the place, both with intel and with vesa. Vesa had
>> xf86InterpretEDID, intel had three or four different ones
>> (miPolyRectangle
>> was one of them IIRC). Rebuilding with and without
>> --enable/disable-visibility
>> didn't change anything.
>
> I found the problem. Ubuntu (Hardy) installs mawk as default awk process,
> and
> mawk can't deal with the /^extern[[:space:]]/ line in the sdksym.sh
> script, so
> the symbol table is always empty. Installing gawk fixes the problem. I'm
> not
> sure if that still affects newer Ubuntu versions, but maybe we can put a
> check
> in for that?

  And I did not write it in perl to avoid people willing to
convert it to awk, telling awk is more portable/reliable :-)

  The attached patch works with gawk and mawk. I don't have
access to a BSD or Solaris Xorg build right now, but I believe
it should also work with posix awk. Can someone confirm please?

  It could also be a good idea toadd a small set of hardcoded
symbols in the template sdksyms.c, so that the linker would
link all symbols. The previous *sym.c files were very outdated,
but still, referenced enough symbols to prevent this problem...

> Cheers,
>   Peter

Paulo
diff --git a/hw/xfree86/loader/sdksyms.sh b/hw/xfree86/loader/sdksyms.sh
index b522096..a3b6772 100755
--- a/hw/xfree86/loader/sdksyms.sh
+++ b/hw/xfree86/loader/sdksyms.sh
@@ -333,7 +333,7 @@ BEGIN {
     sdk = $3 !~ /^"\//;
 }
 
-/^extern[[:space:]]/  {
+/^extern[ 	]/  {
     if (sdk) {
 	n = 3;
 
@@ -347,17 +347,17 @@ BEGIN {
 
 	# type specifier may not be set, as in
 	#   extern _X_EXPORT unsigned name(...)
-	if ($n !~ /[^[:alnum:]_]/)
+	if ($n !~ /[^a-zA-Z0-9_]/)
 	    n++;
 
 	# match
 	#    extern _X_EXPORT type (* name[])(...)
-	if ($n ~ /^[^[:alnum:]_]+$/)
+	if ($n ~ /^[^a-zA-Z0-9_]+$/)
 	    n++;
 
 	# match
 	#	extern _X_EXPORT const name *const ...
-	if ($n ~ /^([^[:alnum:]_]+)?const$/)
+	if ($n ~ /^([^a-zA-Z0-9_]+)?const$/)
 	    n++;
 
 	# actual name may be in the next line, as in
@@ -373,10 +373,10 @@ BEGIN {
 	symbol = $n;
 
 	# remove starting non word chars
-	sub(/^[^[:alnum:]_]+/, "",symbol);
+	sub(/^[^a-zA-Z0-9_]+/, "",symbol);
 
 	# remove from first non word to end of line
-	sub(/[^[:alnum:]_].*/, "", symbol);
+	sub(/[^a-zA-Z0-9_].*/, "", symbol);
 
 	#print;
 	printf("    &%s,\n", symbol);
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to