# How to compile v 1.10.7 on RHEL oneAPI: error: C compiler cannot create executables

**URL:** <https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257>\
**Category:** HDF5 Library\
**Created:** [April 29, 2024, 10:22pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257 "2024-04-29T22:22:52Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rk3199](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/r/ce7236/32.png) [@rk3199](https://forum.hdfgroup.org/u/rk3199)\
**Post date:** [April 29, 2024, 10:22pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/1 "2024-04-29T22:22:52Z")

</div>

What options do I need to get --enable-fortran to work? Just --enable-parallel works without errors.

I’ve tried:  
` ./configure --prefix=/cluster/shared/apps/hdf5p/1.10.7 --enable-fortran --enable-parallel CC=mpiicc FC=mpif90 CXX=mpiicpc CFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align" FFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align" CXXFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align" FFLAGS="-I$INTEL/oneapi/mpi/latest/include -L$INTEL/oneapi/mpi/latest/lib"`

As well as `FC=mpiifort`

```auto
checking for gcc... mpiicc
checking whether the C compiler works... no
configure: error: in `/cluster/home/me/hdf5-hdf5-1_10_7':
configure: error: C compiler cannot create executables

./configure --prefix=/cluster/shared/apps/hdf5p/1.10.7 --enable-fortran --enable-parallel CC=mpiicc FC=mpiifort CXX=mpiicpc CFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align" FFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align" CXXFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align" FFLAGS="-I$INTEL/oneapi/mpi/latest/include -L$INTEL/oneapi/mpi/latest/lib"

```

```auto
module loaded:

1) oneapi/tbb/2021.11 oneapi/intel_ipp_intel64/2021.10 15) oneapi/dal/2024.0.0
2) oneapi/oclfpga/2024.0.0 9) oneapi/ifort/2024.0.2 16) oneapi/compiler/2024.0.2
3) oneapi/compiler-rt/2024.0.2 10) oneapi/dpl/2022.3 17) oneapi/ccl/2021.11.2
4) oneapi/vtune/2024.0 11) oneapi/dpct/2024.0.0 18) oneapi/advisor/2024.0
5) oneapi/mpi/2021.11 12) oneapi/dnnl/3.3.0 19) oneapi/2024.0.0/2024.0.0
6) oneapi/mkl/2024.0 13) oneapi/dev-utilities/2024.0.0 20) oneapi/hpctoolkit/mpi/2021.11
7) oneapi/intel_ippcp_intel64/2021.9 14) oneapi/debugger/2024.0.0

```

```auto
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by HDF5 configure 1.10.7, which was
generated by GNU Autoconf 2.69. Invocation command line was

