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

Installation of SciRuby failed on Mac OS X

$
0
0

I am trying to install SciRuby on Mac machine but the installation failed. I have searched this issue but didn't help much and the issued were related to a different error.
when I used the command

gem install sciruby
Successfully installed sciruby-0.2.11
Parsing documentation for sciruby-0.2.11
Done installing documentation for sciruby after 0 seconds
1 gem installed

It successfully installed it. But when I used the command

gem install sciruby-full

I get this error

Building native extensions. This could take a while...
ERROR:  Error installing sciruby-full:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/ruby-minisat-2.2.0/ext/minisat
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20191203-21492-19ae7a3.rb extconf.rb
checking for -lminisat... no
checking for -lstdc++... yes
creating Makefile

current directory: /Library/Ruby/Gems/2.6.0/gems/ruby-minisat-2.2.0/ext/minisat
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.6.0/gems/ruby-minisat-2.2.0/ext/minisat
make "DESTDIR="
compiling minisat.c
compiling minisat-wrap.cpp
In file included from minisat-wrap.cpp:35:
In file included from ./../../minisat/minisat/core/Solver.h:24:
./../../minisat/minisat/mtl/Vec.h:99:97: warning: '&&' within '||' [-Wlogical-op-parentheses]
    if (add > INT_MAX - cap || ((data = (T*)::realloc(data, (cap += add) * sizeof(T))) == NULL) && errno == ENOMEM)
                            ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
./../../minisat/minisat/mtl/Vec.h:99:97: note: place parentheses around the '&&' expression to silence this warning
    if (add > INT_MAX - cap || ((data = (T*)::realloc(data, (cap += add) * sizeof(T))) == NULL) && errno == ENOMEM)
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from minisat-wrap.cpp:35:
In file included from ./../../minisat/minisat/core/Solver.h:27:
./../../minisat/minisat/utils/Options.h:63:44: warning: '&&' within '||' [-Wlogical-op-parentheses]
            return test1 < 0 || test1 == 0 && strcmp(x->type_name, y->type_name) < 0;
                             ~~ ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./../../minisat/minisat/utils/Options.h:63:44: note: place parentheses around the '&&' expression to silence this warning
            return test1 < 0 || test1 == 0 && strcmp(x->type_name, y->type_name) < 0;
                                           ^
                                (                                                   )
In file included from minisat-wrap.cpp:35:
In file included from ./../../minisat/minisat/core/Solver.h:28:
./../../minisat/minisat/core/SolverTypes.h:50:16: error: friend declaration specifying a default argument must be a definition
    friend Lit mkLit(Var var, bool sign = false);
               ^
./../../minisat/minisat/core/SolverTypes.h:58:14: error: friend declaration specifying a default argument must be the only declaration
inline  Lit  mkLit     (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; }
             ^
./../../minisat/minisat/core/SolverTypes.h:50:16: note: previous declaration is here
    friend Lit mkLit(Var var, bool sign = false);
               ^
2 warnings and 2 errors generated.
make: *** [minisat-wrap.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ruby-minisat-2.2.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ruby-minisat-2.2.0/gem_make.out

I am using

ProductName: Mac OS X
ProductVersion: 10.15.1
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
Apple clang version 11.0.0 (clang-1100.0.33.12)

I think the error is due to gcc or clang related things. A detail explanation and solution of the above issue is highly appreciated.


Viewing all articles
Browse latest Browse all 22002

Trending Articles



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