Bug 89336 - compilation error with gcc on AIX due to config.h not included first
Summary: compilation error with gcc on AIX due to config.h not included first
Status: RESOLVED FIXED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: All AIX
: medium normal
Assignee: fontconfig-bugs
QA Contact: Behdad Esfahbod
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-26 11:55 UTC by Michael Haubenwallner
Modified: 2015-02-26 12:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to ensure config.h is included first (789 bytes, patch)
2015-02-26 11:57 UTC, Michael Haubenwallner
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Haubenwallner 2015-02-26 11:55:03 UTC
With gcc on AIX I do get this compiler error:
powerpc-ibm-aix6.1.0.0-gcc -DHAVE_CONFIG_H -I. -I/tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src -I..  -I/tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1 -I/tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src -I/tools/haubi/buildbot/toolsbase-2015/usr/include/freetype2     -Wall -Wpointer-arith -Wstrict-prototypes       -Wmissing-prototypes -Wmissing-declarations     -Wnested-externs -fno-strict-aliasing -DFC_CACHEDIR='"/tools/haubi/buildbot/toolsbase-2015/var/cache/fontconfig"' -DFONTCONFIG_PATH='"/tools/haubi/buildbot/toolsbase-2015/etc/fonts"' -D_LINUX_SOURCE_COMPAT  -O2 -pipe -D_THREAD_SAFE  -c -o fcarch.o /tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src/fcarch.c
In file included from /tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src/fcint.h:41,
                 from /tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src/fcarch.c:26:
/usr/include/unistd.h:171: error: conflicting types for 'lseek64'
/usr/include/unistd.h:169: error: previous declaration of 'lseek64' was here
In file included from /usr/include/unistd.h:746,
                 from /tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src/fcint.h:41,
                 from /tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src/fcarch.c:26:
/usr/include/sys/lockf.h:64: error: conflicting types for 'lockf64'
/usr/include/sys/lockf.h:62: error: previous declaration of 'lockf64' was here
In file included from /tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src/fcint.h:41,
                 from /tools/haubi/buildbot/toolsbase-2015/var/tmp/portage/media-libs/fontconfig-2.11.1-r1/work/fontconfig-2.11.1/src/fcarch.c:26:
/usr/include/unistd.h:809: error: conflicting types for 'ftruncate64'
/usr/include/unistd.h:807: error: previous declaration of 'ftruncate64' was here
/usr/include/unistd.h:845: error: conflicting types for 'truncate64'
/usr/include/unistd.h:843: error: previous declaration of 'truncate64' was here
/usr/include/unistd.h:862: error: conflicting types for 'pread64'
/usr/include/unistd.h:859: error: previous declaration of 'pread64' was here
/usr/include/unistd.h:863: error: conflicting types for 'pwrite64'
/usr/include/unistd.h:860: error: previous declaration of 'pwrite64' was here
/usr/include/unistd.h:942: error: conflicting types for 'fclear64'
/usr/include/unistd.h:939: error: previous declaration of 'fclear64' was here
/usr/include/unistd.h:943: error: conflicting types for 'fsync_range64'
/usr/include/unistd.h:940: error: previous declaration of 'fsync_range64' was here
Makefile:599: recipe for target 'fcarch.o' failed
make[3]: *** [fcarch.o] Error 1
Comment 1 Michael Haubenwallner 2015-02-26 11:57:16 UTC
Created attachment 113843 [details] [review]
patch to ensure config.h is included first

config.h defines ABI-specific macros for AIX, which has to be done before including any system header file. This patch does this for src/fcarch.c

Thanks!
Comment 2 Akira TAGOH 2015-02-26 12:07:11 UTC
Thanks. merged.


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.