Skip to content

OS X 10.10: /usr/include/dispatch/object.h doesn't work with gcc #742

@certik

Description

@certik

This is hit by many packages, and manifests as follows:

[gettext-bootstrap] libtool: compile:  gcc -c -DLOCALEDIR=\"/Users/certik/.hashdist/bld/gettext-bootstrap/spt6nwddjz7d/share/locale\" -DLOCALE_ALIAS_PATH=\"/Users/certik/.hashdist/bld/gettext-bootstrap/spt6nwddjz7d/share/locale\" -DLIBDIR=\"/Users/certik/.hashdist/bld/gettext-bootstrap/spt6nwddjz7d/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/Users/certik/.hashdist/bld/gettext-bootstrap/spt6nwddjz7d/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -I.. -I/Users/certik/.hashdist/bld/libiconv-bootstrap/y6dz7hsnygn3/include -g -O2 -fvisibility=hidden ./log.c  -fno-common -DPIC -o .libs/log.o
[gettext-bootstrap] In file included from /usr/include/dispatch/dispatch.h:51:0,
[gettext-bootstrap]                  from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15,
[gettext-bootstrap]                  from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13,
[gettext-bootstrap]                  from ./langprefs.c:29:
[gettext-bootstrap] /usr/include/dispatch/object.h:143:15: error: expected identifier or '(' before '^' token
[gettext-bootstrap]  typedef void (^dispatch_block_t)(void);
[gettext-bootstrap]                ^
[gettext-bootstrap] /usr/include/dispatch/object.h:362:3: error: unknown type name 'dispatch_block_t'
[gettext-bootstrap]    dispatch_block_t notification_block);
[gettext-bootstrap]    ^

E.g. hashdist/hashdist#332 is a duplicate of this bug.

To fix this, we need to ship the fixed header file with our gcc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions