Bug 69833 - Incorrect SIZEOF_VOID_P and ALIGNOF_DOUBLE definitions causes nasty warnings on MacOSX when building fat libraries
Summary: Incorrect SIZEOF_VOID_P and ALIGNOF_DOUBLE definitions causes nasty warnings ...
Status: RESOLVED FIXED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: Other Mac OS X (All)
: medium enhancement
Assignee: Akira TAGOH
QA Contact: Behdad Esfahbod
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-26 04:35 UTC by Dan Kegel
Modified: 2013-09-26 08:52 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to select right values at compile time rather than configure time (704 bytes, text/plain)
2013-09-26 04:35 UTC, Dan Kegel
Details

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

CC=gcc
CFLAGS=-O3 -g -arch i386 -arch x86_64 -isystem /opt/foo/include
CPP=/usr/bin/cpp
CXX=g++
CXXCPP=/usr/bin/cpp
CXXFLAGS=-O3 -g -arch i386 -arch x86_64 -isystem /opt/foo/include
LDFLAGS=-L/opt/oblong/deps/lib
OBJCFLAGS=-arch i386 -arch x86_64
PATH=/opt/foo/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin
PKG_CONFIG_PATH=/opt/foo/lib/pkgconfig

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
https://github.com/snakeyroc3/homebrew/commit/8cde20b7a8de828e5e094366629f12ae83aa96ea

I'll attach the patch.  It's 13 lines, and just defines SIZEOF_VOID_P and
ALIGNOF_DOUBLE properly.
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.