[gradsusr] grads 2.2.1 fails to compile with hdf5
Fabrice Ducos
fabrice.ducos at univ-lille.fr
Wed Jun 16 04:17:35 EDT 2021
Greetings,
grads 2.2.1 (the latest version at the time of writing) fails to build with hdf5 enabled.
I didn’t test former versions, but it’s not unlikely that this error has shipped since a while if this feature is rarely used.
Details of the system:
OSX 11.4 Big Sur (Darwin Kernel Version 20.5.0)
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
$ ./configure --with-hdf5=/opt/anaconda3
[output skipped for brevity...]
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h
config.status: executing libtool commands
+=========================================================================+
GrADS 2.2.1 : Configured on 06/16/21 for x86_64-apple-darwin20.5.0
+=========================================================================+
+-------------------------------+
| |
| GrADS will be built with: |
| |
| - GUI disabled |
| + READLINE enabled |
| - GEOTIFF disabled |
| - shapefile disabled |
| + GD enabled |
| + CAIRO enabled |
| - GRIB2 disabled |
| - HDF4 disabled |
| + HDF5 enabled |
| - NETCDF disabled |
| - OPeNDAP disabled |
| |
+-------------------------------+
Run 'make && make install' to build GrADS.
Executables will be installed to bin/ in current dir, unless prefix was specified.
$ make
[output skipped for brevity...]
gauser.c:4539:29: error: use of undeclared identifier 'tdefi'
gr2t(pfi->grvals[3], 1.0, &tdefi);
^
gauser.c:4540:2: error: use of undeclared identifier 'tfile'
tfile = gafndt(pfi->name, &tdefi, &tdefi, pfi->abvals[3], pfi->pchsub1, pfi->ens1,1,1,&flag);
^
gauser.c:4540:29: error: use of undeclared identifier 'tdefi'
tfile = gafndt(pfi->name, &tdefi, &tdefi, pfi->abvals[3], pfi->pchsub1, pfi->ens1,1,1,&flag);
^
gauser.c:4540:37: error: use of undeclared identifier 'tdefi'
tfile = gafndt(pfi->name, &tdefi, &tdefi, pfi->abvals[3], pfi->pchsub1, pfi->ens1,1,1,&flag);
^
gauser.c:4541:16: error: use of undeclared identifier 'tfile'; did you mean 'while'?
fid = H5Fopen(tfile,H5F_ACC_RDONLY, H5P_DEFAULT);
^~~~~
while
gauser.c:4541:16: error: expected expression
gauser.c:4548:41: error: use of undeclared identifier 'tdef'
gr2t(pfi->grvals[3], (gadouble)i, &tdef);
^
gauser.c:4549:6: error: use of undeclared identifier 'tfile2'
tfile2 = gafndt(pfi->name, &tdef, &tdefi, pfi->abvals[3], pfi->pchsub1, pfi->ens1,1,1,&flag);
^
gauser.c:4549:34: error: use of undeclared identifier 'tdef'
tfile2 = gafndt(pfi->name, &tdef, &tdefi, pfi->abvals[3], pfi->pchsub1, pfi->ens1,1,1,&flag);
^
gauser.c:4549:41: error: use of undeclared identifier 'tdefi'
tfile2 = gafndt(pfi->name, &tdef, &tdefi, pfi->abvals[3], pfi->pchsub1, pfi->ens1,1,1,&flag);
^
gauser.c:4550:17: error: use of undeclared identifier 'tfile'; did you mean 'while'?
if (strcmp(tfile,tfile2)!=0) {
^~~~~
while
gauser.c:4550:17: error: expected expression
gauser.c:4550:23: error: use of undeclared identifier 'tfile2'
if (strcmp(tfile,tfile2)!=0) {
^
gauser.c:4551:13: error: use of undeclared identifier 'tfile'; did you mean 'while'?
gree(tfile,"f215");
^~~~~
while
gauser.c:4551:13: error: expected expression
gauser.c:4552:8: error: use of undeclared identifier 'tfile'
tfile = tfile2;
^
gauser.c:4552:16: error: use of undeclared identifier 'tfile2'
tfile = tfile2;
^
gauser.c:4553:22: error: use of undeclared identifier 'tfile2'
fid = H5Fopen(tfile2,H5F_ACC_RDONLY, H5P_DEFAULT);
^
gauser.c:4562:7: error: use of undeclared identifier 'tfile'; did you mean 'while'?
gree(tfile,"f216");
^~~~~
while
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
I could « fix » the errors by patching the src/gauser.c file:
src/gauser.c
2815c2815
< #if (USENETCDF == 1 || USEHDF == 1)
---
> #if (USENETCDF == 1 || USEHDF == 1 || USEHDF5 == 1)
It is the simplest fix I could think of, though it may not be the one recommended by the maintenance team.
Best regards
Fabrice Ducos
Laboratory of Atmospheric Optics
University of Lille
France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20210616/b3ae11c3/attachment-0001.html>
More information about the gradsusr
mailing list