Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

Not able to install Nokogiri because of gcc on MacOS Catalina

$
0
0

I am trying to install nokogiri on my MacOS Catalina 10.15.1

gem install nokogiri

The error in the log file I see is as following

"gcc -o conftest -I/Users/shairyar/.rvm/rubies/ruby-2.6.3/include/ruby-2.6.0/x86_64-darwin18 -I/Users/shairyar/.rvm/rubies/ruby-2.6.3/include/ruby-2.6.0/ruby/backward -I/Users/shairyar/.rvm/rubies/ruby-2.6.3/include/ruby-2.6.0 -I. -I/usr/local/opt/readline/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens  -fno-common -pipe  -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2 conftest.c  -L. -L/Users/shairyar/.rvm/rubies/ruby-2.6.3/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl@1.1/lib -L. -L/usr/local/opt/readline/lib -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl@1.1/lib     -lruby.2.6    "
    gcc: error: unrecognized command line option '-Wdivision-by-zero'; did you mean '-Wdiv-by-zero'?
    gcc: error: unrecognized command line option '-Wshorten-64-to-32'
    gcc: error: unrecognized command line option '-Wextra-tokens'; did you mean '-Wextra-semi'?
    checked program was:
    /* begin */
    1: #include "ruby.h"
    2:
    3: int main(int argc, char **argv)
    4: {
    5:   return 0;
    6: }
    /* end */

I have been googling and i have tried to install gcc via brew install gcc&& brew link gcc but that does not help. Here are the gcc version i have.

$which gcc
/usr/local/bin/gcc

$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin19/9.2.0/lto-wrapper
Target: x86_64-apple-darwin19
Configured with: ../gcc-9.2.0/configure --build=x86_64-apple-darwin19 --disable-nls --enable-checking=release --with-system-zlib --disable-multilib --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk --enable-languages=c,c++,fortran --with-gmp=/usr/local --with-mpc=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 9.2.0 (GCC)

I have also tried the following which did not work.

  1. gem install nokogiri -- --use-system-libraries
  2. CC=llvm-gcc gem install nokogiri

I am out of all ideas and anything i am finding online does not seem to work, I will appreciate any tips here.


Viewing all articles
Browse latest Browse all 22113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>