[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RFC: define FontLibSharedFreeType=NO



 I've just added a memo under people/ishikawa/ about FreeType backend
build problem when defined FontLibSharedFreeType=YES.

 I want to merge this change into branches/4.3.0/sid/debian/rules.

 Any comments?


Modified: people/ishikawa/4.3.0-0pre1v1-xrender-xcursor-split/rules
==============================================================================
--- people/ishikawa/4.3.0-0pre1v1-xrender-xcursor-split/rules	2003-06-06 04:16:38 UTC (rev 154)
+++ people/ishikawa/4.3.0-0pre1v1-xrender-xcursor-split/rules	2003-06-06 06:10:20 UTC (rev 155)
@@ -67,7 +67,7 @@
 # lines. Ever.
 TIMESTAMP:=$(shell env TZ=UTC date +%Y%m%d%H%M%S)
 IMAKE_DEFINES:=-DXFree86CustomVersion='\"Debian $(SOURCE_VERSION) $(TIMESTAMP) $(BUILDER)\"'
-SERVERDEBUG_IMAKE_DEFINES:=-DXFree86CustomVersion='\"Debian (static) $(SOURCE_VERSION) $(TIMESTAMP) $(BUILDER)\"' -DBuildServersOnly=YES -DDoLoadableServer=NO -DXnestServer=NO -DXVirtualFramebufferServer=NO -DXprtServer=NO $(DEBUGFLAGS)
+SERVERDEBUG_IMAKE_DEFINES:=-DXFree86CustomVersion='\"Debian (static) $(SOURCE_VERSION) $(TIMESTAMP) $(BUILDER)\"' -DBuildServersOnly=YES -DDoLoadableServer=NO -DFontLibSharedFreeType=NO -DXnestServer=NO -DXVirtualFramebufferServer=NO -DXprtServer=NO $(DEBUGFLAGS)
 
 # If this is an official build, set the BuilderEMailAddr that gets displayed in
 # some error messages.



--------------------------------------------------------------------------

 If BuildFreeType && UseFreetype2 && !DoLoadableServer, lib/font/FreeType
builds with external FreeType2 because in xc/config/X11.tmpl defined as
following:

----------------
/*
 * There's no reason to use the statically built FreeType unless
 * you're using a loadable server.
 */
 
#ifndef FontLibSharedFreeType
#if BuildFreeType && UseFreetype2 && !DoLoadableServer 
#define FontLibSharedFreeType YES
#else
#define FontLibSharedFreeType NO
#endif
#endif

#if FontLibSharedFreeType
         FONTFT2LIB = $(FREETYPE2LIB)
#endif
----------------

 BuildFreeType and UseFreetype2 is always YES on Debian xfree86 package build.
 DoLoadableServer is defined as NO when we build the static XFree86 server
(XFree86-dbg) for xserver-xfree86-dbg.

 So, xserver-xfree86-dbg will be built with external shared FreeType2 library.

 XFree86 4.3.0 tree contains FreeType 2.1.3 (with some modifications).
Currently sid includes FreeType2 2.1.4.  Between FreeType 2.1.3 and 2.1.4,
`struct  PS_FontInfoRec' interface is changed likes this:


----- 2.1.3
  typedef struct  PS_FontInfoRec
  {
(snip)
    FT_Short    underline_position;
    FT_UShort   underline_thickness;

  } PS_FontInfoRec, *PS_FontInfo;
-----

----- 2.1.4
  typedef struct  PS_FontInfoRec
  {
(snip)
    FT_Fixed*   underline_position;
    FT_Fixed*   underline_thickness;

  } PS_FontInfoRec, *PS_FontInfo;
-----


 This change cause build error in xc/lib/font/freetype/ftfuncs.c likes this:


 gcc -c -g -O2 -g -ansi -pedantic -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations                      -Wredundant-decls -Wnested-externs -Wundef  -I. -I../../../include/fonts -I../include -I../../../exports/include/X11            -I../../../programs/Xserver/include -I/usr/include/freetype2 -I/usr/include/freetype2/include -I../../../exports/include  -I../../.. -I../../../exports/include -I/usr/X11R6/include  -Dlinux -D__alpha__ -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                       -DXFree86Server                                 -DXF86VIDMODE                  -DXvMCExtension                                                          -DSMART_SCHEDULE                           
      -DBUILDDEBUG -DXResExtension           -DX_BYTE_ORDER=X_LITTLE_ENDIAN -D_XSERVER64 -DJENSEN_SUPPORT   ftfuncs.c
In file included from ftfuncs.c:48:
ft.h:73: warning: redundant redeclaration of `FreeTypeRegisterFontFileFunctions' in same scope
../../../include/fonts/fontproto.h:91: warning: previous declaration of `FreeTypeRegisterFontFileFunctions'
ftfuncs.c: In function `FreeTypeAddProperties':
ftfuncs.c:966: error: pointer value used where a floating point value was expected
ftfuncs.c:968: error: pointer value used where a floating point value was expected
make[6]: *** [ftfuncs.o] Error 1
make[6]: Leaving directory `/home/ishikawa/work/XFree86/4.3.0/xfree86-4.3.0/build-tree/xc-xserver-xfree86-dbg/lib/font/FreeType'



 I think better to define FontLibSharedFreeType=NO, because XFree86-dbg
does exists to debug for normal XFree86 server. Difference between
FreeType2 included in normal XFree86 (source level inclusion in freetype.a
module). and FreeType2 linked against XFree86-dbg cause trouble to debug
libXfont FreeType backend area.


 Of cause build problem with FreeType2 should resolve to next XFree86
upstream release. Because current XFree86 upstream CVS tree already
import FreeType 2.1.4 :-)



ISHIKAWA Mutsumi <ishikawa@debian.org> Fri Jun  6 15:40:25 JST 2003

-- 
ISHIKAWA Mutsumi
 <ishikawa@linux.or.jp>, <ishikawa@debian.org>, <ishikawa@netvillage.co.jp>



Reply to: