|
本帖最后由 雾雨魔理沙 于 2023-12-20 17:44 编辑
求助:环境rocky linux9.3,amd 7950x
参考的贴子http://bbs.keinsci.com/thread-40792-1-1.html
which clang、clang++、flang都有路径显示,
编译时也写的绝对路径,如下:
- ./configure CC=/opt/aocc-compiler-4.1.0/bin/clang CXX=/opt/aocc-compiler-4.1.0/bin/clang++ FC=/opt/aocc-compiler-4.1.0/bin/flang --prefix=/opt/openmpi-5.0.0-aocc
复制代码
但是在编译openmpi-5.0.0和openmpi-4.1.6 时均报错。
错误显示:
*** C++ compiler and preprocessor
checking whether the compiler supports GNU C++... yes
checking whether /opt/aocc-compiler-4.1.0/bin/clang++ accepts -g... yes
checking for /opt/aocc-compiler-4.1.0/bin/clang++ option to enable C++11 features... none needed
checking dependency style of /opt/aocc-compiler-4.1.0/bin/clang++... gcc3
checking how to run the C++ preprocessor... /opt/aocc-compiler-4.1.0/bin/clang++ -E
checking if C and C++ are link compatible... no
**********************************************************************
* It appears that your C++ compiler is unable to link against object
* files created by your C compiler. This generally indicates either
* a conflict between the options specified in CFLAGS and CXXFLAGS
* or a problem with the local compiler installation. More
* information (including exactly what command was given to the
* compilers and what error resulted when the commands were executed) is
* available in the config.log file in this directory.
**********************************************************************
configure: error: C and C++ compilers are not link compatible. Can not continue.
请问是什么原因呢,该如何解决?
|
|