freetype
[Top][All Lists]
Advanced

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

Re: [ft] freetype2 and Win64


From: NightStrike
Subject: Re: [ft] freetype2 and Win64
Date: Wed, 2 Sep 2009 22:29:55 -0400

I'm using a linux64 to win64 cross compiler available here:

https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/mingw-w64-bin_x86_64-linux_20090902.tar.bz2/download

>From this page:

https://sourceforge.net/projects/mingw-w64/files/


This is the mingw-w64 sf project of which I am an administrator.

This is with a GCC 4.5 toolchain (built off of GCC HEAD and binutils HEAD).

Mostly, warnings like this just require casting the pointer into an
intptr_t type instead of a long, which is a more portable way of doing
things.  Your setup, however, requires changing your own internal
typedef, which seems to be used for more than just capturing pointers.
 It seems to be somewhat overloaded in its purpose.


We are always active on irc://irc.oftc.net/#mingw-w64 if you'd like to
join.  A web based client is on the sf website:

http://mingw-w64.sourceforge.net/mibbit.html

2009/9/2  <address@hidden>:
> Hi,
>
> Thank you for poining out the warning on Win64 platform
> and the analysis. I want to take a look, could you give
> me the information about your development environment to
> reproduce this issue? The messages you see look like by
> gcc.
>
> I've ever worked for a few LP64 systems of Unix and Mac
> OS X, but never worked for Win64.
>
> Regards,
> mpsuzuki
>
>
> On Wed, 2 Sep 2009 18:27:22 -0400
> NightStrike <address@hidden> wrote:
>
>>While compiling freetype2 for Win64 to meet a VLC dependency, I
>>encounter these warnings:
>>
>>configure: WARNING: unrecognized options: --enable-msw,
>>--disable-dependency-tracking
>>configure: WARNING: unrecognized options: --enable-msw,
>>--disable-dependency-tracking
>>In file included from
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cff/cff.c:26:0:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cff/cffgload.c:
>>In function ‘cff_decoder_parse_charstrings’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cff/cffgload.c:866:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cff/cffgload.c:867:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cff/cffgload.c:868:12:
>>warning: cast from pointer to integer of different size
>>In file included from
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdf.c:30:0:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:
>>In function ‘bdf_create_property’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:1006:35:
>>warning: cast to pointer from integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:
>>In function ‘bdf_get_property’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:1031:14:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:
>>In function ‘_bdf_add_property’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:1276:26:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:1338:14:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:1375:28:
>>warning: cast to pointer from integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:
>>In function ‘_bdf_parse_start’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:2057:44:
>>warning: cast to pointer from integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:
>>In function ‘bdf_get_font_property’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/bdf/bdflib.c:2475:33:
>>warning: cast from pointer to integer of different size
>>In file included from
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcache.c:25:0:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftccmap.c:
>>In function ‘FTC_CMapCache_Lookup’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftccmap.c:371:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftccmap.c:371:12:
>>warning: cast from pointer to integer of different size
>>In file included from
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcache.c:29:0:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:
>>In function ‘FTC_ImageCache_Lookup’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:354:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:354:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:
>>In function ‘FTC_ImageCache_LookupScaler’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:416:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:416:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:
>>In function ‘FTC_SBitCache_Lookup’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:677:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:677:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:
>>In function ‘FTC_SBitCache_LookupScaler’:
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:740:12:
>>warning: cast from pointer to integer of different size
>>/home/nightstrike/work/vlc/extras/contrib/src/freetype2/src/cache/ftcbasic.c:740:12:
>>warning: cast from pointer to integer of different size
>>rmdir: 
>>/home/nightstrike/work/vlc/extras/contrib/include/freetype2/freetype/internal:
>>No such file or directory
>>
>>
>>
>>All of these are related to castings that assume that pointers are the
>>size of long.  On this platform, they are not.  I looked into some of
>>them, and I see for instance this:
>>
>>  /*************************************************************************/
>>  /*                                                                       */
>>  /* <Type>                                                                */
>>  /*    FT_Fixed                                                           */
>>  /*                                                                       */
>>  /* <Description>                                                         */
>>  /*    This type is used to store 16.16 fixed float values, like scaling  */
>>  /*    values or matrix coefficients.                                     */
>>  /*                                                                       */
>>  typedef signed long  FT_Fixed;
>>
>>
>>Well, that's an easy fix.  Just change signed long to intptr_t, and
>>problems are solved.
>>
>>However, the comments in the typedef say that FT_Fixed is expected to
>>be 16 bits by 16 bits.  This isn't the cast even on a linux 64 system,
>>where long is 32.32.  Further, why is a type like this being used to
>>store pointers?  Surely a pointer isn't a matrix coefficient.
>>
>>I want to be able to properly port this, but it seems like this isn't
>>as trivial as just replacing a bunch of long's with intptr_t's.
>>
>>
>>Where should we go from here?
>>
>>
>>_______________________________________________
>>Freetype mailing list
>>address@hidden
>>http://lists.nongnu.org/mailman/listinfo/freetype
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]