Bug 601 - fixing symbol glitches introduced by freetype 2.1.8
Summary: fixing symbol glitches introduced by freetype 2.1.8
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xfont (show other bugs)
Version: 6.7.0
Hardware: All All
: high normal
Assignee: Egbert Eich
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-06 02:01 UTC by Egbert Eich
Modified: 2004-05-05 17:10 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix for the problems described (2.82 KB, patch)
2004-05-06 02:54 UTC, Egbert Eich
no flags Details | Splinter Review
Proposed workaround for "makedepend" crash (914 bytes, patch)
2004-05-07 02:33 UTC, Roland Mainz
no flags Details | Splinter Review

Description Egbert Eich 2004-05-06 02:01:20 UTC
The merger of freetype 2.1.8. has introduced some symbol glitches:
ft_isdigit is not used everywhere also the LZW code is now required for
pcf fonts. Also CHAR_BITS should not be fixed in freetype2's ftconfig.h
but rather in a ftstdlib.h.
(See attached patch for details)
Comment 1 Egbert Eich 2004-05-06 02:54:49 UTC
Created attachment 266 [details] [review]
Fix for the problems described

apart from this delete ftconfig.h in lib/font/FreeType/, move ftstddefs.h to
myftstddefs.h in lib/font/FreeType/module and restore extras/freetype2 to
2.1.8.
Comment 2 Egbert Eich 2004-05-06 03:14:02 UTC
I actually ment to say ftstdlib.h instead of ftstddefs.h.
Comment 3 Roland Mainz 2004-05-07 00:55:17 UTC
It seems the checked-in change broke the build on SuSE 8.2 Linux/x86:
-- snip --
make[3]: Entering directory
`/home/gismobile/projects/xorg/work4/xc/lib/freetype2'
../../config/makedepend/makedepend  -- -I -I.   -I../../extras/freetype2/src   
-I../../extras/freetype2/src/base       
-I../../extras/freetype2/src/autofit      
-I../../extras/freetype2/src/autohint   -I../../extras/freetype2/src/bdf       
-I../../extras/freetype2/src/cff    -I../../extras/freetype2/src/cid       
-I../../extras/freetype2/src/gzip        -I../../extras/freetype2/src/lzw 
-I../../extras/freetype2/src/pcf -I../../extras/freetype2/src/pfr       
-I../../extras/freetype2/src/psaux     
-I../../extras/freetype2/src/pshinter      
-I../../extras/freetype2/src/psnames    -I../../extras/freetype2/src/raster    
-I../../extras/freetype2/src/sfnt   -I../../extras/freetype2/src/smooth    
-I../../extras/freetype2/src/truetype   -I../../extras/freetype2/src/type1     
-I../../extras/freetype2/src/type42 -I../../extras/freetype2/src/winfonts  
-I../../exports/include -I../../exports/include/freetype2
-I../../exports/include/freetype2/config  -I../../exports/include/X11  -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      -DXFREE86_FT2 
-DXVENDORNAME='"The X.Org Foundation"' -DXVENDORNAMESHORT='"X.Org"'
-DUSE_MAKEDEPEND -- ftapi.c             ftbase.c            
ftbbox.c             ftbdf.c             ftdebug.c            
ftglyph.c             ftinit.c             ftmm.c            
ftpfr.c             ftstroke.c             ftsynth.c            
ftsystem.c             fttype1.c             ftwinfnt.c            
ftxf86.c       autofit.c        autohint.c       bdf.c       cff.c      
type1cid.c       ftgzip.c       ftlzw.c       pcf.c       pfr.c      
psaux.c       pshinter.c       psnames.c       raster.c       sfnt.c      
smooth.c       truetype.c       type1.c       type42.c       winfnt.c
../../config/makedepend/makedepend: warning:  /usr/include/gnu/stubs.h: 
non-portable whitespace encountered at line 7
../../config/makedepend/makedepend: warning:  ftapi.c (reading
../../exports/include/freetype2/freetype/config/ftconfig.h), line 82: #error
"Unsupported size of `int' type!"
../../config/makedepend/makedepend: warning:  ftapi.c (reading
../../exports/include/freetype2/freetype/config/ftconfig.h), line 91: #error
"Unsupported size of `long' type!"
make[3]: *** [depend] Floating point exception
make[3]: Leaving directory
`/home/gismobile/projects/xorg/work4/xc/lib/freetype2'
make[2]: *** [depend] Error 2
make[2]: Leaving directory `/home/gismobile/projects/xorg/work4/xc/lib'
make[1]: *** [depend] Error 2
make[1]: Leaving directory `/home/gismobile/projects/xorg/work4/xc'
make: *** [World] Error 2
-- snip --
... reopening bug...
Comment 4 Roland Mainz 2004-05-07 00:56:32 UTC
Egbert - can you take a look at that problem, please ?
Comment 5 Egbert Eich 2004-05-07 01:31:48 UTC
The fix should be 
makedepend foobar || true;
so that make doesn't choke. makedepend is broken.
Working around broken makedepend in the code is broken, too.
My hope is to get rid of these problems with automake as I'm ususally the damn
idiot who gets to support crap like makedepend which crashes with a floating
point exception.
I'm tired of having to do the chores.
Comment 6 Roland Mainz 2004-05-07 02:31:34 UTC
Egbert Eich wrote:
> The fix should be 
> makedepend foobar || true;
> so that make doesn't choke. makedepend is broken.

Er... what about adding a small workaround in "makedepend" itself ?

> Working around broken makedepend in the code is broken, too.
> My hope is to get rid of these problems with automake as I'm ususally the damn
> idiot who gets to support crap like makedepend which crashes with a floating
> point exception.

"automake" is no solution... this will only introduce more problems than it
solves. You fix this issue and get 20 other ones... ;-(((

> I'm tired of having to do the chores.

OKOK... I make a patch... one sec, please... :)
Comment 7 Roland Mainz 2004-05-07 02:33:40 UTC
Created attachment 270 [details] [review]
Proposed workaround for "makedepend" crash

The patch works around the problem via avoiding a division-by-zero exception.
Not nice but "makedepend" stops crashing (the real solution would be to fix the
parser but I'll try to avoid that for now... =:-)
Comment 8 Roland Mainz 2004-05-07 02:34:22 UTC
Egbert:
Is the patch OK for you ?
Comment 9 Egbert Eich 2004-05-07 03:10:07 UTC
That's the hardcore fix.
I found out the real origin:
gcc has some intrinsic define __CHAR_BIT__ makedepend doesn't know about.
When GNUC is defined (this seems to be defined implicitely in makedepend)
limit.h includes the gcc specific limit.h and defines CHAR_BIT to __CHAR_BIT__.

The fix for this is to add 
#if defined (__CHAR_BIT__)
        {"__CHAR_BIT__", DEF_STRINGIFY(__CHAR_BIT__)},
#endif
to config/imake/imakemdep.h

So who whould have thought of that?

I'm going to commit the patch soon.


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.