Invalid auto generated preprocessor macro [0.34.x] #2542

Closed
lukewar opened this Issue Sep 29, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@lukewar

lukewar commented Sep 29, 2014

It looks that from version 0.34.0 Cocoapods create preprocessor macros for each project's configuration.
Those preprocessor macros are named after configuration. While macros have more restrictive naming conventions it causes compile error for some configurations.
Few examples:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/usr/include/AssertMacros.h:463:6: Token is not a valid binary operator in a preprocessor subexpression
...
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/usr/include/dispatch/dispatch.h:25:10: Could not build module 'Darwin'
...
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: Could not build module 'Foundation'

Egz. User names configuration using hyphen like Debug-Test same macro will be created.

I assume that this behaviour is caused by latest 'dependency pre configuration' enhancement

Way to fix that would be to replacing special characters while creating macros.

Example project

@flufff42

This comment has been minimized.

Show comment
Hide comment
@flufff42

flufff42 Sep 29, 2014

Contributor

I can confirm seeing this issue with build configurations named like @lukewar's.
Renaming these seems to resolve the issue.

Contributor

flufff42 commented Sep 29, 2014

I can confirm seeing this issue with build configurations named like @lukewar's.
Renaming these seems to resolve the issue.

@flufff42 flufff42 referenced this issue Sep 29, 2014

Closed

0.34.1 - #2538

@neonichu

This comment has been minimized.

Show comment
Hide comment
@neonichu

neonichu Sep 29, 2014

Member

I can confirm the problem.

One note: the example project does not contain any schemes, so to reproduce, one has to actually select the "Debug-Test" configuration in the scheme for building.

Member

neonichu commented Sep 29, 2014

I can confirm the problem.

One note: the example project does not contain any schemes, so to reproduce, one has to actually select the "Debug-Test" configuration in the scheme for building.

@neonichu neonichu self-assigned this Sep 29, 2014

@neonichu neonichu closed this in e112914 Sep 29, 2014

neonichu added a commit that referenced this issue Sep 29, 2014

@prasanthu

This comment has been minimized.

Show comment
Hide comment
@prasanthu

prasanthu Oct 2, 2014

When will you release the next version? I have this compile issue on my OS X 10.10. I am not able to use any older version on 10.10

When will you release the next version? I have this compile issue on my OS X 10.10. I am not able to use any older version on 10.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment