Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No appropriate GCC found, but my system uses Clang #2026

Closed
esmaeilmirzaee opened this issue Apr 10, 2019 · 8 comments
Closed

No appropriate GCC found, but my system uses Clang #2026

esmaeilmirzaee opened this issue Apr 10, 2019 · 8 comments

Comments

@esmaeilmirzaee
Copy link

esmaeilmirzaee commented Apr 10, 2019

I have tried to install nvm on Freebsd, but I've got the following error. It is worth mentioning, I use zsh, ohmyzsh on xfce Terminal. Would you please help me with the error?

   Installing latest LTS version.
   Detected that you have 4 CPU core(s)
   Running with 3 threads to speed up the build
   Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
   $>./configure --prefix=/home/Yinc/.nvm/versions/node/v10.15.3 <
   WARNING: failed to autodetect C++ compiler version (CXX=g++)
   WARNING: failed to autodetect C compiler version (CC=gcc)
   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.
  • Operating system and version: Freebsd-current

  • nvm debug output:

            nvm --version: v0.34.0
            $SHELL: /usr/local/bin/zsh
            $SHLVL: 1
            $HOME: /home/Yinc
            $NVM_DIR: '$HOME/.nvm'
            $PATH: $HOME/.rvm/gems/ruby-2.6.0/bin:$HOME/.rvm/gems/ruby-2.6.0@global                              /bin:$HOME/.rvm/rubies/ruby-2.6.0/bin:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME          /.rvm/bin
            $PREFIX: ''
            $NPM_CONFIG_PREFIX: ''
            $NVM_NODEJS_ORG_MIRROR: ''
            $NVM_IOJS_ORG_MIRROR: ''
            shell version: 'zsh 5.7.1 (amd64-portbld-freebsd13.0)'
            uname -a: 'FreeBSD FreeBSD 13.0-CURRENT r345355 GENERIC amd64'
            curl: /usr/local/bin/curl, curl 7.64.1 (amd64-portbld-freebsd13.0) libcurl/7.64.1 OpenSSL/1.1.1b zlib/1.2.11 nghttp2/1.37.0
            wget: /usr/local/bin/wget, GNU Wget 1.20 built on freebsd13.0.
            git: /usr/local/bin/git, git version 2.21.0
            grep: grep: aliased to grep  --color=auto --exclude={.bzr,CVS,.git,.hg,.svn} (grep           --color=auto --exclude={.bzr,CVS,.git,.hg,.svn}), grep (GNU grep) 2.5.1-FreeBSD
            awk: /usr/bin/awk, awk version 20121220 (FreeBSD)
            sed: illegal option -- -
            usage: sed script [-Ealnru] [-i extension] [file ...]
      sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
            sed: /usr/bin/sed, 
            cut: illegal option -- -
            usage: cut -b list [-n] [file ...]
         cut -c list [file ...]
         cut -f list [-s] [-w | -d delim] [file ...]
            cut: /usr/bin/cut, 
            basename: illegal option -- -
            usage: basename string [suffix]
         basename [-a] [-s suffix] string [...]
            basename: /usr/bin/basename, 
            rm: illegal option -- -
            usage: rm [-f | -i] [-dIPRrvWx] file ...
         unlink [--] file
            rm: /bin/rm, 
            mkdir: illegal option -- -
            usage: mkdir [-pv] [-m mode] directory_name ...
            mkdir: /bin/mkdir, 
            xargs: illegal option -- -
            usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]]
               [-J replstr] [-L number] [-n number [-x]] [-P maxprocs]
               [-s size] [utility [argument ...]]
            xargs: /usr/bin/xargs, 
            nvm current: system
            which node: /usr/local/bin/node
            which iojs: iojs not found
            which npm: /usr/local/bin/npm
            npm config get prefix: /usr/local
            npm root -g: /usr/local/lib/node_modules
  • nvm ls output:

            ->       system
            iojs -> N/A (default)
            node -> stable (-> N/A) (default)
            unstable -> N/A (default)
            lts/* -> lts/dubnium (-> N/A)
            lts/argon -> v4.9.1 (-> N/A)
            lts/boron -> v6.17.1 (-> N/A)
            lts/carbon -> v8.15.1 (-> N/A)
            lts/dubnium -> v10.15.3 (-> N/A)
  • How did you install nvm? (e.g. install script in readme, Homebrew): instruction in readme file

  • What steps did you perform? just instruction on the readme file

  • What happened? The system, installation script, identified Clang as a C compiler, but later claimed about no appropriate C compiler.

  • What did you expect to happen? No idea

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH? I think so, ohmyzsh.

@esmaeilmirzaee esmaeilmirzaee changed the title Not appropriate GCC found, but my system properly uses Clang No appropriate GCC found, but my system uses Clang Apr 10, 2019
@ljharb
Copy link
Member

ljharb commented Apr 10, 2019

You may need to set the CC or CCX env vars; but also, freeBSD is tricky because node doesn't support it. See #130 and #1207.

@esmaeilmirzaee
Copy link
Author

Thank you so much for provided links. I read them all, and I hope, I understand what the problem is. At this time, I think to help and put some resource to improve the issue. Although I am not sure I would be able to do the task perfectly, I like to put the effort because I believe that it could help many.

PS: I will remove the topic ASAP If this is not the right place to add this please let me know.

1 similar comment
@esmaeilmirzaee
Copy link
Author

Thank you so much for provided links. I read them all, and I hope, I understand what the problem is. At this time, I think to help and put some resource to improve the issue. Although I am not sure I would be able to do the task perfectly, I like to put the effort because I believe that it could help many.

PS: I will remove the topic ASAP If this is not the right place to add this please let me know.

@ljharb
Copy link
Member

ljharb commented Apr 11, 2019

Sure, what’d you have in mind?

@esmaeilmirzaee
Copy link
Author

I am thinking about moving forward step by step. First, providing the LTS installation package for the current version of FreeBSD. To do so, I think we have to follow the installation steps in a bare/fresh FreeBSD machine. We probe the potential errors or requirements, so then we can customise the installation process in NVM (especially requirements could be added to the NVM script).

Also, I am not sure about the consequences (Copyright issues, and regularities in both NodeJS and FreeBSD), but we can provide the specific package for FreeBSD by providing patches as needed.

@ljharb
Copy link
Member

ljharb commented Apr 12, 2019

I'm very hesitant to add freebsd-specific patches to nvm, especially since they'll vary widely by node version.

@esmaeilmirzaee
Copy link
Author

I see. Actually, I tried a bunch of methods to solve the issue. First, it is kind of converting FreeBSD to a Linux. In this approach, installing GNU tools (ie gcc/g++, gmake) solves the issue. Second, providing a new make file, which I really looking forward to starting.

@ljharb
Copy link
Member

ljharb commented Apr 14, 2019

So given that this is a known limitation of node itself, i think this should be closed.

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

No branches or pull requests

2 participants