Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with C++ and gems on OSX Catalina

I am trying to install a new gem with:

gem install sassc

But it fails with C++ issues:

current directory: /usr/local/lib/ruby/gems/2.6.0/gems/sassc-2.2.0/ext
/usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0 -r ./siteconf20191127-10955-52fjdl.rb extconf.rb
creating Makefile

current directory: /usr/local/lib/ruby/gems/2.6.0/gems/sassc-2.2.0/ext
make "DESTDIR=" clean

current directory: /usr/local/lib/ruby/gems/2.6.0/gems/sassc-2.2.0/ext
make "DESTDIR="
compiling ./libsass/src/units.cpp
In file included from ./libsass/src/units.cpp:3:
In file included from ./libsass/src/units.hpp:4:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:314:9: error: no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:315:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:316:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:749:12: note: 'finite' declared here
extern int finite(double)
           ^
In file included from ./libsass/src/units.cpp:3:
In file included from ./libsass/src/units.hpp:4:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no member named 'isnan' in the global namespace
using ::isnan;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:319:9: error: no member named 'isnormal' in the global namespace
using ::isnormal;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:320:7: error: no member named 'isgreater' in the global namespace; did you mean '::std::greater'?
using ::isgreater;
      ^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:728:29: note: '::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
                            ^
In file included from ./libsass/src/units.cpp:3:
In file included from ./libsass/src/units.hpp:4:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:321:7: error: no member named 'isgreaterequal' in the global namespace; did you mean '::std::greater_equal'?
using ::isgreaterequal;
      ^~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:757:29: note: '::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
                            ^
In file included from ./libsass/src/units.cpp:3:
In file included from ./libsass/src/units.hpp:4:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:322:9: error: no member named 'isless' in the global namespace
using ::isless;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:323:9: error: no member named 'islessequal' in the global namespace
using ::islessequal;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:324:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:325:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:326:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
13 errors generated.
make: *** [units.o] Error 1

make failed, exit code 2

I've tried everything I found on SO but nothing helped so far

like image 589
viplezer Avatar asked Nov 27 '19 13:11

viplezer


1 Answers

Found the solution through a swift forum it worked with me it seems that somehow the commandline tools got corrupted or just deprecated.

TL;DR;

  1. Remove CommandLine Tools directory: sudo rm -rf /Library/Developer/CommandLineTools
  2. Recreate with: sudo xcode-select -s /Applications/Xcode.app
like image 163
mimsugara Avatar answered Oct 15 '22 13:10

mimsugara