Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

El Capitan: CGFont.h:53:1: error: initializer element is not constant #904

Open
certik opened this issue Dec 17, 2015 · 1 comment
Open

Comments

@certik
Copy link
Member

certik commented Dec 17, 2015

This seems to be a bug in the OS X header files:

[python] gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include -I/Users/certik/.hashdist/bld/bzip2/hd7dmrit2nfc/include -I/Users/certik/.hashdist/bld/gdbm/bgcqycfe5g4s/include -I/Users/certik/.hashdist/bld/launcher/flhfyc244ki3/include -I/Users/certik/.hashdist/bld/ncurses/a53fawebbppx/include -I/Users/certik/.hashdist/bld/openssl/e2sl2b4i53uq/include -I/Users/certik/.hashdist/bld/readline/wthpumklr6m7/include -I/Users/certik/.hashdist/bld/sqlite/pby4z4go3zcd/include -I/Users/certik/.hashdist/bld/zlib/li2wcyb4qc6l/include  -DPy_BUILD_CORE  -c ./Modules/threadmodule.c -o Modules/threadmodule.o
[python] In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:18:0,
[python]                  from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9,
[python]                  from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11,
[python]                  from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35,
[python]                  from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24,
[python]                  from Include/pymactoolbox.h:10,
[python]                  from Python/mactoolboxglue.c:27:
[python] /System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h:53:1: error: initializer element is not constant
[python]  static const CGFontIndex kCGGlyphMax = kCGFontIndexMax;
[python]  ^

Not sure what the best fix is. Either:

  • ship our patched version of the header file in gcc, just like we already do for /usr/include/dispatch/object.h
  • not include this header file in Python
@jcftang
Copy link
Member

jcftang commented Jan 17, 2016

This is odd, I did not have this issue when I built python on el capitan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants