# Error while compiling HDF4 with intel icx compiler

**URL:** <https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273>\
**Category:** HDF4\
**Created:** [July 5, 2023, 11:24am UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273 "2023-07-05T11:24:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![varsha.felzy](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/v/b782af/32.png) [@varsha.felzy](https://forum.hdfgroup.org/u/varsha.felzy)\
**Post date:** [July 5, 2023, 11:24am UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273/1 "2023-07-05T11:24:45Z")

</div>

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](https://forum.hdfgroup.org/uploads/short-url/4eHQYTbjDdORuIIR8eHvHM0MRaJ.log) (118.0 KB)  
I have attached the log file. I am also attaching the output of make check.  
[check.txt](https://forum.hdfgroup.org/uploads/short-url/D6zeyycRfOUr09cI7hHz0ctPaj.txt) (2.1 MB)  
Commands used:

```auto
$ 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.  
Thankyou

---

<div class="post-metadata">

**Author:** ![lrknox](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lrknox](https://forum.hdfgroup.org/u/lrknox)\
**Post date:** [July 10, 2023, 2:28pm UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273/2 "2023-07-10T14:28:57Z")

</div>

In config.log: ./conftest: error while loading shared libraries: libjpeg.so.9: 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 libjpeg.so.9, or what files are in that directory?

---

<div class="post-metadata">

**Author:** ![varsha.felzy](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/v/b782af/32.png) [@varsha.felzy](https://forum.hdfgroup.org/u/varsha.felzy)\
**Post date:** [July 17, 2023, 7:11am UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273/3 "2023-07-17T07:11:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lrknox](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lrknox](https://forum.hdfgroup.org/u/lrknox)\
**Post date:** [July 17, 2023, 6:20pm UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273/4 "2023-07-17T18:20:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![varsha.felzy](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/v/b782af/32.png) [@varsha.felzy](https://forum.hdfgroup.org/u/varsha.felzy)\
**Post date:** [July 18, 2023, 7:34am UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273/5 "2023-07-18T07:34:40Z")

</div>

Hi,

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](https://forum.hdfgroup.org/uploads/short-url/ozcSJvD52rfBPaF5liQBK1oU2c8.log) (117.3 KB)  
[make.txt](https://forum.hdfgroup.org/uploads/short-url/pAVRd5VUnIkYWQI7URc3A3yWhHK.txt) (23.9 KB)

---

<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:** [July 20, 2023, 3:38pm UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273/6 "2023-07-20T15:38:13Z")

</div>

Hi, @varsha.felzy

First of all, you must disable Fortran.

I have no issue with icx.  
See my GitHub [workflow](https://github.com/hyoklee/actions/blob/main/.github/workflows/linux-icx-auto-h4.yml) and [test result](https://github.com/hyoklee/actions/actions/runs/5612897388/job/15207690763).

Pay attention to the following line in the workflow:

```auto
          ./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.

---

<div class="post-metadata">

**Author:** ![varsha.felzy](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/v/b782af/32.png) [@varsha.felzy](https://forum.hdfgroup.org/u/varsha.felzy)\
**Post date:** [July 21, 2023, 10:52am UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273/7 "2023-07-21T10:52:12Z")

</div>

Hi,

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

---

<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:** [July 21, 2023, 4:26pm UTC](https://forum.hdfgroup.org/t/error-while-compiling-hdf4-with-intel-icx-compiler/11273/8 "2023-07-21T16:26:27Z")

</div>

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 (github.com)](https://github.com/HDFGroup/hdf4/releases/tag/hdf-4_2_16-2)  
[2] [HDFGroup/hdf4: Official HDF4 Library Repository (github.com)](https://github.com/HDFGroup/hdf4/)