```

` $ ./configure --prefix=/cluster/shared/apps/hdf5p/1.10.7 --enable-fortran --enable-parallel CC=mpiicc FC=mpiifort CXX=mpiicpc CFLAGS=-fPIC -O3 -xHost -ip -fno-alias -align FFLAGS=-fPIC -O3 -xHost -ip -fno-alias -align CXXFLAGS=-fPIC -O3 -xHost -ip -fno-alias -align FFLAGS=-I/cluster/shared/apps/oneapi/mpi/latest/include -L/cluster/shared/apps/oneapi/mpi/latest/lib`

[config.log](https://file.io/xDvVVaPNnomw).

---

<div class="post-metadata">

**Author:** ![brtnfld](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/brtnfld/32/1444_2.png) [@brtnfld](https://forum.hdfgroup.org/u/brtnfld)\
**Post date:** [April 30, 2024, 4:23pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/2 "2024-04-30T16:23:59Z")

</div>

The config.log file is not accessible. Can you upload it here?

---

<div class="post-metadata">

**Author:** ![hyoklee](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/hyoklee/32/1528_2.png) [@hyoklee](https://forum.hdfgroup.org/u/hyoklee)\
**Post date:** [April 30, 2024, 5:17pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/3 "2024-04-30T17:17:42Z")

</div>

Hi, @rk3199 !

Please try

1. HDF5 1.14.4.2 (latest release)
2. Intel OneAPI 2024.1 (latest release)
3. ./configure --prefix=/tmp CXX=“$(which mpiicpc) -cc=$(which icpx)” CC=“$(which mpiicc) -cc=$(which icx)” FC=“$(which mpiifort) -fc=$(which ifx)” LDFLAGS=“-L/opt/intel/oneapi/mpi/latest/lib” --enable-fortran --enable-parallel

Here’s a complete working example of GitHub Action:

> <https://github.com/hyoklee/actions/blob/main/.github/workflows/lin-auto-icx-f-p.yml>

Here’s a proof:

> **[GitHub - hyoklee/actions: Test GitHub Actions](https://github.com/hyoklee/actions/?tab=readme-ov-file#parallel)**
>
> Test GitHub Actions. Contribute to hyoklee/actions development by creating an account on GitHub.

I hope this helps!

See also: [instaltion of hdf5 with latest intel compilers - #5 by hyoklee](https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142/5)

---

<div class="post-metadata">

**Author:** ![dave.allured](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@dave.allured](https://forum.hdfgroup.org/u/dave.allured)\
**Post date:** [April 30, 2024, 8:31pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/4 "2024-04-30T20:31:06Z")

</div>

> The config.log file is not accessible. Can you upload it here?

Here is a copy of rk1399’s original config.log, which I looked at yesterday.  
[config.log](https://forum.hdfgroup.org/uploads/short-url/6P44LRf5GhKnjAqHOfFAz2LVz7r.log) (45.2 KB)

That upload site “[file.io](http://file.io)” is weird. I think it was set up to delete the file after single download, which I may have done accidentally.

Yes, it is right there on their website: “As soon as it has been received by the intended recipient, your file is gone forever!”

“Intended recipient.” Huh!

---

<div class="post-metadata">

**Author:** ![brtnfld](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/brtnfld/32/1444_2.png) [@brtnfld](https://forum.hdfgroup.org/u/brtnfld)\
**Post date:** [April 30, 2024, 9:40pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/5 "2024-04-30T21:40:25Z")

</div>

From the log file, it appears to be an issue with your mpiicc wrapper. Maybe you are supposed to use a different wrapper instead of mpiicc on your cluster?

```auto
configure:4692: mpiicc -fPIC -O3 -xHost -ip -fno-alias -align conftest.c >&5
/cluster/shared/apps/oneapi/hpctoolkit/mpi/2021.11/bin/mpiicx: line 539: icc: command not found
configure:4696: $? = 127
configure:4734: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "HDF5"
| #define PACKAGE_TARNAME "hdf5"
| #define PACKAGE_VERSION "1.10.7"
| #define PACKAGE_STRING "HDF5 1.10.7"
| #define PACKAGE_BUGREPORT "help@hdfgroup.org"
| #define PACKAGE_URL ""
| #define PACKAGE "hdf5"
| #define VERSION "1.10.7"
| /* end confdefs.h. */
| 
| int
| main ()
| {
| 
| ;
| return 0;
| }

```

---

<div class="post-metadata">

**Author:** ![rk3199](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/r/ce7236/32.png) [@rk3199](https://forum.hdfgroup.org/u/rk3199)\
**Post date:** [May 1, 2024, 5:38pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/6 "2024-05-01T17:38:49Z")

</div>

Thanks for the replies! One of our researchers was asking for the older version. I tried the suggestion:  
` ./configure --prefix=/tmp CXX="$(which mpiicpc) -cc=$(which icpx)" CC="$(which mpiicc) -cc=$(which icx)" FC="$(which mpiifort) -fc=$(which ifx)" LDFLAGS="-L/cluster/shared/apps/oneapi/hpctoolkit/mpi/latest/lib" --enable-fortran --enable-parallel`

These errors seem fatal:

```auto
icx: error: unknown argument '-qversion'; did you mean '--version'?
conftest.c:11:10: fatal error: 'ac_nonexistent.h' file not found
   11 | #include <ac_nonexistent.h>
      | ^ ~~~~~~~~~~~~~~~~~
1 error generated.

```

[config.log](https://forum.hdfgroup.org/uploads/short-url/3HP0HRrDHKESyqu8owbF5HmvKYM.log) (124.6 KB)

---

<div class="post-metadata">

**Author:** ![brtnfld](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/brtnfld/32/1444_2.png) [@brtnfld](https://forum.hdfgroup.org/u/brtnfld)\
**Post date:** [May 1, 2024, 6:00pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/7 "2024-05-01T18:00:48Z")

</div>

Ah, yes, if you want Fortran enabled, you need to use Autotools 2.71 and rerun autogen.sh because, for some reason, Intel introduced a compiler flag starting with “-l” which is getting interpreted as a library. This made us require Autotools 2.71, which causes all sorts of headaches for older systems. You might have more success using CMake instead.

```auto
/usr/bin/ld: cannot find -loopopt=1
icx: error: linker command failed with exit code 1 (use -v to see invocation)
configure:7644: $? = 1
configure: failed program was:

