makeで "all warnings being treated as errors" を避ける


./configure で warning も error として扱われる場合の対処法。

$ ./configure
$ make

...

cc1: all warnings being treated as errors
make[1]: *** [libarchive/archive_cryptor.lo] Error 1
make[1]: Leaving directory `/home/ubuntu/libarchive'
make: *** [all] Error 2

./configure の前に、警告を無視するための環境変数を CFLAGS / CXXFLAGS にセットしておく。
(CFLAGS は C コンパイラ用、CXXFLAGS は C++ コンパイラ用の環境変数。)

$ export CFLAGS="-Wno-error"
$ export CXXFLAGS="-Wno-error"
$ ./configure
$ make
$ sudo make install

参考: http://stackoverflow.com/questions/8132594/disable-werror-ini-configure-file