【amazon linux】g++: error: unrecognized command line option ‘-Wimplicit-fallthrough=0’ エラー
amazon linux で railsプロジェクトをdeployしてたらハマったエラー
g++: error: unrecognized command line option ‘-Wimplicit-fallthrough=0’
g++
に問題あるけどなに?って感じ
単純に g++
のversionが低い
[root@hoge ~]# g++ --version g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
なので最新のを取ってくる
yum list \*gcc\*
して今回だと
yum install gcc72-c++.x86_64
これで新しく
[root@hogehoge~]# g++ --version g++ (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2) Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.