Bug 925 - Using Freetype 2.1.8+ symbols breaks build on many systems
Summary: Using Freetype 2.1.8+ symbols breaks build on many systems
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xfont (show other bugs)
Version: git
Hardware: x86 (IA32) All
: high critical
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks: 5392
  Show dependency treegraph
 
Reported: 2004-07-26 09:45 UTC by Eric Anholt
Modified: 2006-06-03 03:28 UTC (History)
7 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to make fix work with older versions of GCC (1.88 KB, patch)
2004-08-02 19:28 UTC, Kevin E. Martin
no flags Details | Splinter Review
Different way of solving problem (1.09 KB, patch)
2004-08-03 01:51 UTC, Egbert Eich
no flags Details | Splinter Review
a patch for performance improvement (3.10 KB, patch)
2004-08-04 04:36 UTC, Chisato Yamauchi
no flags Details | Splinter Review

Description Eric Anholt 2004-07-26 09:45:32 UTC
Recent changes to use Freetype 2.1.8 (and higher)-only symbols has broken the
build on many platforms, including FreeBSD and most peoples' Linux.  We can't
just use the 2.1.9 shipped with xorg due to conflicts with the local packaging
system.  At least FreeBSD is not updating to 2.1.9 because of concerns about
rendering quality suffering 2.1.8+.

The best solution would seem to be having a HasFreetype218 flag that defaults to
off, and only use these symbols when that gets set.

