Error while installing HDF5 in pc (centos 8 with intel compiler (icx, icpx and ifort))

Making all in src
make[1]: Entering directory ‘/home/manmeet/softwares/hdf5-1.8.13/src’
make all-am
make[2]: Entering directory ‘/home/manmeet/softwares/hdf5-1.8.13/src’
CC H5E.lo
H5E.c:1422:8: error: call to undeclared function ‘vasprintf’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1422 | if(HDvasprintf(&tmp, fmt, ap) < 0)
| ^
./H5private.h:1362:37: note: expanded from macro ‘HDvasprintf’
1362 | #define HDvasprintf(RET,FMT,A) vasprintf(RET,FMT,A)
| ^
H5E.c:1422:8: note: did you mean ‘vsprintf’?
./H5private.h:1362:37: note: expanded from macro ‘HDvasprintf’
1362 | #define HDvasprintf(RET,FMT,A) vasprintf(RET,FMT,A)
| ^
/usr/include/stdio.h:349:12: note: ‘vsprintf’ declared here
349 | extern int vsprintf (char *__restrict __s, const char *__restrict __format,
| ^
1 error generated.
make[2]: *** [Makefile:1220: H5E.lo] Error 1
make[2]: Leaving directory ‘/home/manmeet/softwares/hdf5-1.8.13/src’
make[1]: *** [Makefile:849: all] Error 2
make[1]: Leaving directory ‘/home/manmeet/softwares/hdf5-1.8.13/src’
make: *** [Makefile:587: all-recursive] Error 1

It’s likely that this error would be fixed by building a newer version of the library if possible - 1.8.13 is several years old.