Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors relate to HDF5 during 'make check' process: hdf5open.c:873:6: error: use of undeclared identifier 'H5FD_ros3_fapl_t' #2880

Closed
BiChong-Jin opened this issue Mar 7, 2024 · 11 comments

Comments

@BiChong-Jin
Copy link

BiChong-Jin commented Mar 7, 2024

The machine I am using:

Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy

Version of netCDF:
netcdf-c-4.9.2

Version of HDF5:
hdf5-1.14.3

Version of zlib:
zlib-1.3.1

Information about compiler:
~$ ifort --version ifort: remark #10448: Intel(R) Fortran Compiler Classic (ifort) is now deprecated and will be discontinued late 2024. Intel recommends that customers transition now to using the LLVM-based Intel(R) Fortran Compiler (ifx) for continued Windows* and Linux* support, new language support, new language features, and optimizations. Use '-diag-disable=10448' to disable this message. ifort (IFORT) 2021.11.1 20231117 Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

icx --version Intel(R) oneAPI DPC++/C++ Compiler 2024.0.2 (2024.0.2.20231213) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /opt/intel/oneapi/compiler/2024.0/bin/compiler Configuration file: /opt/intel/oneapi/compiler/2024.0/bin/compiler/../icx.cfg

The issue I am facing is during the 'make check' process of the netcdf. Before that, all the process of installing compiler, building hdf5, zlib, and the config process of netcdf had successfully done without any errors.

To me it seems like these errors is relate to hdf5, but I am not sure. I would like to know if anyone can give me any types of advice or suggestions on how I can resolve these errors. Thanks in advance.

The following is the error message of the 'make check' process.

libtool: compile: icx -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../oc2 -I../libnczarr -I/include -I/include -fno-strict-aliasing -MT libnchdf5_la-hdf5create.lo -MD -MP -MF .deps/libnchdf5_la-hdf5create.Tpo -c hdf5create.c -o libnchdf5_la-hdf5create.o >/dev/null 2>&1 mv -f .deps/libnchdf5_la-hdf5create.Tpo .deps/libnchdf5_la-hdf5create.Plo /bin/bash ../libtool --tag=CC --mode=compile icx -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../oc2 -I../libnczarr -I/include -I/include -fno-strict-aliasing -MT libnchdf5_la-hdf5open.lo -MD -MP -MF .deps/libnchdf5_la-hdf5open.Tpo -c -o libnchdf5_la-hdf5open.lo test -f 'hdf5open.c' || echo './'hdf5open.c libtool: compile: icx -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../oc2 -I../libnczarr -I/include -I/include -fno-strict-aliasing -MT libnchdf5_la-hdf5open.lo -MD -MP -MF .deps/libnchdf5_la-hdf5open.Tpo -c hdf5open.c -fPIC -DPIC -o .libs/libnchdf5_la-hdf5open.o

hdf5open.c:873:6: error: use of undeclared identifier 'H5FD_ros3_fapl_t' 873 | H5FD_ros3_fapl_t fa; | ^ hdf5open.c:879:13: error: use of undeclared identifier 'fa' 879 | fa.version = H5FD_CURR_ROS3_FAPL_T_VERSION; | ^ hdf5open.c:879:26: error: use of undeclared identifier 'H5FD_CURR_ROS3_FAPL_T_VERSION' 879 | fa.version = H5FD_CURR_ROS3_FAPL_T_VERSION; | ^ hdf5open.c:880:6: error: use of undeclared identifier 'fa' 880 | fa.authenticate = (hbool_t)0; | ^ hdf5open.c:881:6: error: use of undeclared identifier 'fa' 881 | fa.aws_region[0] = '\0'; | ^ hdf5open.c:882:6: error: use of undeclared identifier 'fa' 882 | fa.secret_id[0] = '\0'; | ^ hdf5open.c:883:6: error: use of undeclared identifier 'fa' 883 | fa.secret_key[0] = '\0'; | ^ hdf5open.c:903:7: error: use of undeclared identifier 'fa' 903 | fa.authenticate = (hbool_t)0; | ^ hdf5open.c:905:7: error: use of undeclared identifier 'fa' 905 | fa.authenticate = (hbool_t)1; | ^ hdf5open.c:909:15: error: use of undeclared identifier 'fa' 909 | strlcat(fa.aws_region,awsregion0,H5FD_ROS3_MAX_REGION_LEN); | ^ hdf5open.c:909:40: error: use of undeclared identifier 'H5FD_ROS3_MAX_REGION_LEN' 909 | strlcat(fa.aws_region,awsregion0,H5FD_ROS3_MAX_REGION_LEN); | ^ hdf5open.c:910:15: error: use of undeclared identifier 'fa' 910 | strlcat(fa.secret_id, awsaccessid0, H5FD_ROS3_MAX_SECRET_ID_LEN); | ^ hdf5open.c:910:43: error: use of undeclared identifier 'H5FD_ROS3_MAX_SECRET_ID_LEN' 910 | strlcat(fa.secret_id, awsaccessid0, H5FD_ROS3_MAX_SECRET_ID_LEN); | ^ hdf5open.c:911:29: error: use of undeclared identifier 'fa' 911 | strlcat(fa.secret_key, awssecretkey0, H5FD_ROS3_MAX_SECRET_KEY_LEN); | ^ hdf5open.c:911:59: error: use of undeclared identifier 'H5FD_ROS3_MAX_SECRET_KEY_LEN' 911 | strlcat(fa.secret_key, awssecretkey0, H5FD_ROS3_MAX_SECRET_KEY_LEN); | ^ hdf5open.c:914:20: error: call to undeclared function 'H5Pset_fapl_ros3'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 914 | if(H5Pset_fapl_ros3(fapl_id, &fa) < 0) | ^ hdf5open.c:914:47: error: use of undeclared identifier 'fa' 914 | if(H5Pset_fapl_ros3(fapl_id, &fa) < 0) | ^ 17 errors generated. make[1]: *** [Makefile:663: libnchdf5_la-hdf5open.lo] Error 1 make[1]: Leaving directory '/home/jin/Downloads/netcdf-c-4.9.2/libhdf5' make: *** [Makefile:769: check-recursive] Error 1

@BiChong-Jin BiChong-Jin changed the title Errors relate to H5FD during 'make check' process: hdf5open.c:873:6: error: use of undeclared identifier 'H5FD_ros3_fapl_t' Errors relate to HDF5 during 'make check' process: hdf5open.c:873:6: error: use of undeclared identifier 'H5FD_ros3_fapl_t' Mar 7, 2024
@WardF
Copy link
Member

WardF commented Mar 7, 2024

It looks like something is not linking properly; do you have the config.log file generated when you ran configure?

@BiChong-Jin
Copy link
Author

It looks like something is not linking properly; do you have the config.log file generated when you ran configure?

Hi Ward,

Thanks very much for the helps, I appended the whole file of 'config.log' generated during config process.
config.log

@WardF
Copy link
Member

WardF commented Mar 8, 2024

It looks like the instruction to link against libhdf5 is somehow not being passed along when building the tests as part of make check. Can you provide the output from ldd liblib/.libs/libnetcdf.so? Also, you might try this from the command line when running make check:

$ LIBS="-lhdf5 -lhdf5_hl" make check

@BiChong-Jin
Copy link
Author

It looks like the instruction to link against libhdf5 is somehow not being passed along when building the tests as part of make check. Can you provide the output from ldd liblib/.libs/libnetcdf.so? Also, you might try this from the command line when running make check:

$ LIBS="-lhdf5 -lhdf5_hl" make check

Thanks very much for the reply.
This weekend I won't be able to go to the lab due to other commitments, but I will append the file: libnetcdf.so and try out your suggestion on Monday as soon as possible. Thanks for the helps.

@BiChong-Jin
Copy link
Author

It looks like the instruction to link against libhdf5 is somehow not being passed along when building the tests as part of make check. Can you provide the output from ldd liblib/.libs/libnetcdf.so? Also, you might try this from the command line when running make check:

$ LIBS="-lhdf5 -lhdf5_hl" make check

Hi Ward,

I tried to run ldd liblib/.libs/libnetcdf.so, but the address seems different on my machine, so I locate the libnetcdf.so file, and there are multiple files :

jin@KUKAI:~$ locate libnetcdf.so
/usr/lib/libnetcdf.so
/usr/lib/libnetcdf.so.19
/usr/lib/x86_64-linux-gnu/libnetcdf.so
/usr/lib/x86_64-linux-gnu/libnetcdf.so.19
/usr/lib/x86_64-linux-gnu/netcdf/mpi/libnetcdf.so
/usr/local/MATLAB/R2018b/bin/glnxa64/libnetcdf.so.7
/usr/local/MATLAB/R2018b/bin/glnxa64/libnetcdf.so.7.2.0
/usr/local/MATLAB/R2019a/bin/glnxa64/libnetcdf.so.13
/usr/local/MATLAB/R2019a/bin/glnxa64/libnetcdf.so.13.1.1
/usr/local/src/netcdf-c-4.9.2/lib/libnetcdf.so
/usr/local/src/netcdf-c-4.9.2/lib/libnetcdf.so.19
/usr/local/src/netcdf-c-4.9.2/lib/libnetcdf.so.19.2.2