```

---

<div class="post-metadata">

**Author:** ![rk3199](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/r/ce7236/32.png) [@rk3199](https://forum.hdfgroup.org/u/rk3199)\
**Post date:** [May 1, 2024, 6:50pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/8 "2024-05-01T18:50:30Z")

</div>

> [@brtnfld](#):
>
> you need to use Autotools 2.71 and rerun autogen.sh because, for some reason, Intel introduced a compiler flag starting with “-l” which is getting interpreted as a library. This made us require Autotools 2.71, which causes all sorts of headaches for older systems.

Fortunately we have a test node where I installed the Fedora 2.71 autotools. And sure enough it works. Hope this helps someone down the line.

---

<div class="post-metadata">

**Author:** ![hyoklee](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/hyoklee/32/1528_2.png) [@hyoklee](https://forum.hdfgroup.org/u/hyoklee)\
**Post date:** [May 1, 2024, 7:19pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/9 "2024-05-01T19:19:48Z")

</div>

More notes for hdf5-1.10.7 + oneAPI 2024.1 users:

1. GitHub provides [hdf5-1\_10\_7.tar.gz](https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_10_7.tar.gz) . You can also run `autoreconf` instead of `autogen.sh`.
2. 1.10.7 test fails:  
`Testing contiguous, no data type conversion (char->char) *FAILED*`

Reference: [actions/.github/workflows/lin-auto-icx-f-10.7.yml at main · hyoklee/actions](https://github.com/hyoklee/actions/blob/main/.github/workflows/lin-auto-icx-f-10.7.yml)

---

<div class="post-metadata">

**Author:** ![rk3199](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/r/ce7236/32.png) [@rk3199](https://forum.hdfgroup.org/u/rk3199)\
**Post date:** [May 2, 2024, 2:19pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/10 "2024-05-02T14:19:02Z")

</div>

> [@hyoklee](#):
>
> GitHub [hdf5-1\_10\_7.tar.gz](https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_10_7.tar.gz) does not have `autogen.sh`. Run `autoreconf`.

I do see an `autogen.sh` file from [https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1\_10\_7.tar.gz](https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_10_7.tar.gz)

`-rwxr-xr-x 1 me user 8471 Oct 16 2020 **autogen.sh** `

---

<div class="post-metadata">

**Author:** ![hyoklee](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/hyoklee/32/1528_2.png) [@hyoklee](https://forum.hdfgroup.org/u/hyoklee)\
**Post date:** [May 2, 2024, 2:53pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/11 "2024-05-02T14:53:38Z")

</div>

Thank you so much for checking it thoroughly!  
My first GH Action failed and I thought it was due to missing autogen.sh.

---

<div class="post-metadata">

**Author:** ![rk3199](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/r/ce7236/32.png) [@rk3199](https://forum.hdfgroup.org/u/rk3199)\
**Post date:** [May 3, 2024, 6:15pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/12 "2024-05-03T18:15:31Z")

</div>

Intel [shared the article](https://www.intel.com/content/www/us/en/developer/articles/release-notes/oneapi-fortran-compiler-release-notes.html#inpage-nav-5-6) referencing this.

---

<div class="post-metadata">

**Author:** ![brtnfld](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/brtnfld/32/1444_2.png) [@brtnfld](https://forum.hdfgroup.org/u/brtnfld)\
**Post date:** [May 20, 2024, 1:42pm UTC](https://forum.hdfgroup.org/t/how-to-compile-v-1-10-7-on-rhel-oneapi-error-c-compiler-cannot-create-executables/12257/14 "2024-05-20T13:42:28Z")

</div>

Some HPC facilities have their own MPI wrappers that they would rather have users use instead of mpi\*\*. This is common for Cray systems where you have PrgEnv– modules, and the compiler wrappers (cc for C, ftn for Fortran) include additional link options and compiler flags.
