Configure error installing fftw

妖精的绣舞 提交于 2019-12-13 06:46:51

问题


I just followed the instructions here to update my gcc. Now I am trying to install FFTW. So I downloaded the filed here. After I unzip and navigate to that directory I run this:

./configure  --enable-mpi --enable-threads --enable-openmp

But I get the following error:

checking for OpenMP flag of C compiler... unknown
configure: error: don't know how to enable OpenMP

I know OpenMP didn't work before I updated GCC, but it does now if I do this:

export PATH=/usr/local/gcc-6.1.0/bin:$PATH
gcc-6.1.0 main.c -o main

So I'm guessing the problem is that when I try to configure FFTW it is using the default gcc, but I need it to use gcc-6.1.0. How can I do this?


回答1:


From the manual, CC is the environment variable to set the compiler for configure.

./configure CC=gcc-6.1.0 --enable-mpi --enable-threads --enable-openmp

should set the version of gcc for that configure. You can also consider changing the symbolic link for gcc.




回答2:


Your method of setting PATH should work if you also set LD_LIBRARY_PATH to the lib or lib64 which was installed along with your new gcc. It should be in the same directory as bin.



来源:https://stackoverflow.com/questions/39542979/configure-error-installing-fftw

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!