镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Cannot build Node on macOS: "No acceptable C compiler found!" #17238

Description

@mgol
  • Version: master
  • 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 make 3.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.
        

Activity

  1. aqrln commented on Nov 22, 2017

    @aqrln
    Contributor

    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.

  2. added
    buildIssues and PRs related to Node.js builds or CI infrastructure.
    macosIssues and PRs related to the macOS platform.
    on Nov 22, 2017
  3. mgol commented on Nov 22, 2017

    @mgol
    ContributorAuthor

    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.

  4. aqrln commented on Nov 22, 2017

    @aqrln
    Contributor

    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.

  5. mgol commented on Nov 22, 2017

    @mgol
    ContributorAuthor

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to Node.js builds or CI infrastructure.macosIssues and PRs related to the macOS platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions