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

时间:2018-12-10 11:19:01

标签: ruby-on-rails ruby

尝试在Ubuntu 16上安装项目所需的gems我遇到了以上错误。导致它的宝石是mini_racer 0.2.4

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

在重新获得安装项目宝石-Wimplicit-int的命令时,如何从该行中删除选项mini_racer 0.2.4

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

1 个答案:

答案 0 :(得分:0)

我评论了 然后,Gemfile中的# mini_racer', platforms: :rubymini_racer一起安装了sudo gem install mini_racer。现在似乎可以正常工作了。尽管mini_racer在Gemfile中仍然被注释掉。