cedadev / jasmin_scivm

9 stars 0 forks source link

GrADS #147

Closed alaniwi closed 5 years ago

alaniwi commented 6 years ago

add GrADS

alaniwi commented 6 years ago

Compilation from source fails with:

gcc -DHAVE_CONFIG_H -I. -I. -I.       -I/usr/include            -g -O2 -rdynamic -c gauser.c
gauser.c: In function 'gaqury':
gauser.c:4468: error: 'tdefi' undeclared (first use in this function)
gauser.c:4468: error: (Each undeclared identifier is reported only once
gauser.c:4468: error: for each function it appears in.)
gauser.c:4469: error: 'tfile' undeclared (first use in this function)
gauser.c:4477: error: 'tdef' undeclared (first use in this function)
gauser.c:4478: error: 'tfile2' undeclared (first use in this function)
gauser.c:4542: error: 'n_atts' undeclared (first use in this function)

Investigating the source, this happens in the case where USENETCDF ==0 and USEHDF == 0 but USEHDF5 == 1 (the symbols end up used but the code to define them is excluded by preprocessor #if statements).

In the build, this is what is happening -- it is doing:

checking for udunits.h... (cached) yes
checking for utInit in -ludunits... (cached) no
- netcdf-4 disabled

and:

Checking in system locations for libraries to support hdf4 ...
checking udunits.h usability... yes
checking udunits.h presence... yes
checking for udunits.h... yes
checking for utInit in -ludunits... no
- hdf4 disabled

(even if the configure includes --with-netcdf=/usr --with-hdf5=/usr --with-hdf4=/usr).

Even though strings - /usr/lib64/libudunits2.so finds utInit. Setting LDFLAGS=-ludunits2 does not help.

alaniwi commented 6 years ago

There is also a binaries tarball available for CentOS6 for grads, so I will resort to producing a "source" RPM which simply copies the binaries into the target location, rather than actually compiling the source.

alaniwi commented 6 years ago

ldd is happy with all of the pre-packaged binary executables.