Error while compiling HDF4 with intel icx compiler

Hi, I was trying to compile HDF4-4.2.16, I am not getting any error while doing make(even though there are a number of warnings), but when I do make check it says a number of tests have been failed.
My system is:
Linux version 5.19.0-46-generic (Ubuntu 11.3.0-1ubuntu1~22.04.1)
icx: Intel(R) oneAPI DPC++/C++ Compiler 2023.1.0 (2023.1.0.20230320)
ifort: (IFORT) 2021.9.0 20230302
config.log (118.0 KB)
I have attached the log file. I am also attaching the output of make check.
check.txt (2.1 MB)
Commands used:

$ export CC=icc
$ export F77=ifort
$ ./configure --with-szlib=$HOME/szip --enable-fortran 
$ make
$ make check

I do not know what went wrong, in the config.log there are some errors, but I don’t know how to correct them. It will be great if anyone could help me.

In config.log: ./conftest: error while loading shared libraries: cannot open shared object file: No such file or directory.

The configure command has “–with-jpeg=/home/varsha/jpeg”. Does /home/varsha/jpeg/lib exist? If so, does it have, or what files are in that directory?

Yes do exists. Other files are libjpeg.a,, and and, there is also a folder named pkconfig with a file called libjpeg.pc.

We looked over the log files again. There was some other “fatal errors” in config.log. Adding --enable-hdf4-xdr to your configure command may take care of those. Please give that a try.


I tried the command with -enable-hdf4-xdr, but I am still getting fatal errors in the config.log, in addition to this I am getting errors when I do the ‘make’ command. I am attaching the log file and output of make. Thank you.

config.log (117.3 KB)
make.txt (23.9 KB)

Hi, @varsha.felzy

First of all, you must disable Fortran.

I have no issue with icx.
See my GitHub workflow and test result.

Pay attention to the following line in the workflow:

          ./configure --enable-shared --enable-hdf4-xdr --disable-fortran --disable-netcdf CXX="$(which icpx)" CC="$(which icx)" FC="$(which ifx)" 

FC is not used but I added it in case you want to try Fortran.


This is still giving me errors when I do ‘make’ command, similar to what I was getting before.
Thank you

Hi, @varsha.felzy !

Have you tried the latest patch release [1] or GitHub master branch [2]?
It would be nice if you can duplicate the error using GitHub Action and share the link.

[1] Release HDF 4.2.16-2 patch release · HDFGroup/hdf4 (
[2] HDFGroup/hdf4: Official HDF4 Library Repository (