LoginSignup
0

More than 5 years have passed since last update.

CFLAGSを誤記して"configure: error: C compiler cannot create executables"と言われた話

Last updated at Posted at 2014-03-22

mesaをビルドする際autogen.shの実行でCFLAGSを指定したのだが、-I(大文字アイ)を指定すべきところを間違えて-l(小文字エル)を書いてしまい以下のようなエラーがでた。

configure: error: C compiler cannot create executables

ググっても「gcc入れろ」とか「gccのバージョン指定しろ」というアドバイスしか見つからず解決に非常に時間がかかってしまった。

どうやら./configureでgccがちゃんと動くか実際にコンパイルをするフェーズがあるらしく、そのときおかしな指定されたCFLAGSのせいでコンパイルエラーとなり上のエラーメッセージとなったもよう。

環境変数、オプションの指定には気をつけましょう。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
0