Skip to content
New issue

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

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

Already on GitHub? # to your account

C compiler cannot create executables #1364

Closed
adshz opened this issue Oct 11, 2019 · 4 comments
Closed

C compiler cannot create executables #1364

adshz opened this issue Oct 11, 2019 · 4 comments

Comments

@adshz
Copy link

adshz commented Oct 11, 2019

I've tried all the way existing; (e.g. #1203 #1033) and changed account name (make it same as the home folder)

I tried brew install openssl libyaml libffi and 'brew tap homebrew/core && brew install apple-gcc42'

Of course, I install Xcode before


Downloading ruby-2.6.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.4.tar.bz2
/var/folders/9r/015pmbqd5wd84gkk466zhfgc0000gn/T/ruby-build.20191011210302.13473/ruby-2.6.4 /var/folders/9r/015pmbqd5wd84gkk466zhfgc0000gn/T/ruby-build.20191011210302.13473 ~
Installing ruby-2.6.4...
ruby-build: using readline from homebrew
checking for ruby... /usr/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-apple-darwin18.7.0
checking target system type... x86_64-apple-darwin18.7.0
checking whether the C compiler works... no
configure: error: in `/var/folders/9r/015pmbqd5wd84gkk466zhfgc0000gn/T/ruby-build.20191011210302.13473/ruby-2.6.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

BUILD FAILED (OS X 10.14.6 using ruby-build 20191004)

Inspect or clean up the working tree at /var/folders/9r/015pmbqd5wd84gkk466zhfgc0000gn/T/ruby-build.20191011210302.13473
Results logged to /var/folders/9r/015pmbqd5wd84gkk466zhfgc0000gn/T/ruby-build.20191011210302.13473.log

Last 10 log lines:
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-apple-darwin18.7.0
checking target system type... x86_64-apple-darwin18.7.0
checking whether the C compiler works... no
configure: error: in `/var/folders/9r/015pmbqd5wd84gkk466zhfgc0000gn/T/ruby-build.20191011210302.13473/ruby-2.6.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.
(base) Shenghongs-MacBook-Pro:~ dsz$ 

And if I type cat ~/.bash_profile and it output is

# added by Anaconda3 5.3.1 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<

# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH

# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
# added by Miniconda3 4.5.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/miniconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/miniconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<
export PATH="/usr/local/opt/node@10/bin:$PATH"
eva "$(rbenv init -)"
eval "$(rbenv init -)"
```


is it because I used conda before? 

Thanks~
@mislav
Copy link
Member

mislav commented Oct 31, 2019

Sorry you're having trouble. From just the output provided, I cannot say what exactly went wrong. I'm not familiar with Anaconda and therefore don't know if it's possible that it changed your environment in a way that rubies cannot be compiled.

@simoncthompson
Copy link

Had the same issue - removing Anaconda fixed it for me

@mislav
Copy link
Member

mislav commented Nov 11, 2019

Thank you @realsimont.

I'm going to attribute this to Anaconda and close this as not a bug with ruby-build.

If removing Anaconda doesn't fix this for you, please comment/reopen.

@FeliciaAnnKelleyTaylorGV

This comment was marked as spam.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants