Bug 69833

Summary: Incorrect SIZEOF_VOID_P and ALIGNOF_DOUBLE definitions causes nasty warnings on MacOSX when building fat libraries
Product: fontconfig Reporter: Dan Kegel <dank>
Component: libraryAssignee: Akira TAGOH <akira>
Status: RESOLVED FIXED QA Contact: Behdad Esfahbod <freedesktop>
Severity: enhancement    
Priority: medium CC: akira, fontconfig-bugs
Version: unspecified   
Hardware: Other   
OS: Mac OS X (All)   
i915 platform: i915 features:
Attachments: Patch to select right values at compile time rather than configure time

Description Dan Kegel 2013-09-26 04:35:16 UTC
Created attachment 86612 [details]
Patch to select right values at compile time rather than configure time

I had trouble building fontconfig-2.10.95 as a universal library on MacOSX.

For completeness, my environment has

CFLAGS=-O3 -g -arch i386 -arch x86_64 -isystem /opt/foo/include
CXXFLAGS=-O3 -g -arch i386 -arch x86_64 -isystem /opt/foo/include
OBJCFLAGS=-arch i386 -arch x86_64

and the command I use is

./configure --prefix=/opt/foo --disable-dependency-tracking --with-add-fonts=/Library/Fonts,~/Library/Fonts

This complains

In file included from fcint.h:29,
                 from fccache.c:26:
../config.h:8:1: warning: "ALIGNOF_DOUBLE" redefined
In file included from ../config.h:365,
                 from fccache.c:24:
../config-fixups.h:38:1: warning: this is the location of the previous definition

Happily, the macports and homebrew folks had a patch ready for this issue; see the script at

I'll attach the patch.  It's 13 lines, and just defines SIZEOF_VOID_P and
Comment 1 Akira TAGOH 2013-09-26 08:25:45 UTC
Well, that fix looks not correct. the problem is, it reads config.h twice because, as the error log says config-fixups.h contains the same definition already and it is supposed to be read at the end of config.h.

let me try to fix that anyway
Comment 2 Akira TAGOH 2013-09-26 08:52:15 UTC
Okay, git master should works.

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.