警告:命令行选项'-Wimplicit-int'对C / ObjC有效,但对C无效

loading...


0

试图在Ubuntu 16上为项目安装所需的gem我遇到了上面的错误 . 导致它的宝石是 mini_racer 0.2.4 .

导致错误的代码行在 /home/*/.rvm/gems/ruby-2.5.1/gems/mini_racer-0.2.4/ext/mini_racer_extension/Makefile 内 .

如何在安装项目gems mini_racer 0.2.4 获取的命令中从该行中删除选项 -Wimplicit-int

current directory:
/home/*/.rvm/gems/ruby-2.5.1/gems/mini_racer-0.2.4/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
cc1plus: warning: unrecognized command line option ‘-Wno-self-assign’
cc1plus: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1plus: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1plus: warning: unrecognized command line option ‘-Wno-tautological-compare’
linking shared-object mini_racer_extension.so
mini_racer_extension.so: final close failed: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:257: recipe for target 'mini_racer_extension.so' failed
make: *** [mini_racer_extension.so] Error 1

make failed, exit code 2

loading...

1回答

  • 0

    我在Gemfile中注释掉了 # mini_racer', platforms: :ruby 然后用 sudo gem install mini_racer 安装了 mini_racer . 它现在似乎工作 . 虽然 mini_racer 在Gemfile中仍然被注释掉了 .

评论

暂时没有评论!