This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

strange compilation on PowerPC


Hello
I have a little problem when installing xfree. I thought first it was relevant of xfree project. I checked and the problem come from a software "mkfontscale" (it comes with Xfree) which is linked to the library freetype. And the problem is in this library I think.
I use linux-2.6.7, glibc-2.3.3, XFree-4.4, freetype-2.1.9 and gcc-3.3.4 on an Apple ibook G4. No others strange problems detected.


Compilation of mkfontscale is ok, but its execution is quite strange.
In the source code of mkfontscale, a call to a function of freetype is made : FT_Get_Name_Index()
In the source code of this freetype function, a call to another function of freetype is made : FT_FACE_LOOKUP_SERVICE()


The full code of the function FT_Get_Name_Index() is :

FT_EXPORT_DEF( FT_UInt )
 FT_Get_Name_Index( FT_Face     face,
                    FT_String*  glyph_name )
 {
   FT_UInt  result = 0;
   if ( face && FT_HAS_GLYPH_NAMES( face ) )
   {
     FT_Service_GlyphDict  service;
     FT_FACE_LOOKUP_SERVICE( face,
                             service,
                             GLYPH_DICT );
     if ( service && service->name_index )
       result = service->name_index( face, glyph_name );
   }
   return result;
 }


The execution is strange :
Without change, this code crashes when mkfontscale is applied to a font dir which contains Type1 fonts.
The crash only results on :


axel@linuxbox $ ./mkfontscale /usr/X11R6/lib/X11/fonts/Type1
illegal instruction

Adding an instruction : printf(""); after the call to FT_FACE_LOOKUP_SERVICE() resolves this problem and mkfontscale builds the fonts.scale file.

I have posted on XFree and freetype mailing lists, whitout answers for the moment.
Should i test with gcc-3.4 ?


Regards.
Axel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]