C compiler cannot create executables


Hello everyone,
I am trying to install HDF5 (1.14.0) on Ubuntu 22.04 (intel) system with the following command (enabling the parallel and using mpi):
./configure CC=mpicc FC=mpif90 --prefix="/home/user/PHDF5PATH" --enable-fortran --enable-parallel
but I got error: C compiler cannot create executables, when I looked at the log file the error starts as soon as ‘-V’ and ‘-qversion’ did not recognized for the mpicc and gcc and resulted in fatal error.
Following you can see part of log file that encounters the errors:

gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)
… rest of stderr output deleted …
configure:4839: $? = 0
configure:4828: mpicc -V >&5
gcc: error: unrecognized command-line option ‘-V’
gcc: fatal error: no input files
compilation terminated.
configure:4839: $? = 1
configure:4828: mpicc -qversion >&5
gcc: error: unrecognized command-line option ‘-qversion’; did you mean ‘–version’?
gcc: fatal error: no input files
compilation terminated.
configure:4839: $? = 1
configure:4859: checking whether the C compiler works
configure:4881: mpicc /home/user/OMPIPATH/include/ /home/user/OMPIPATH/include/ /home/user/OMPIPATH/lib/ conftest.c >&5
/usr/bin/ld: cannot find /home/user/OMPIPATH/include/: file format not recognized
/usr/bin/ld: cannot find /home/user/OMPIPATH/include/: file format not recognized
/usr/bin/ld: cannot find /home/user/OMPIPATH/lib/: file format not recognized
collect2: error: ld returned 1 exit status
configure:4885: $? = 1
configure:4923: result: no


This sounds like a recent known problem with Intel compilers. Do you have config.log? Does it contain “cannot find -loopopt”?

If not, then please post config.log and full console output, as text file attachments (not in message body).


Hello Dave,
Thank you for your reply, there is no “cannot find -loopopt” in the log file.
Of course, I have attached the log file and console output.
config.log (37.8 KB)
output.txt (1.4 KB)


Thanks. My first guess was wrong, this has nothing to do with Intel. In config.log lines 103-156, these settings don’t seem right. These should be compiler option strings, not simple paths with no options in front of them such as -I or -L. This is causing the compile failure at line 1042.


If you have set these in your environment before “configure”, try unsetting them, and run configure again. You might also need to keep these paths but put -I in front of the include paths, and -L in front of the lib path, to correctly build HDF5 parallel.


Yes I have set them in .bashrc file so the correct path would be like following?

export CFLAGS="/home/maryam/OMPIPATH/include/ -I"

I have attached my .bashrc related lines too. bash-lines.txt (397 Bytes)


No. Like this:

export CFLAGS="-I /home/maryam/OMPIPATH/include/"
export CPPFLAGS="-I /home/maryam/OMPIPATH/include/"
export FFLAGS="-I /home/maryam/OMPIPATH/include/"
export LDFLAGS="-L /home/maryam/OMPIPATH/lib/"

If that doesn’t work, just try setting all four to blank. Actually, try that first. This depends on the requirements of your mpicc installation, which I do not understand.

For more details on the use of FLAGS variables, please see part 4.3.6 in hdf5-1.14.0/release_docs/INSTALL.


Thank you, I am reviewing the release doc now, but by setting to blank or using -I -L in front of the path both result in following error:

configure: error: Fortran could not compile .f90 files

which is the case that I am not sure with following command (using mpi and parallel installing), what path for F77, F90 or any other fortran prefix I have to set in .bashrc.

./configure CC=mpicc FC=mpif90 --prefix="/home/maryam/PHDF5PATH" --enable-fortran --enable-parallel

Here is new log file
config.log (58.4 KB)


Good, the C compiler problem is solved. Now it looks like there is a problem with your fortran compiler.

configure:6857: mpif90 --version >&5
No underlying compiler was specified in the wrapper compiler data file
(e.g., mpicc-wrapper-data.txt)

If you do not need fortran, the simplest solution would be to remove “–enable-fortran”, and make a C-only, parallel build.

If you do need fortran, then this looks like a configuration problem with the fortran compiler itself, not HDF5. Please confirm that you can compile a simple fortran program such as Hello World, with mpif90.


Thank you in advance Dave.
Yes it seemed the mpi did not install by fortran correctly. It solved my problem.
I appreciate your time and help.