[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetype-devel
Subject:    [ft-devel] AIX 5.3 compile issue
From:       Perry Smith <pedz () easesoftware ! com>
Date:       2007-03-24 16:15:03
Message-ID: E86BFE0D-A336-4356-8382-38CCF1264612 () easesoftware ! com
[Download RAW message or body]

Hello,

I am not on this mailing list.  I'm hoping this may help others.

I am running AIX 5.3 and gcc 4.0.2.  I pulled down freetype-2.0.10  
and starting to build it.  I hit this error:

In file included from /usr/local/src/freetype-2.1.10/src/gzip/ 
ftgzip.c:44:
/usr/local/include/zlib.h:1183: error: syntax error before 'gzseek'
/usr/local/include/zlib.h:1183: error: syntax error before 'off_t'
/usr/local/include/zlib.h:1208: error: syntax error before 'gztell'
/usr/local/include/zlib.h:1276: error: syntax error before 'off_t'
/usr/local/include/zlib.h:1301: error: syntax error before 'off_t'
gmake: *** [/usr/local/src/freetype-2.1.10/objs/ftgzip.lo] Error 1

Basically off_t is not defined.  With gcc, including sys/types.h  
actually includes the gcc version of sys/types.h.  I never fully  
understood the details of this.  But it appears as if _ANSI_C_SOURCE  
is defined but _POSIX_SOURCE is not defined.  The typedef for off_t  
in gcc's version of sys/types.h is not hit -- it is inside the  
_POSIX_SOURCE define.  So I kludged ftgzip.c at line 43 to have this:

#ifndef _OFF_T
#define _OFF_T
#ifdef _LARGE_FILES
typedef long long       off_t;          /* 64 bit file offset */
#else
typedef long            off_t;          /* file offset (32/64) */
#endif /* _LARGE_FILES */
#endif /* _OFF_T */
#include <zlib.h>

This is basically the code lifted from gcc's version of sys/types.h  
and plopped into ftgzip.c.  This gets past my compile problem and I  
am able to build and install the code.  I have not tested anything  
yet but it should work.

Obviously this is not a real fix but it is a quick simple work around  
for others trying to compile freetype 2 for AIX 5.3 using gcc.

I hope this helps someone,
Perry Smith ( pedz@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems




_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic