Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Superenv could need ENV['CPP'] = 'cc -E' (serf fails at CPP check on Xcode-only 10.8) #15402

samueljohn opened this Issue · 13 comments

6 participants


On Xcode-only (no CLT), 10.8 serf refused to install.

The critical part of the config.log:

configure:3922: checking how to run the C preprocessor
configure:4038: result: cpp
configure:4067: cpp  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK conftest.c
conftest.c:11: error: assert.h: No such file or directory
configure:4073: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error

I think the "Syntax error" is not the problem (I don't know why it's there).
The problem is that configure calls cpp.

Possible solution

Adding ENV['CPP'] = 'cc -E' to the superenv setup. I can confirm this works but I don't know if it breaks other things.

Perhaps adding a cpp script to Library/ENV/4.3/ would also be an option.


Kindly pinging @mxcl about this.


They purposely add a line like Syntax error because they are testing for something else, in this case, whether calling cpp even works.


@2bits ah, thanks :-)


any update on this?


@mxcl please review this proposal when you are free.


ping ping ping


Yes adding cpp to superbin is the solution. Not sure why I didn't do this.


OK we already have that.

No we won't do this: ENV['CPP'] = 'cc -E'

superbin sets as little as possible, since setting stuff breaks things.


I feel compelled to point out also that calling the superenv version of cpp does in fact do: cc -E


No there's a bug, it's calling cpp -E, amazing that this hasn't caused more trouble.


Well, I just hope this fix doesn't break other things. My understanding of all this stuff is that this should be more reliable. cpp is a poor-man's POSIX-compliant c-preprocessor.

@mxcl mxcl closed this in 0c93889
@theirix theirix referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@Sharpie Sharpie referenced this issue from a commit in Sharpie/homebrew
@mxcl mxcl Use cc -E, not cpp -E. Fixes #15402. ae03003
@sessyargc sessyargc referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@snakeyroc3 snakeyroc3 referenced this issue from a commit in snakeyroc3/homebrew
@mxcl mxcl Use cc -E, not cpp -E. Fixes #15402. 1c47747

Would this even still be an issue for serf now that serf uses scons for its build system instead of autotools?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.