New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure: error: C compiler cannot create executables #12492
Comments
This has nothing to do with Open MPI, but instead points to a problem with your compilers on this machine. Here is the relevant snippet from your config.log
|
But, even so, I still don't know how to solve this problem. |
First you should not load the It looks like your compiler setup is busted. |
Thank you for pointing this out. When compiling OpenMPI, I should not load the Intel MPI environment. This is because OpenMPI and Intel MPI are two different implementations of MPI, each with its libraries and runtime environments. Loading both MPI implementations simultaneously may cause conflicts in environment variables and libraries, leading to errors during compilation and runtime.
Again, I do have a misunderstanding here. I only need to make the above settings when I plan to use Intel MPI and Intel compilers to compile other applications. But in my case, the issue discussed here is not triggered by the above inappropriate settings.
Both failed, see below: werner@MZ73-LM1-000:~$ module load compiler/2023.1.0 mkl32/2023.2.0
werner@MZ73-LM1-000:~$ cat hello.c
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
werner@MZ73-LM1-000:~$ icc -o hello hello.c
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
In file included from /usr/include/features.h(510),
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h(33),
from /usr/include/stdio.h(27),
from hello.c(1):
/usr/include/x86_64-linux-gnu/gnu/stubs.h(7): catastrophic error: cannot open source file "/usr/include/x86_64-linux-gnu/gnu/stubs.h"
# include <gnu/stubs-32.h>
^
compilation aborted for hello.c (code 4)
werner@MZ73-LM1-000:~$ icc -c hello.c
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
In file included from /usr/include/features.h(510),
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h(33),
from /usr/include/stdio.h(27),
from hello.c(1):
/usr/include/x86_64-linux-gnu/gnu/stubs.h(7): catastrophic error: cannot open source file "/usr/include/x86_64-linux-gnu/gnu/stubs.h"
# include <gnu/stubs-32.h>
^
compilation aborted for hello.c (code 4)
|
Got it. The problem is triggered by the incomplete or error module file settings shipped by Intel OneAPI. Using the following module file that I created myself runs smoothly: werner@MZ73-LM1-000:~$ module load oneapi/2023.2.0
werner@MZ73-LM1-000:~$ cat hello.c
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
werner@MZ73-LM1-000:~$ icc -o hello hello.c
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
werner@MZ73-LM1-000:~$ ./hello
Hello, World!
werner@MZ73-LM1-000:~$ icc -c hello.c
icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message.
werner@MZ73-LM1-000:~$ file hello.o
hello.o: ELF 64-bit LSB relocatable, x86-64, version 1 (GNU/Linux), not stripped
werner@MZ73-LM1-000:~$ cd ~/Public/repo/github.com/open-mpi/ompi.git/build
werner@MZ73-LM1-000:~/Public/repo/github.com/open-mpi/ompi.git/build$ CC=icc CXX=icpc FC=ifort ../configure But my above module file also loads intel mpi. So, it would be better to create a more granular module file that doesn't load intel mpi. Below are the contents of the related module files:
|
Looks like the original reporting user has resolved the compiler issue in their environment. Closing the issue. |
I tried to compile ompi on Ubuntu 22.04.4 LTS with intel compilers, but failed as shown below:
See the attached
config.log
for more details.config.log.zip
Regards,
Zhao
The text was updated successfully, but these errors were encountered: