Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7680 Discussions

error: identifier "_LIB_VERSION_TYPE" is undefined

Jervie
Beginner
736 Views

Hello,

 

I'm trying to install hdf5-1.8.13 on CentOS 8.2 using Intel compilers (2018.1.163), and I got the following error when I run "make" :

--------------

[root@cu01 hdf5-1.8.13]# make
Making all in src
make[1]: Entering directory '/root/packages/hdf5-1.8.13/src'
make all-am
make[2]: Entering directory '/root/packages/hdf5-1.8.13/src'
CC H5.lo
In file included from H5public.h(37),
from H5private.h(29),
from H5.c(24):
/usr/include/features.h(184): warning #1224: #warning directive: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
^

In file included from H5private.h(56),
from H5.c(24):
/opt/intel/2018/compilers_and_libraries_2018.1.163/linux/compiler/include/math.h(1214): error: identifier "_LIB_VERSION_TYPE" is undefined
_LIBIMF_EXTERN_C _LIB_VERSIONIMF_TYPE _LIBIMF_PUBVAR _LIB_VERSIONIMF;
^

compilation aborted for H5.c (code 2)
make[2]: *** [Makefile:1220: H5.lo] Error 1
make[2]: Leaving directory '/root/packages/hdf5-1.8.13/src'
make[1]: *** [Makefile:849: all] Error 2
make[1]: Leaving directory '/root/packages/hdf5-1.8.13/src'
make: *** [Makefile:587: all-recursive] Error 1

-------------

 

"_LIB_VERSION_TYPE" is not defined on my system. I tried to use "_LIB_VERSION_TYPE" defined in Intel's math.h by setting

export CFLAGS='-O3 -xHost -fPIC -D__PURE_INTEL_C99_HEADERS__'
export H5_CFLAGS='-std=c99 -O3 -D__PURE_INTEL_C99_HEADERS__'
export H5_CPPFLAGS='-D_POSIX_C_SOURCE=199506L -DNDEBUG -UH5_DEBUG_API -D__PURE_INTEL_C99_HEADERS__'

 

, and re-configure and re-make, but I met the same error.

 

Steps to re-produce this issue:

$export CC=mpiicc
$export CXX=mpiicpc
$export F77=mpiifort
$export FC=mpiifort
$export F90=mpiifort
$export OMPI_MPICC=icc
$export OMPI_MPICXX=icpc
$export OMPI_MPIFC=ifort
$export OMPI_MPIF90=ifort

$tar -zxvf hdf5-1.8.13.tar.gz
$cd hdf5-1.8.13

$./configure --with-zlib=${NCDIR} --prefix=${NCDIR} --enable-parallel --enable-shared -enable-fortran

$make

 

 

Any ideas?

Thank you!

0 Kudos
4 Replies
ShanmukhS_Intel
Moderator
694 Views

Hi,


Thanks for reaching out to us.


We are able to reproduce your issue using Intel compilers of 2018 Update 1. However, When we tried to compile using latest Intel oneAPI compilers i.e(2021 Update 3) we didn't face any issues. So, we would like to recommend you to use the latest version of Intel compilers. Please get back to us if you still face any issues.


Best Regards,

Shanmukh.SS


Jervie
Beginner
664 Views

Hi, 

 

Thank you for your reply. Yes, I also tried OneAPI, and it works well. The reason I used Intel 2018 is that although OneAPI works well when compile zlib, hdf5 and netcdf, after that it got some error messages when using OneAPI to compile my application.   However, Intel 2018 works well when using it to compile my application on other platforms.  Therefore, I could choose either solve the hdf5 compiling issue using Intel 2018 or solve the application compiling issue  using OneAPI.

 

For me, it would be much better if I could use OneAPI to compile my application and its dependencies (zlib, hdf5, and netcdf).

 

Followed is the error message when I use OneAPI to compile my application. In addition, I didn't got the following error message when I use Intel 2018 to compile my application. I'm not sure if it has something to do with the newer mpiiofrt in oneAPI.

mpiifort -O2 -ip -w -ftz -align all -fno-alias -no-heap-arrays -c -i4 -r8 -convert big_endian -assume byterecl -mcmodel=medium -extend_source -fp-model strict -free -I. -I/usr/local/include -I/usr/include -I/opt/intel/oneapi/mpi/2021.2.0/include endrun.f90
areaMod.f90(313): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: <LABEL> <IDENTIFIER> TYPE MODULE ELEMENTAL IMPURE NON_RECURSIVE PURE RECURSIVE ...
do jo = 1, nlat_o
----^
mpiifort -O2 -ip -w -ftz -align all -fno-alias -no-heap-arrays -c -i4 -r8 -convert big_endian -assume byterecl -mcmodel=medium -extend_source -fp-model strict -free -I. -I/usr/local/include -I/usr/include -I/opt/intel/oneapi/mpi/2021.2.0/include mkrank.f90
areaMod.f90(273): error #6218: This statement is positioned incorrectly and/or has syntax errors.
subroutine areaave (nlat_i , nlon_i , numlon_i, fld_i , &
-------------^
areaMod.f90(346): error #6702: END statement confusion.
end subroutine areaave
^
compilation aborted for areaMod.f90 (code 1)
gmake: *** [/home/bianqy/BCC_ESM_OneAPI//models/bld/Makefile:138: areaMod.o] Error 1
gmake: *** Waiting for unfinished jobs....
exit 2

 

 

I attached the code of areaMod.f90 in case. 

I could raise a new thread  if it is necessary.

Thank you!

ShanmukhS_Intel
Moderator
636 Views

Hi,


As the initial query has been answered. We recommend you to raise a new thread as it would be easy to track the issue in community.


We see that your application is written in Fortran. Hence, we recommend you to raise a new thread in Fortran forum provided below.


https://community.intel.com/t5/Intel-Fortran-Compiler/bd-p/fortran-compiler.


We also see that you are using mpiifort which is a mpi compiler, if your application contains issues related to mpi calls, we recommend you to raise a new thread in HPC forum provided below.


https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/bd-p/oneapi-hpc-toolkit


Could you please let us know if we can close this thread here.


Best Regards,

Shanmukh.SS


ShanmukhS_Intel
Moderator
592 Views

Hi,


We see from this link (https://community.intel.com/t5/Intel-Fortran-Compiler/error-5082-Syntax-error-found-END-OF-STATEMENT...) that you have raised a new query for the later issue and it was resolved too!

Since all your issues were resolved, we are closing this thread here. If you need further assistance, please post a new question.


Best Regards,

Shanmukh.SS


Reply