You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot build Node on macOS: "No acceptable C compiler found!" #17238
Platform: macOS 10.13.1 (17B48) (Darwin mgol-mbpro.local 17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64)
Subsystem:
I have latest XCode (9.1 (9B55))& Command Line Tools installed on a fully updated High Sierra. python resolves to a version 2.7.10; I have make3.81. This fulfills all requirements at https://github.com/nodejs/node/blob/master/BUILDING.md#unix--macos and yet when I run ./configure I get the following:
WARNING: failed to autodetect C++ compiler version (CXX=ccache clang++ -Qunused-arguments)
WARNING: failed to autodetect C compiler version (CC=ccache clang -Qunused-arguments)
Node.js configure error: No acceptable C compiler found!
Please make sure you have a C compiler installed on your system and/or
consider adjusting the CC environment variable if you installed
it in a non-standard prefix.
If you have run xcode-select --install, the command line tools are installed and clang works from the command line, I'd suspect something might be wrong with ccache (since, as far as I can see, your $CC and $CXX env variables contain ccache clang -Qunused-arguments and ccache clang++ -Qunused-arguments). Maybe try to run something like ccache clang --version.
I don't seem to have the ccache command available. 🤔 Weird, I definitely have XCode & CLT installed. Homebrew doesn't complain and I've been able to install native Node deps that weren't pre-compiled (like node-sass) and it worked.
ccache isn't a part of XCode and CLT, nor even a part of what one would call a "standard" C/C++ toolchain. If you haven't modified your CC and CXX environment variables yourself on purpose to use ccache, it's kinda weird how it got there. I'd suggest you to check your .bashrc/.bash_profile/.zshrc.
Activity
aqrln commentedon Nov 22, 2017
If you have run
xcode-select --install, the command line tools are installed andclangworks from the command line, I'd suspect something might be wrong withccache(since, as far as I can see, your$CCand$CXXenv variables containccache clang -Qunused-argumentsandccache clang++ -Qunused-arguments). Maybe try to run something likeccache clang --version.mgol commentedon Nov 22, 2017
I don't seem to have the
ccachecommand available. 🤔 Weird, I definitely have XCode & CLT installed. Homebrew doesn't complain and I've been able to install native Node deps that weren't pre-compiled (likenode-sass) and it worked.aqrln commentedon Nov 22, 2017
ccacheisn't a part of XCode and CLT, nor even a part of what one would call a "standard" C/C++ toolchain. If you haven't modified yourCCandCXXenvironment variables yourself on purpose to useccache, it's kinda weird how it got there. I'd suggest you to check your.bashrc/.bash_profile/.zshrc.mgol commentedon Nov 22, 2017
You're right, I had CC etc. redefined in
~/.zshrc; a byproduct of trying to compile Chromium in the past...Sorry for taking your time and thanks for help! I'm closing the issue.