I'm not sure which one should I run the ldd on, I assumed /usr/local/src/netcdf-c-4.9.2/lib/libnetcdf.so is the correct one and run ldd on it :
ldd /usr/local/src/netcdf-c-4.9.2/lib/libnetcdf.so
linux-vdso.so.1 (0x00007ffff71ec000)
libimf.so => not found
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007feb2c44e000)
libsz.so.2 => /usr/local/lib/libsz.so.2 (0x00007feb2c439000)
libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007feb2c257000)
libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007feb2c1b0000)
libsvml.so => not found
libirng.so => not found
libintlc.so.5 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feb2be00000)
/lib64/ld-linux-x86-64.so.2 (0x00007feb2c72b000)
libicuuc.so.70 => /lib/x86_64-linux-gnu/libicuuc.so.70 (0x00007feb2bc05000)
libz.so.1 => /usr/local/lib/libz.so.1 (0x00007feb2c190000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007feb2c163000)
libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007feb2c139000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007feb2c118000)
librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007feb2c0f9000)
libssh.so.4 => /lib/x86_64-linux-gnu/libssh.so.4 (0x00007feb2c08c000)
libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007feb2c078000)
libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007feb2bb61000)
libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007feb2b600000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007feb2bb0d000)
libldap-2.5.so.0 => /lib/x86_64-linux-gnu/libldap-2.5.so.0 (0x00007feb2baae000)
liblber-2.5.so.0 => /lib/x86_64-linux-gnu/liblber-2.5.so.0 (0x00007feb2c065000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007feb2b531000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007feb2c055000)
libicudata.so.70 => /lib/x86_64-linux-gnu/libicudata.so.70 (0x00007feb29800000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007feb29400000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007feb2c035000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007feb29656000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007feb29215000)
libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007feb2ba66000)
libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007feb2b4eb000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007feb2b469000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007feb2914a000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007feb2b43a000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007feb2c02b000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007feb2ba58000)
libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007feb2b41f000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007feb29633000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007feb2900f000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007feb28ff7000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007feb2ba51000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007feb28fe3000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007feb2ba44000)

@BiChong-Jin
Copy link
Author

BiChong-Jin commented Mar 11, 2024

And also I retried the make check with your suggestion $ LIBS="-lhdf5 -lhdf5_hl" make check, but I still got errors that looks similar compare to previous time :
LIBS="-lhdf5 -lhdf5_hl make check.txt

@WardF
Copy link
Member

WardF commented Mar 21, 2024

You'll want to run ldd against the copy of libnetcdf.so you are compiling; it won't be any of the versions generated and distributed by other packages. After compiling, it typically resides in the netcdf-c/liblib/.libs directory; sorry for not being more specific. You'll want to look in the folder you are compiling in, and then it will be liblib/.libs

@BiChong-Jin
Copy link
Author

BiChong-Jin commented Mar 22, 2024

Thanks very much for the reply.

I rechecked the directories and this is the directory where I install/ compiled netcdf : /usr/local/src/netcdf-c-4.9.2/,
New Note
And from the image, there is no dir named 'liblib', but has a 'lib' dir. And inside 'lib' dir there is a file named libnetcdf.so:
New Note

On the other hands, I checked the directory where I downloaded netcdf: /home/jin/Downloads/netcdf-c-4.9.2/:
New Note
And inside this, there is a dir named 'liblib', so I also checked it, but there is no libnetcdf.so inside:
New Note

So as a conclusion, did I made some mistakes or the libnetcdf.so from /usr/local/src/netcdf-c-4.9.2/lib/ should be the correct one maybe? Here is the information after I run ldd against that file :
ldd_info.txt

@WardF
Copy link
Member

WardF commented Mar 22, 2024

This is very peculiar; your build system is finding libhdf5, and purports to be linking against it (from the config.log file you provided). But the ldd output you provided shows no link to it. Can you share the contents of ${H5DIR}/lib? Also, can you share the output if you run /usr/local/src/netcdf-c-4.9.2/nc-config --libs and /usr/local/src/netcdf-c-4.9.2/nc-config --all ?

@BiChong-Jin
Copy link
Author

Sorry for being late, we found out someone accidentally deleted the files inside the /src dir in the past few days, so my installed zlib and hdf5 dir were also deleted. I think the reason all these errors above is because of that. I have to reinstall all the related libraries : zlib, hdf5. I will do it as fast as I can and hope this time it will work well, if not, I may again ask some questions. Thank you very much Ward for all these helps.

@BiChong-Jin
Copy link
Author

Just some updates on the compilation of netcdf.

I have reinstalled all the related files(zlib, hdf5), successfully installed both of them. But, still could not pass the 'make check' process of netcdf-c, and I also used ifort and icx for the compiler this time.

So next I decided to change the compiler to gcc and gfortran. And finally, successfully installed netcdf.
Again, thanks so much for all the helps.

New Note

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants