freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] AIX 5.3 compile issue


From: Perry Smith
Subject: [ft-devel] AIX 5.3 compile issue
Date: Sat, 24 Mar 2007 11:15:03 -0500

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 ( address@hidden )
Ease Software, Inc. ( http://www.easesoftware.com )

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






reply via email to

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