[gradsusr] issue compiling GrADS 2.0.2 on CentOS 5 - found and fixed
Parry, Rob
Rob.Parry at ARS.USDA.GOV
Fri Jan 17 14:08:02 EST 2014
Not sure why I would see this and not others, I assume devel team has compiled this source on many systems.
System is 32bit CentOS 5.10
Downloaded GrADS 2.0.2 today (ftp://cola.gmu.edu/grads/2.0/grads-2.0.2-src.tar.gz),
got all the dependencies installed but got the error:
gagmap.c: In function gribmap:
gagmap.c:468: error: intmax_t undeclared (first use in this function)
gagmap.c:468: error: (Each undeclared identifier is reported only once
gagmap.c:468: error: for each function it appears in.)
gagmap.c:468: error: expected â)â before iseek
gagmap.c:475: error: expected â)â before iseek
gagmap.c:483: error: expected â)â before iseek
gagmap.c:651: error: expected â)â before iseek
gagmap.c:658: error: expected â)â before iseek
gagmap.c:665: error: expected â)â before iseek
make[2]: *** [gagmap.o] Error 1
make[2]: Leaving directory `/root/grads-2.0.2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/grads-2.0.2/src'
make: *** [all-recursive] Error 1
I looked in the source and found that intmax_t is a type cast. So I searched /usr/include/*.h for intmax_t. Found it in stdint.h.
So I edited gagmap.c and simply added the line:
#include <stdint.h>
Source compiles successfully. Perhaps this needs to be a permanent fix?
-- Rob
IT Specialist
USDA - ARS - Hydrology and Remote Sensing Lab
301-504-8625 | Rob.Parry at ars.usda.gov<mailto:Rob.Parry at ars.usda.gov>
This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140117/c45f217d/attachment.html
More information about the gradsusr
mailing list