cudaパッケージをcabalでインストールしようとすると、configureステージでエラーが起きる。

checking for gcc... /usr/lib64/ccache/gcc
checking whether the C compiler works... no

cuda sdkのサンプル自体は問題なくコンパイルできるのに、なんで?