making all in lib/font/FreeType...
make[5]: Entering directory `/home/carl/src/tinderclient/Test/xc/lib/font/FreeType'
rm -f xttcap.o unshared/xttcap.o
gcc -m32 -c -ansi -pedantic -Wall -Wpointer-arith -Wundef 
-I/usr/include/freetype2 -I/usr/include/freetype2/config -I.
-I../../../include/fonts -I../include -I../../../exports/include/X11           
-I../../../programs/Xserver/include             -I../../../exports/include 
-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  
-DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH 				-DXFreeXDGA
-DXvExtension 				-DXFree86LOADER  -DXFree86Server 				-DXF86VIDMODE 			
-DXvMCExtension 				-DSMART_SCHEDULE 				-DBUILDDEBUG -DXResExtension 			
-DX_BYTE_ORDER=X_LITTLE_ENDIAN 				-DXORG_VERSION_CURRENT="(((6) * 10000000) +
((7) * 100000) + ((0) * 1000) + 0)"   	  -DXFREE86_FT2   	-O2
-fno-strength-reduce -fno-strict-aliasing   xttcap.c -o unshared/xttcap.o
rm -f xttcap.o
gcc -m32 -c -O2 -fno-strength-reduce -fno-strict-aliasing  -ansi -pedantic -Wall
-Wpointer-arith -Wundef  -I/usr/include/freetype2
-I/usr/include/freetype2/config -I. -I../../../include/fonts -I../include
-I../../../exports/include/X11            -I../../../programs/Xserver/include  
          -I../../../exports/include  -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   -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV
-DSINGLEDEPTH 				-DXFreeXDGA -DXvExtension 				-DXFree86LOADER 
-DXFree86Server 				-DXF86VIDMODE 				-DXvMCExtension 				-DSMART_SCHEDULE 			
-DBUILDDEBUG -DXResExtension 				-DX_BYTE_ORDER=X_LITTLE_ENDIAN 			
-DXORG_VERSION_CURRENT="(((6) * 10000000) + ((7) * 100000) + ((0) * 1000) +
0)"   	  -DXFREE86_FT2      -fPIC xttcap.c
rm -f ftfuncs.o unshared/ftfuncs.o
gcc -m32 -c -ansi -pedantic -Wall -Wpointer-arith -Wundef 
-I/usr/include/freetype2 -I/usr/include/freetype2/config -I.
-I../../../include/fonts -I../include -I../../../exports/include/X11           
-I../../../programs/Xserver/include             -I../../../exports/include 
-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  
-DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH 				-DXFreeXDGA
-DXvExtension 				-DXFree86LOADER  -DXFree86Server 				-DXF86VIDMODE 			
-DXvMCExtension 				-DSMART_SCHEDULE 				-DBUILDDEBUG -DXResExtension 			
-DX_BYTE_ORDER=X_LITTLE_ENDIAN 				-DXORG_VERSION_CURRENT="(((6) * 10000000) +
((7) * 100000) + ((0) * 1000) + 0)"   	  -DXFREE86_FT2   	-O2
-fno-strength-reduce -fno-strict-aliasing   ftfuncs.c -o unshared/ftfuncs.o
ftfuncs.c: In function `FT_Do_SBit_Metrics':
ftfuncs.c:931: error: structure has no member named `find_sbit_image'
ftfuncs.c:955: error: structure has no member named `load_sbit_metrics'
make[5]: *** [ftfuncs.o] Error 1
make[5]: Leaving directory `/home/carl/src/tinderclient/Test/xc/lib/font/FreeType'
make[4]: *** [FreeType] Error 2
make[4]: Leaving directory `/home/carl/src/tinderclient/Test/xc/lib/font'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/carl/src/tinderclient/Test/xc/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/carl/src/tinderclient/Test/xc'
make[1]: *** [World] Error 2
make[1]: Leaving directory `/home/carl/src/tinderclient/Test/xc'
make: *** [World] Error 2
Comment 1 Kevin E. Martin 2004-08-02 19:28:44 UTC
Created attachment 561 [details] [review]
Patch to make fix work with older versions of GCC

Egbert checked in a patch to fix this, and Matthieu Herrb added a patch to make
it work with an older version of GCC (see attachment).	If this patch is
applied, can this bug be marked as resoved?
Comment 2 Egbert Eich 2004-08-03 01:51:58 UTC
Created attachment 562 [details] [review]
Different way of solving problem

Chisato supplied a patch that would replace mine and has the charm of being
much smaller.
It works with 2.1.7 so I think I will apply it. I assume that patch 561 is
still
required.
Comment 3 Sérgio M. Basto 2004-08-03 09:51:57 UTC
now after cvs update with freetype-2.1.4:


gcc -m32 -o bdftopcf -O2 -fno-strength-reduce -fno-strict-aliasing -ansi
-pedantic -Wall -Wpointer-arith -Wundef     -L../../exports/lib   bdftopcf.o
-lXfont -lfntstubs -lfreetype   -lz -lm   -Wl,-rpath-link,../../exports/lib
../../exports/lib/libXfont.so: undefined reference to `ft_isdigit'
collect2: ld returned 1 exit status
make[3]: *** [bdftopcf] Error 1
make[3]: Leaving directory `/opt/xorgcvs/build/programs/bdftopcf'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/xorgcvs/build/programs'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/xorgcvs/build'
make: *** [all] Error 2
Comment 4 Chisato Yamauchi 2004-08-04 04:36:42 UTC
Created attachment 567 [details] [review]
a patch for performance improvement

I propose a patch for performance improvement with freetype-2.1.7.
Even if we cannot use freetype-2.1.8, the performance will be equivalent to
that of XFree86-4.4.0 when using CJKV font.

The attached patch is based on version 1.6.
Comment 5 Egbert Eich 2004-08-04 04:50:44 UTC
Chisato, I'll commit your patch. I've built it on a 2.1.4 and had no problems
with building although I don't have the time to test it thoroughly.
Comment 6 Kevin E. Martin 2004-08-06 12:27:40 UTC
I believe all of the patches above have been applied to the tree.  Are there any
other issues that need to be dealt with for Freetype in the current release?

If not, please move this bug over to block the release notes bug (#999) so that
we can document the changes.
Comment 7 Kevin E. Martin 2004-08-11 08:35:26 UTC
Resolved and moving over to release notes bug
Comment 8 Roland Mainz 2005-03-07 11:50:37 UTC
(In reply to comment #7)
> Resolved and moving over to release notes bug

kem:
Should this bug be closed now or what ?
Comment 9 Adam Jackson 2005-07-03 14:23:15 UTC
over to 7.0 doc bug.  did this ever get documented for 6.8?
Comment 10 Alan Coopersmith 2005-12-21 10:58:03 UTC
Still not clear on what needs to be documented here, but since there's no 
suggestion for what to include in docs, it's not going to be documented for
6.9/7.0, so moving to 7.1 doc tracker.
Comment 11 Daniel Stone 2006-06-03 03:28:43 UTC
we don't need to document anything, since it builds everywhere


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.